ColdFusion Articles ::
Articles pertaining to ColdFusionColdFusion Application Mappings and Sub-folders
Posted on :: Jul 23
I've started leveraging some of the ColdFusion goodness into my applications.
The first thing I have implemented is application level mappings to keep my configuration files and components out of the web root. Here's how my current project layout rolls.Using this.mappings in Application.cfc
Posted on :: Jul 23
I've been working with ColdFusion ever since version 4.0, but of course every once in a while, a light bulb goes on over my head and I realize how I've completely misunderstood something. Like using
this.mappingsin Application.cfc.Coldfusion Mapping Problems
Posted on :: Jul 23
This one drove me nuts.. I would consider this behavior to be a bug in CFMX and I wanted to share my experience so no one else runs into this and wastes time.
First, the server is a Windows 2k box with CFMX 6.1. I'm not sure how earlier versions of CF behave, but I would guess that they act the same.
Fixing DNS Caching in Coldfusion
Posted on :: Jul 15
ColdFusion goes open source
Posted on :: Jul 15
Now when I say ColdFusion, I do not mean Adobe ColdFusion Server, I actually mean CFML the language, but most people tend to associate this with ColdFusion. So just to enlighten those of you that do not know the language is called CFML (ColdFusion Markup Language), but there are a number of ways you can deploy CFML, the most well known being Adobe ColdFusion Server and the lesser known BlueDragon Server, and more recently Railo, all of which have a price tag.
Enabling Railo errors on IIS7
Posted on :: Jul 14
I did a Railo/Tomcat install on an IIS7 server and thought the whole thing was hosed as I could only get a 500 internal server error. It turns out that Railo errors will not be displayed by default unless you are browsing the site on the actual server as IIS7 hides the errors.
Online Editor for ColdFusion 9
Posted on :: Jun 10
I've created an online web editor to test ColdFusion 9 tags and functions. Although it has limitations of testing only basic tags. File operations, database operations won’t work that are dependent on the server path and properties.
SES URLs on Tomcat :: Mango Blog
Posted on :: Sep 23
One problem people had when using Mango on Railo on Tomcat is that they need to change the settings to not use friendly URLs. That also happens with ColdFusion if you are using it on top on Tomcat.
The SES servlet mappings that work in ColdFusion on JRun, do NOT work on ColdFusion on Tomcat-JBoss as they are not supported by the servlet engine.
To get around it, I simply used Apache-based rewrites so that the SES urls like http://yourdomain.com/blog/post.cfm/ftp-in-eclipse-hooray automatically get mapped to http://yourdomain.com/blog/post.cfm?entry=ftp-in-eclipse-hooray.
Here are the rewrites that I put in place to get posts, categories, pages and search to work.
Flexigrid :: ColdFusion and JQuery
Posted on :: Sep 21
For a great while now I've been attempting to use and or create a JQuery-based Grid System for several projects I'm working on. I've tried many including jqgrid (and could never get jqgrid working for some reason), but I stumbled upon Flexigrid.
Flexigrid is a Lightweight but rich data grid with resizable columns and a scrolling data to match the headers, plus an ability to connect to an xml based data source using Ajax to load the content.
Looping over a Structure (without knowing it's Keys) in ColdFusion
Posted on :: Sep 4
I'm currently in the process of bilding a Dynamic Form Building Application in ColdFusion, and was having issues with getting the values of my Submitted Structure. I wasn't able to read the structure accordingly (becuse I had though originally it was an array, only to fnd through CFDUMP is was being saved as a Strcture).
So I thouht I'd give you this little snipplet of code to help you out, as It did me:
(TWO EXAMPLES AVAILABLE)
How to Install ColdFusion 8 on Mac OS X
Posted on :: Jul 29
The setup used ColdFusion 8 through Apache (XAMPP) all on Mac OS X.
cfimage generating unreadable CAPTCHAs
Posted on :: May 12
While Playing a around building a new page for a form that required a CAPTCHA to prevent spamming, I thought: I'd use ColdFusion 8’s
<cfimage>tag; which I did, and it was really simple to do.I realized that the Captcha images weren't readable, or murky or distorted. And then it hit me: the problem was that the page had a black background; the generated CAPTCHA images had an alpha-transparency background – and so the black was showing through, and making everything dark.
Creating Stand-Alone ColdFusion Templates With Embedded Images
Posted on :: Apr 29
This isn't as cool as perhaps it sounds, but it's kind of neat! Here's the Scenario:
You (or the project you're working on) don't want images on it to have to be stored in the standard file system. This makes the page extremely modular so that I can just drop it in and not worry about taking it out later.Relative Custom Tag Paths: Friend or Foe?
Posted on :: Apr 29
ColdFusion 8 added support for this.mappings and this.customTagPaths as per-application settings in Application.cfc, something many developers including yours truly will tell you was a god-send.
But did you know that they can be relative?
I stumbled on this — uh, feature? — and I'm still undecided on whether I like it or not.
Using GMAIL for your ColdFusion Server's SMTP
Posted on :: Apr 28
I had discovered that is is possible to use Google's GMAIL smtp server to server your ColdFusion Server Mail system. Really.
It's not a complicated as one would think.An Introduction to CFSCRIPT
Posted on :: Apr 23
We all know and love ColdFusion for its easy to use tag-based syntax. So why is there even a cfscript-style syntax? Well, there are a couple of reasons:
Some CFers are already proficient in other langauges, and may feel more comfortable writing program events in a more 'traditional' method.Some people think that cfscript style syntax is easier to read (more straightforward).
CFSCRIPT exectues faster than a comparable block of tag-based code
So what does all of this mean to you? Do you have to use cfscript? Absolutely not. But given the advanatges mentioned above (as well as the ability to more easily write User-Defined Functions in CF 5 and above), you may want to check out cfscript to see what it can do for you.Configuring CF8 to use Google Apps
Posted on :: Apr 21
The biggest issue I have with running my own server is dealing with spam blockers, email servers, DNS servers, etc. For some of you this is easy, and a no brainer. I personally run from it like a screaming banshee. I use google hosted services for all my email needs. They make it easy, rarely ever have downtime, and the spam filtering is second to none!
Google works fine for sending email from my desktop mail client or through the web, but sending mail via scripts programatically has always been a pain in the butt in my experience. That is until today.
Configuring Your Home Computer to Run Apache Server, PHP, MySQL, ColdFusion, and IIS
Posted on :: Apr 2
This tutorial for installing WAMP Server (Apache, PHP, MySQL, and phpMyAdmin)
was written for the students in the Web Page Design program at the Contra Costa
ROP. This tutorial will cover basic server installation for web development
testing purposes on your home computer. This tutorial will not cover all of the
necessary security settings used to create a public web server.Cracking an Encoded Coldfusion Template
Posted on :: Apr 2
Can it be done? I wish the answer were easier than a yes or a no, becasue it's actually both. Upto Coldfusion MX the answer is YES, yes you can decode the encoded coldfusion file. After Coldfusion MX the answer is NO. Now, permit me to explain.
ColdFusion supports the ability to "encrypt" the CFML templates in an application or component, using the CFCRYPT.EXE utility, so they can be redistributed or sold without exposing the source code to casual viewing. Allaire has received reports of illegal utilities that will "decrypt" encrypted CFML templates.
ColdFusion 9:: Codename Centaur
Posted on :: Mar 31
Adobe ColdFusion 9 and a New CF IDE
Posted on :: Mar 31
The first bits of ColdFusion information appeared on Adobe Labs this morning. This is certainly exciting for ColdFusion developers as Adobe has finally given information not only on the next version of ColdFusion, but also announced the much anticipated official ColdFusion IDE.
ColdFusion 9 (Centaur)
First, Adobe has released information about the upcoming version of ColdFusion (which is currently codenamed Centaur). This version has some exciting features including (pulled from the labs page):
The Future of ColdFusion
Posted on :: Mar 31
The CFUnited Keynote usually gives a good insight into the future of ColdFusion and this year was no different. What a great way to kick off the event so lets get right into what was talked about. Ben started off at 9:00 AM talking about the state of ColdFusion today. With no actual numbers to report he did say that sales are superb and that the numbers are the best they have ever been for Adobe. That right there should just let any doubters know that CF is not going anywhere.
ColdFusion 9 - The Details
Posted on :: Mar 31
As I write, the CFUnited 2008 conference is underway in Washington, DC. This morning's keynote from Adobe brought out some really great details about ColdFusion 9 and how the new ColdFusion / Flex / AIR integration will play out. I am not present at CFUnited this year, but I have compiled some of the details. If you are a Flex / AIR developer who hasn't considered ColdFusion - you might want to reconsider upon the release of ColdFusion 9.
Disclaimer: All of these details have been compiled from blogs and from people who are currently at the conference - there is a possibility that there might be some things that are inaccurate.
ColdFusion 9 - What We Know (so far)
Posted on :: Mar 31
Since I got the obligatory pricing rant out of the way (well, ok, it was more complicated than that), I figured it was time to focus on the features we have already heard about regarding ColdFusion 9 (codenamed Centaur). Most of what we know so far was revealed during this year's CFUnited Adobe Keynote, though a couple items were made public during the extremely brief cf.Objective() Adobe Keynote. Let me start by saying that I think everything we have learned leads me to believe that the ColdFusion team is on the right track. Of course a lot rides on the actual implementation of the features, but all signs are pointing in a very positive direction. Also, keep in mind that, as they say, these are only plans and plans can change (as in, while these features are likely there are no guarantees).
Understanding and Using CFCs (with OOP and database interaction)
Posted on :: Mar 31
First off, this is a rather long and detailed tutorial. In this tutorial we will go over the basics of creating CFCs. This tutorial was created mostly in part because it seemed to me there was a very limited number of articles and tutorials addressing the subject of practacle CFC development.
I will be using a number of terms in this tutorial that are common in the world of Object Oriented Programming (or OOP). Even though CFCs do not share all aspects of objects in true OOP languages, we can benefit by using those aspects that are available.
Using ColdFusion's CFDBInfo to Dynamically Output Database Columns and Tables
Posted on :: Mar 23
The ColdFusion tag CFDBInfo was introduced in ColdFusion 8. I finally got around to playing with it and thought someone other than me might find this useful. I was thinking of using it for creating a dynamic SQL dump for some of my projects I'm currently writting, and thought I should share it with the world.
There are a ton of uses for this excellent CF Tag, and I've included a few samples below.
When will cfqueryparam NOT protect me?
Posted on :: Mar 23
Guess what, Using CFPARAM in your ColdFusion code, may not always save you from SQL Injection.
"How?", you may ask. Let me give you an example of an SQL injection attack that's not caught by cfqueryparam.
SQL injection can occur any time cautions are not taken to completely separate your SQL code from its parameters and the parameters being passed in are allowed to flow into the SQL statement itself. SQL injection can also occur when building the SQL statement's table and column names dynamically.Creating PDFs that automatically print via CFPDF and DDXCreating PDFs that automatically print via CFPDF and DDX
Posted on :: Mar 23
Here's the situation. A user is viewing a report online. The business owner of the application decided to provide a nice PDF format of the data, all the user needs to do is click a button, perhaps named "print". The CF server generates the PDF, hands it off to the browser through either CFLOCATION or CFCONTENT. So now the user has the PDF loaded in a secondary window and have to go hunt for the print button again. But fear not, dear user! We'll save you by judicious use of XML, Javascript, and ColdFusion.
Easily Cache the Return Value of Any Function
Posted on :: Mar 9
Work in web development long enough, and you'll run into caching. When done appropriately, it can be a real life saver. In CFML, we have several caching tools at our disposal.
The built in cfcache function will cache an entire page, and there are a bunch of projects on RIA Forge (search for "cache") that deal with caching of whole pages, partial pages, and specific data; and use various methods from memcached to underlying java caching. And of course, you can always roll your own cache using a persistent scope (application, session, client, or cookie) and some date comparison.
After about the 100th time of rolling my own custom caching, I decided it was time to wrap it up in a nice little UDF.
E-Commerce in ColdFusion
Posted on :: Feb 12
This tutorial uses arrays and structures to develop a shopping cart system. This tutorial also contains web-front order processing (e-commerce) information that most of you will probably find very helpful alongside the shopping cart.
This tutorial comes from an eclectic group of sources. I utilized Macromedia's LiveDoc's, CJ's tutorials, as well as many other tutorial information when I first built a full shopping cart system. With that in mind, some of my coding may seem familiar from elsewhere, and I want to acknowledge that I took parts of my coding from other sources when I initially wrote all of this coding. At this point I cannot cite exactly which parts are from elsewhere, but just know that some parts are.
Additionally, this tutorial utilizes a processing system in which people who shop must sign up as members. The coding is written so it is not a nuisance for customers to sign up as they check out. The code should be easily understood and editable so customers do not have to sign up before purchasing. I did this because I have found it more convenient for customers to store their information, and its more secure as it only uses one address for both billing and shipping.Displaying Tag Restrictions on ColdFusion Server
Posted on :: Feb 12
Please Note: This Tutorial is for Cold Fusion running on Windows.
One thing that always got to me was that on shared coldfusion hosting, you wouldn't know what restricitons are on the server until you try to run a chuink of code, like <Cfdirectory> and get an error. Well I've written this tutorial to assist you in ascertaining which tags are permitted and which aren't.
Creating IIS Virtual Directories with Coldfusion 8 and .NET
Posted on :: Feb 10
Ever had a need to automate the creation of virtual directories in IIS? Coldfusion 8 can do this quite well using the System.DirectoryServices.DirectoryEntry class in the .NET framework.
Configuring IIS on one server, and Coldfusion on another
Posted on :: Feb 9
I was trying to configure my web server and coldfusion servers on seperate machines.
My IIS server was setup to pull source from d:\\webroot. I copied the wsconfig.exe tool and its INI file from my coldfusion server root\\bin folder and ran it on my web server too hook them together.
What if you could run PHP code directly inside ColdFusion?
Posted on :: Jan 7
I found this blog post back in early 2008 that states you can run PHP (and Ruby) on Coldfusion 8. I thought this was pretty damed cool, especially considering I develop with both. So here's the Blog entry:
What if you could run PHP code directly inside ColdFusion?
WebOS :: Dynamic Websites Made Easy
Posted on :: Dec 12
WHAT IS WEBOS?
WebOS is a ColdFusion Website System. WebOS was developed through the neccessity of an easy-to-use, easy-to-edit, install and administrate Content Management Solution, written in ColdFusion.
WebOS makes creating and updating your website(s) easy and time-saving.
WebOS solves all of the tediousness and difficulties in running and administrating Dynamic Websites.
Yes I said websites...Preventing SQL Injection
Posted on :: Nov 17
Most web applications interact with a database, and the data stored therein frequently originates from remote sources. Thus, when creating an SQL statement, you often use input in its construction. A typical SQL injection attack exploits this scenario by attempting to send fragments of valid SQL queries as unexpected values of GET and POST data. This is why an SQL injection vulnerability is often the fault of poor filtering and escaping, and this fact cannot be stressed enough.
I'm going to explains SQL injection by looking at a few example attacks and then introducing some simple and effective safeguards. By applying best practices, you can practically eliminate SQL injection from your list of security concerns.
Preventing SQL Injection in PHP & Coldfusion