Article

Making the Case for ColdFusion

Page: 1 2

Myth #4: ColdFusion doesn't have the ability to <insert cool feature of another language>

False! I have yet to find something that ASP, PHP, or JSP can do that ColdFusion can't. ColdFusion has all the programmatic ability of the aforementioned languages, as well as a tighter integration with other Macromedia technologies like Flash or the new Flex language.

One of the biggest things ColdFusion has over these languages is that most of these special features are built into ColdFusion. Take charting, for example. With a simple database query and a CFChart tag, I can create a bar, line, pyramid, area, cone, curve, cylinder, step, scatter or pie chart in Flash, JPG or PNG formats, and that graph can be 3D or 2D! This facility is offered out of the box with very little or no configuration needed.

ColdFusion also has hooks into other Web languages and objects such as C/C++, Java, COM, CORBA, XML, SOAP and more! You're never limited to programming only in ColdFusion, thanks to all these hooks and APIs. Take my current employer, for example. Their code is 99% Java but, thanks to ColdFusion's hooks into Java, I can take a Java developer's class file and use it in my application, thereby increasing our code reuse. That's pretty snazzy, if I do say so myself.

Myth #5: ColdFusion encourages poor programming practices.

False! ColdFusion provides all the building blocks necessary to develop highly scalable, modular and maintainable code. ColdFusion does not enforce any particular development methodology but, instead, focuses on getting the job done. Many programmers who start out with ColdFusion do typically write less than perfect code, but you can find the same problems in ASP, or PHP.

Two major development methodologies now exist: FuseBox, and MACH II. A developer using one of these methodologies can, over time, learn better coding practices, but it's really up to the programmer and the project to determine what works best.

That's it for the top 5 myths about ColdFusion. For more Q&A, check out the CFFAQ site.

The Benefits of ColdFusion

Now that we've cleared the air, let's talk about some of the strong points of ColdFusion and why it could be a good fit for your company, or a good path for you to investigate.

A Java Base

As I mentioned before, the ColdFusion Server is built using Java and is a Sun J2EE verified application. This means you can deploy and run ColdFusion and your application on a wide variety of application servers, such as Sun ONE, BEA, IBM WebSphere and many others. Macromedia even includes a fully licensed copy of JRUN 4 with the Enterprise Edition of ColdFusion.

What does this mean for the average developer? Well, let's say you create a really cool application and you sell it to a big company that, in the following months, decides to standardize on Java. If you had a PHP or ASP application, you might be in big trouble and lose your contract, but, with ColdFusion, you can rest easy. You application will run on their application server -- it will even interface with their present and future Java code.

Errors and Bug Fixes

Another big issue for developers is debugging and receiving error messages from their applications. With ColdFusion, you can catch exceptions and respond to them however you like (just as you can in Java), or you can allow the server to display error messages to the user. From your ColdFusion Administration panel, you can set the level of detail you want the errors to contain, identify which IP addresses can see detailed errors, and even set up custom pages to handle errors or missing templates. With ColdFusion debugging, you receive a detailed error message that tells you exactly where your error is, what the stack trace was (the order of files called prior to the error), and a suggestion as to what the problem could be. It is very rare that you will receive an error message that causes you to think more and debug less.

On top of the great error messages, you also get a plethora of debugging information. When I load up a ColdFusion page on my development environment, I see the name of my application and the template I'm currently looking at. I can also see a complete stack trace, which includes page execution times and full paths to these pages. I see a full listing of all my Application, CGI, Cookie, Server, Session, Form, and URL variables. There is very little reason for me to print out a variable just to see its value when I can simply scroll through my browser and have a full report.

ColdFusion Components - CFCs

With the release of ColdFusion MX, Macromedia introduced the idea of ColdFusion Components (aka CFCs). These are a great leap for ColdFusion, and are one of the most popular features of the new system. See ColdFusion Components, an Introduction for more details.

One of the greatest features of CFCs is the ability to document your code without having to throw in a bunch of comment tags. By using the "hint" attribute in your CFC files and <cffunction>s, you can tell future users what your CFC does, what the individual methods (also referred to as functions) do, and what kinds of data they take (input) and display (output). You can then browse directly to the CFC, type in your administrator credentials and receive a very nice output of this information.

If you've ever had to document your code, you'll know what a royal pain it can be. I've found this feature to be invaluable in my day to day operations. Since the documentation changes with the code, it's also very dynamic, so you can rest assured that your current documentation will include the new features you just added.

I hope that, by now, you're looking at ColdFusion in a different light and see it as something to investigate further. I highly recommend you download a copy of either the Macromedia ColdFusion Server or the New Atlanta Server, and play around with it. I'm sure that with an open mind and a little time, you'll see ColdFusion as a viable alternative to your current Web development efforts. If you have any questions, please feel free to contact me directly or follow up with a post in the SitePoint Forums.

Resources

For those who are ready to jump in and get started, here are some great resources:

  • Macromedia ColdFusion - Begin your journey here by downloading the various server versions. Be sure to grab the developer edition, which is good for 1 IP address.
  • New Atlanta Blue Dragon – Find the Free ColdFusion server as well as alternatives to the Macromedia Standard and Enterprise versions.
  • Forta.com – This guy is the chief evangelist for ColdFusion. Consider him the ColdFusion Godfather. Ben Forta has been doing ColdFusion and other related programming for many, many years. He has written many books on various ColdFusion subjects and other Web technologies, and is considered an expert in his field. His site offers links to his books, tips, tricks, hints, hosting links, and a Weblog where you can keep up with him and ColdFusion.
  • MXNA – The Macromedia XML News Aggregator is a central point for many of the Macromedia related blogs on the internet. Here you'll find blogs for ColdFusion, Dreamweaver, Flash and many more Macromedia topics. This is a great central point for Macromedia knowledge.
  • SitePoint ColdFusion Blog and Forums – You can never go wrong with any of the sitepoint.com resources and these two are no exception.

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Sponsored Links

Rate This Article

  • 1
    Poor
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
    Great

Comment on This Article

Have something to say?

Post A Comment

You need to be a member of the SitePoint Forums to comment on this post. Sign Up

Already a member? Post using your SitePoint Forums account: