Intranet Journal   Earthweb  
Images Events Jobs Premium Services Media Kit Network Map E-mail Offers Vendor Solutions Webcasts

   Intranet Journal Subjects
Search Earthweb

Privacy Policy

 

[ Home | Discussion Forum | How Do I... | Lotus Notes Intranets | Microsoft SharePoint | Products | Shopping  ]

free news!

Software Review
Cold Fusion Pro 2.0
Allaire Corporation

// originally appeared in IDM May.97
By Rob Bilson

Every once in a while, a development tool comes along that so greatly simplifies the way we design applications that we wonder how we ever lived without it. Cold Fusion 2.0 Professional, the flagship product from Cambridge, Mass.-based Allaire Corp. is such a product.

Cold Fusion is a Web application development tool that allows developers to build dynamic data-driven applications for use on the Internet and intranets. With Cold Fusion, you can develop everything from intranet database applications and groupware to E-commerce applications. Currently available for Windows 95 and NT, Cold Fusion employs a high level server-side markup language called CFML (Cold Fusion Markup Language) to interact with relational databases, Crystal Reports, SMTP and POP servers, and a whole host of other network technologies. Cold Fusion sells for $495 and is available directly from Allaire as well as selected retailers.

Design by Markup

CFML is a markup language similar in structure to HTML in that all of the language constructs are contained within tags. CFML enjoys a relationship with HTML similar to that of other embedded scripting languages such as JavaScript or VBscript. HTML is used for layout control while the CFML handles the brunt of the work such as database queries, arithmetic and string functions, and other server side processing tasks. Files created with CFML are saved as Cold Fusion templates and are designated by a ".cfm" extension.

Cold Fusion is capable of running templates in one of two modes: CGI or API. For CGI-compliant Web servers that lack a dedicated API, Cold Fusion can be called as an executable script with the name of the template to be executed appended to the URL. While Cold Fusion can run in CGI mode, to take full advantage of its power and flexibility, it should be paired with a Web server that has an API such as Netscape, O'Reilly & Associates Web Site, or Microsoft IIS (NSAPI, WSAPI, and ISAPI respectively).

Web server API's offer numerous advantages over CGI because they interface natively with the server architecture. CGI forces the Web server to run a separate application for each call made while API's load the program file into memory and process the requests there. The results are an increase in speed and overall performance for applications that utilize API's. Other advantages of API's include integration with the server's built-in security and other native functions.

Out of the Box

Installation of Cold Fusion is simple and straightforward. A setup wizard is included which walks you through all of the steps from choosing which components are to be installed to detecting which Web server you are using. After installation is complete, you can use your Web browser to verify that Cold Fusion was installed and configured correctly by connecting to the Getting Started page that was installed during setup. (See Figure 1.)

The Getting Started page contains a link to a Cold Fusion application that ensures that the program was setup successfully and that ODBC database connections can be made. In addition, the Getting Started page has HTML versions of all the included manuals, a tutorial, and numerous sample applications (including source code) showcasing many of Cold Fusion's features. The Cold Fusion application server runs as an NT service and is configurable via the Cold Fusion Administrator. The administrator allows you to setup and configure ODBC datasources, choose and configure SMTP connections, manage template mapping, and install custom components. Cold Fusion error logs are also accessible from within the administrator. (See Figure 2.)

The documentation that comes with Cold Fusion consists of three well written manuals: a users guide, language reference, and manual for using the included Crystal Reports. If you can't find what you are looking for in one of the manuals, Allaire offers numerous technical support options.

A quick trip to the company's Web page (www.allaire.com) yields a listing of the various technical support programs available (both free and fee based). On the free side of things, Allaire has an extensive knowledge base which is fully searchable (and built, appropriately, with Cold Fusion). The knowledge base contains FAQ's, bug reports, techniques, and lots of other useful Cold Fusion information.

If you can't find what you are looking for here, you might try clicking on over to their online developers' conference. This threaded discussion group covers the whole range of Cold Fusion related issues from installation and ODBC/SQL issues to advanced topics and other general issues. The group is heavily trafficked by other Cold Fusion developers and augmented by Allaire technical support personnel, as well as a group of dedicated power users known as "Team Allaire."

On the off chance that you still can't find a solution to your problem, Allaire offers a number of fee-based solutions, ranging from per-incident support to yearly contracts.

Getting to Work

Cold Fusion has to be one of the easiest development tools to work with on the market. CFML is extremely easy to learn, and only a basic knowledge of SQL is necessary to get started developing database applications. Several example applications are provided that leverage a wide range of the product's features, with the source code fully commented. Users can test each application, then look "behind the scenes" to see how it was done. This type of learn-by-example greatly reduces the learning curve associated with any development tool. (See Figure 3.)

Once familiar with the basics of CFML, you can begin creating custom applications. Colf Fusion provides an Application Wizard that makes development truly a point-and-click affair. (See Figure 4.) The wizard is fairly good at creating basic query and display applications, but lacks the sophistication for complex development. Allaire's wizards -- like most others I've seen -- are really designed to be learning aids, not substitutes for solid programming technique.

For sophisticated coders Allaire provides the Cold Fusion Application Programming Interface (CFAPI). The CFAPI allows developers to write C++ extensions to Cold Fusion, making its capabilities virtually limitless. Since Cold Fusion's release, a number of custom tags have been created allowing integration with, for example:

  • POP mail
  • LDAP
  • Cyber Cash
  • Verity's popular search engine.

Cold Fusion also allows the use of scripting languages such as JavaScript and VBscript on the client side, and includes a set of Java classes for creating color graphs from result data.

UNIX developers shouldn't feel discouraged by Allaire's original Windows' bias. The company has plans to release a UNIX version of CF, initially for Solaris, by the end of the year.

A major upgrade also lies in the near future. Cold Fusion 3.0 is currently undergoing a limited private beta. Feature enhancements include a completely overhauled engine, Web browser-based administration, template encryption, template caching, arrays, and much more. The Cold Fusion Application Framework is being expanded to support a range of development languages in addition to C++, including Visual Basic, Delphi, and Java. No release date has been announced.

Benchmarks

Performance has always been an issue in application development, and Web-based applications are no different. To measure the speed of Cold Fusion in a production environment, I created a test scenario using three different database applications currently running on my company's intranet. The benchmark tests I performed included repeatedly querying the databases while recording a number of metrics, such as the size of the database, number of fields, number of records, number of records returned from the query, query time, and total execution time.

While this scenario is by no means exhaustive, it provided enough information to make reasonable judgments about the performance of Cold Fusion. Results, shown in Table 1, are summarized below.

Most simple queries performed by Cold Fusion executed in under 200 milliseconds (1/5 of a second). The limiting factor in Cold Fusion's performance seems not to be the ODBC connection and the query, but the rendering of HTML output by the Web browser. One particularly large query (on 5000 records with a result set of 2500 records) took only 1200 milliseconds to perform, definitely acceptable for our purposes. The rendering of the 500k worth of HTML associated with the 2500-record result set was another story, taking another 45 seconds to display.

CF Verification screen - thumbnail
CF Administrator - thumbnail
CF Example App - thumbnail
CF App wizard - thumbnail
 
TABLE 1. Cold Fusion Performance Test Results
Attempt Number Number of Fields Total Records Records Retrieved Query Time (ms) Total Execution Time (ms)
1a 3 446 100 120 911
1b 3 446 100 120 881
1c 3 446 100 120 881
2a 10 4919 100 70 670
2b 10 4919 100 70 661
2c 10 4919 100 70 661
3a 10 4919 2500 1212 7371
3b 10 4919 2500 1212 7441
3c 10 4919 2500 1212 7391
4a 17 550 100 100 902
4b 17 550 100 110 901
4c 17 550 100 110 891

*NOTE: Testing performed on Microsoft Acess97 databases housed on a Pentium 133 with 96 megs ram, NT 4.0 sp2.

About the Author

Rob Bilson is a freelance writer and the Senior Webmaster at Amkor Electronics, the global leader in semiconductor IC packaging, assembly and test. In addition, he can of ten be found doing consulting work for the Hard Drive Cafe, a Delaware based Internet/Intranet consulting firm.
Of Interest
· Intranet eXchange Discussion Board

· Advice and Opinions