What is ColdFusion?
The term ColdFusion is often used interchangeably for two things, the CFML language, and the Adobe ColdFusion Server. Let's talk about the language a bit before we get into the server side of things.
The Language of CFML:
CFML (ColdFusion Markup Language) is a tag-based scripting language that was designed to be both easy-to-use and easy-tolearn, yet be powerful enough to create extremely rich and functional web applications. There are obvious benefits to being easy-to-learn and easy-to-use, and CFML accomplishes both of these tasks very well. Because CFML is tag-based, people who are already familiar with creating web sites using HTML can learn CFML easily due to the familiar syntax.
Adobe's ColdFusion Server:
The term ColdFusion can also be used as a reference to Adobe's ColdFusion Server which was the first CFML interpreting engine and is currently the most popular engine available. Like all web scripting languages (PHP, JSP, etc), CFML code needs to be processed. The CFML Engine is what takes care of that processing. All CFML processing, no matter what engine you use, happens on the server. So if you want to run CFML code need to make sure the server you're using includes a CFML Engine. There are several different processing engines available from different companies and communities, we'll go over a few below.
CFML Engines:
-
Adobe ColdFusion
Adobe's CFML interpretor was the first CFML interpretor to exist, and was the first web application server to ever be developed back in 1995 shortly after the Internet started becoming popular with the general public. Originally created by a company called Allaire, the original Cold Fusion server was heavily sought after by Microsoft. Microsoft was looking for a server-side processing language to augment it's Microsoft Server line. Allaire refused to sell, and Microsoft eventually gave up and instead purchased a then-still-in development application server called i-Basic. Microsoft re-branded I-Basic into what is now known as ASP.
ColdFusion Server continued to be developed by Allaire for several years until Allaire merged with Macromedia in 2001. At that time, Macromedia was dominating the web animation market with Flash, and had a solid hold on the Web Development market with it's Dreamweaver IDE product. ColdFusion was a brilliant addition to the Macromedia product family and Macromedia was dedicated to continuing to enhance the ColdFusion server. This dedication was demonstrated when Macromedia invested heavily and re-wrote the ColdFusion engine entirely in Java.
A few years later, in 2005, Macromedia was successfully acquired by Adobe, who continue to this day to develop and support ColdFusion Server. This ownership and development by Adobe has largely enriched the CFML developers experience and abilities. Adobe has made great efforts to offer tight integration options for CFML developers. The ability to easily create dynamic PDF documents and Flash forms is a good example of that integration. The ability to easily utilize CFML code in Flex applications, dynamically change data in Flash applets, and tight integration with Adobe's Dreamweaver products are other excellent examples of how CFML has benefited from Adobe.
Adobe continues to improve their commercial CFML interpretor engine, and sports a huge CFML developer community which continues to grow.
-
BlueDragon Server
NewAtlanta's BlueDragon Server was the first real commercial competitor to Adobe's ColdFusion server, and gave the CFML community some choice over what processing engine they could use to interpret their CFML code. As the saying goes: competition breeds innovation. BlueDragon emerged with some new CFML tags and functionality that the CFML community really enjoyed. BlueDragon pioneered the CFIMAGE tag, the CFTHREAD tag, the CFIMAP tag, and a host of other innovative features (like .NET integration) that could help CFML developers perform additional complex functions with ease.
In early 2008, the J2EE edition of NewAtlanta's BlueDragon Server was released as open-source software under the GPLv3 License, and became what is now known as Open BlueDragon (OpenBD for short). NewAtlanta continues to develop and support commercial versions of BlueDragon Server, including BlueDragon Server JX and BlueDragon.NET.
-
Smith Project
The Smith Project was the first open source CFML processing engine. Developed by a company based in Switzerland for a project that they needed to do, they released the Smith Project CFML engine to the community. For one reason or another, the Smith Project was never widely adopted by the CFML community, and further development on it appears to have come to a halt.
-
Open BlueDragon
Open BlueDragon (OpenBD) originated from the NewAtlanta BlueDragon Server J2EE edition. Due to it's commercial heritage, OpenBD benefited from a large existing user base, a known name, and known compatibility with Adobe's CF Server. It was the first Open Source CFML processor of its kind, and has benefited greatly from community support. Sporting new advanced features like free CFVIDEO integration, Amazon EC2 support, and most recently the Google App Engine support, OpenBD is poised to play a prominent role in the CFML community.
-
Railo Server
Pronounced Rye-lo, Railo was originally developed by Michael Offner (Now Railo Technologies CTO) in 2002 as his University diploma project. The original intention for Railo was for it to interpret CFML code into PHP code so that CFML could run on any platform that had PHP. This proved to be extremely troublesome so the project was later converted into a Java project.
Railo 3.1 Beta was released as open source on March 31st, 2009 under the LGPLv2 license. The main distinction of the LGPLv2 license is that Railo code can be included into commercial engines as long as the code that belongs to the Railo project remains open source. Because of this unique license among CFML processors, Railo has been received with open arms by open source advocates and commercial engines alike.
Besides boasting extraordinary speed at processing CFML files, Railo also was the first engine to offer the CFVIDEO tag, among other innovative features.
What Does ColdFusion Look Like?
ColdFusion is a tag-based language, like HTML. CFML is flexible enough to be used also as either a scripted language (like PHP) or an Object-Oriented Language (like Java). Further, CFML has the ability to be either tag-based, or script-based. The following examples are Hello World scripts using both the tag and script versions of CFML.
Saying Hello:
CFML (tag):
<cfset variables.sayHello = Hello World!>
<cfoutput>#variables.sayHello#</cfoutput>
CFML (script):
<cfscript>
sayHello = Hello World!;
WriteOutput(sayHello);
</cfscript>
The next example will show how CFML code looks mixed in with HTML. Notice how the tag-based syntax blends in nicely with existing HTML:
CFML inside HTML:
CFML (tag):
<cfset variables.firstname = "John">
<cfset variables.lastname = "Doe">
<cfoutput>
<html>
<body bgcolor="gray">
<div align=center>
<font face="verdana" size="2">
Hello, <strong>#variables.firstname# #variables.lastname#</strong>
<br><br>
Welcome to our site!
<br>
</font>
</div>
</body>
</html>
</cfoutput>
CFML can be used to customize other client-side languages too. CSS, JavaScript, XML, and even binary data like images can be customized by CFML. Here's an example of a customized JavaScript alert box:
CFML-Enhanced JavaScript:
CFML (tag):
<cfset variables.myAlert = Hello from CFML!>
<cfoutput>
<form name=myform>
<input type=button value="click me"
onClick="alert('#variables.myAlert#')">
</form>
</cfoutput>
Why should CFML be important to me?
There are several very important reasons to consider CFML when deciding on a language to develop your web applications in.
-
Easy to Learn
The ability to get up and running quickly using CFML can be a huge asset to you, your business, and your customers. Not only is it easy for you yourself to take on and start being productive right away, but your employees can also benefit from the small learning curve, and become productive members of your development team with less training time.
-
Easy to Use
The most important feature of CFML has always been making difficult tasks simple. This goal has been the driving force behind many of the upgrades and new releases regarding CFML processing engines. Sure, the same jobs you perform using CFML can indeed be done using other methods, or other languages, but generally tasks are just easier to accomplish using CFML when compared to these other methods.
-
Platform Independent
When you use CFML, you are not tied to any one kind of server. You can run CFML code on any OS that supports Java. This gives you greater flexibility to customize your infrastructure to whatever is best for your business, without having your applications dictate what platform you have to host on.
-
Supportability
Both the CFML language and CFML servers is supported by both Commercial and Community organizations. Every single processing engine available includes community support services, and commercial support for CFML servers is available from the following vendors:
What Code Editors Are Available for CFML?
There are several IDE's available that support CFML coding.
-
Adobe Dreamweaver
The most widely used and most integrated development tool for CFML Developers. Dreamweaver is great because it's an example of the benefits Adobe brings to integrating Flash and other Adobe products into a very useful development environment. The majority of CFML developers use Dreamweaver as their development tool of choice. Dreamweaver costs roughly $400, and runs on Windows and Macs.
-
CFEclipse
CFEclipse is an Eclipse plug-in that brings CFML development support to the Eclipse development tool. Eclipse is known by most Java developers, but due to it's pluggable nature Eclipse can be transformed into a development environment for many different languages and situations including PHP, CSS, and Ruby, among others. Eclipse is a Java application and as such can run on any Operating System that can run Java. This includes not only Windows and Macs, but also Linux, Solaris, BSD, etc. CFEclipse is open-source and free to download and use for any purpose.
- Adobe Bolt
As of this writing, Adobe Bolt has not been released to the public yet. However, Adobe has notified the public that Adobe Bolt will be released soon. Adobe Bolt will also be based on the Eclipse project, which means it will be able to run on any Operating System that supports Java.
Tips for Choosing the Right CFML Host?
When choosing a web host for your CFML projects, particularly with regard to shared hosting, you'll want to make sure that your hosting environment has what it needs to stay online, secure, and supported. The following are some tips to check web hosts that offer CFML hosting, and how to separate good hosts from hosts that aren't so good. Again, these tips apply mostly to shared hosting accounts, as it is shared hosting accounts that are the most vulnerable.
-
Check for official Java or CFML support
Many web hosting companies will offer services then not offer support for them if there is a problem with it. A good shared hosting company will support the software they offer on their shared hosting accounts. Checking for an official statement indicating that a hosting company supports a specific piece of software that's included on a shared hosting account is the first step in identifying a good host from a not so good host.
-
Make sure insecure tags are disabled, or modified to be secure
ColdFusion is a powerful language, and along with that power come security risks that can be exploited by anyone with access to the server, including other customers or bad guys that have gotten a hold of another customers log-in information. It's important to make sure that exploitable tags have been disabled or modified so that another hosting customer that's on the same server you are cannot take advantage of those security risks. Check with your hosting provider to make sure tags like CFEXECUTE, CFREGISTRY, CFFILE and other exploitable tags have all been tended to in order to make them secure for a shared hosting environment.
-
Make sure your host monitors the server for potential problems
Some hosts will offer CFML hosting, but then not monitor their servers for problems. Check with your host to make sure they monitor their servers for potential issues. For example, if another customer on the same server you are writes bad code that takes a LOT of system memory, CPU speed, or other resource, this other customer could negatively impact the performance of your own site. If this other customer is taking up all the machines memory, what memory is your site going to use? Your web host should be equipped to identify and respond to these potential problems.
-
Don't use your hosting account for development
It's never a good idea to put test code on a production server. If you're still programming your application, then it would be irresponsible of you to upload untested code on to your hosting account. Should a problem with untested code arise, your web host may identify you as a problem customer and limit you in some ways that you may not want. Be considerate to the other customers on your server and only upload code to your hosting account that you've tested.
-
Ask about open source CFML server options
Most hosts are always on the look-out for good value-adds for their hosting services. Open source CFML servers are a great way to help get your host more involved with the CFML community while offering a more affordable service at the same time. As a hosting customer, you have the greatest power to influence your web host. Ask about open source CFML hosting and see if your host would be interested in offering either OpenBD or Railo as a hosting service. The more web hosting companies that support CFML, the better things will be for the entire CFML community!
Are you a web host already? Consider offering an Open Source CFML Server with your hosting options. It will add value to your hosting accounts and give your customers a powerful tool for success using your service. Successful customers are long-term customers!
|