When Written: June 2001
Verdict: A worthwhile and competent upgrade to a key technology for web development which should ensure its continued success in this competitive marketplace.
Supplier – Unipalm – 01638 569600
Internet – www.macromedia.com
System Requirements (min) –
OS – Windows 98, NT4 SP6A, Windows 2000 SP1, Solaris 2.6, 7, 8, Linux Red Hat 6.2-, SuSE Linux 7.0- , Cobalt Linux RAQ3/RAQ4,XTR, HP-UK11.0
CPU – Intel Pentium, Sparc, PA_RISC 1.1 or 2.0
Ram – 256M except HP-UX (128M)
Disc – 400M except HP-UX (120M)
Web Server – IIS 4.0, iPlanet, Apache, O’Reilly WebSite
Cold Fusion 5 is the first new incarnation of Allaire’ s web server technology since the merger of their company with Macromedia. There is a large loyal band of Cold Fusion developers who will welcome the improvements. Cold Fusion is a web server technology along the lines of Microsoft’s ASP. The Cold Fusion pages are text files with an extension .cfm written with special tags to indicate server side commands. When a browser is pointed to one of these pages the web server process the tags and generates an HTML web page dynamically. This is then passed to the browser for rendering. Cold Fusion pages can be written with any text editor but, to make things easier, Macromedia provides two highly developed design environments, one called Cold Fusion Studio 4.5 and the other Dreamweaver Ultradev 4.0. Both these products have downloadable upgrades for Cold Fusion 5 so that they ‘know’ about the new tags.
One of the first questions most people ask about Cold Fusion is why use it when it does a similar job to ASP, and is not free like Microsoft’s competing product? Cold Fusion was on the market before Microsoft’s Active Server Pages and as such there are a lot of sites out there using Cold Fusion and equally a lot of developers who know and love the product. When you have spent some time with both technologies you start to realize that in some of the areas Cold Fusion really scores. Many of these extra features can be added to ASP, like graphing, but this requires buying extra ASP components from third parties, and the argument from Macromedia is that by the time you have bought all the extra components needed to match the functionality of ASP to Cold Fusion you will have spent much more than the cost of a copy of Cold Fusion for your server although obviously there are flaws in this argument.
Another argument could be that the length of development and debugging time spent on a web application is the largest part of any web site development and, if using Cold Fusion over ASP gives a significant saving in time and hence money, then the costs are no longer an issue. To ease the burden on a developer’s budget, the development systems come with a developer’s copy of Cold Fusion Server and so only the live web server needs a full copy of Cold Fusion server, not your problem if you are hosting at another ISP who offers this service. One of the areas that Cold Fusion has always scored significantly over its competitors is in debugging, with its full breakpoint and single stepping of server side code, as well as returning debugging and execution time information to the browser simply by setting a couple of flags on the Cold Fusion server. If only debugging Active Server Pages was this easy!
The setting of such options and configuring the Cold Fusion server is done via a web front end which is well laid out and easy to follow. Often with Active Server Pages the only way to change similar settings is to alter registry settings! You try telling an ISP who is hosting your site that you want them to change some registry settings! In a review of this length there is not the space to cover all aspects of a product such as this, so instead I will mainly concentrate on what is new.
When you are designing a dynamic web site you often need to provide users with a page to enter some choices. For example, the user types in a name, hits a submit button and the web site application looks in a database and returns a web page with all the matching records. There is always a problem as soon as you allow users to enter data in a free form, they can, and will, enter information that your system is not expecting, letters where there should numbers for example. You can always test for this at the server end, but it is frustrating for the user to wait for a page to be returned just to say that they have entered some data incorrectly, and it is much better to write the code, client-side.
Cold Fusion now has the ability to do this in one simple tag, as well as some very neat Java data grids which enable the web user to view data on a web page in a variety of ways without a call back to the server. Setting the validation rules up for an element on an HTML Form is simply a matter of changing the properties in the relevant tag. The two development environments make this an easy task. Obviously this requires the user’s browser to be running JavaScript and to allow for when this is not the case you will still have to test the data in your server side code, but at least it’s half the job done!
Displaying data in different forms is also a breeze with Cold Fusion 5. There is a charting tag which will turn your data into either a Line, Bar or Pie chart as either a flash, jpg or png image with the ability to drill down to the data beneath via hot spots. If you prefer to display your data as a conventional report, rather than battle with tables in HTML, Cold Fusion will generate these from a Crystal Reports file, thus making the design of these reports much easier… provided you are familiar with Crystal Reports.
All this dynamic data is usually fed from a database and here things have improved as well. It is now possible to execute a ‘Query of Queries’ which is where you query an existing result set in the COLD FUSION server memory rather than having to go back to the database for a new result set. This can be useful in situations where the user is going back and forth selecting records from a list, or perhaps first displaying a large number of records and allowing the user to refine their selection. These extra queries can now be done on the original recordset which is still in the server’s memory rather than by making another call back to the database.
Another speed enhancement has been the inclusion of wire-protocol drivers to communicate with data stores. This, along with connection pooling, support for ODBC, OLE-DB and native database drivers means that Cold Fusion should be able to deliver the maximum performance from all major data sources. Macromedia is claiming that this version of Cold Fusion server is the fastest yet and that, for many, may be a good enough reason to upgrade.
Another great new feature is the inclusion of an indexing engine, which enables you to provide a way for users to search pages on your web site. However Macromedia has not stopped there, this search engine can also search database content on the web site, something which is difficult to achieve with most other technologies. This search capability is provided by a Verity K2 engine, which again is built into Cold Fusion 5. A very welcome improvement, when returning a page with lots of records on it or one that has a processor hungry routine on it, asin previous versions of Cold Fusion the whole page had to be parsed and generated before it was sent to the user’s browser. This often gave the impression of a site being slow.Granted, Active Server Pages has a command to get around this problem, response.flush, which would force the web server to send the page as far as the statement, and to continue processing. This way at least the user could see some of the page whilst the rest was being generated, rather than a blank browser window and the belief that the web site was broken. Cold Fusion 5 now has the <CFFLUSH> tag, which achieves exactly this same functionality.
On the programming side, Cold Fusion now has user-defined functions which are such a boon to programming that it is surprising that we have had to wait until version 5 before they were implemented. The logging ability has also been improved, you are now able to write your own information either to your own or to the web server’s log files. This can help with debugging which, as we have said before, is excellent. There is the capability to attach software ‘probes’ to monitor server activity or events in the web application and for these to activate alerts or send email messages. This analysis has been taken further in the Enterprise version by including a Log analysis tool. The Enterprise version of Cold Fusion 5 also handles load balancing not only with its own software clustering but it also supports hardware based load balancing configurations, with accurate tracking of session variables across multiple application servers.
When you have written and tested your web application you need to transfer it to the live system. At this stage it is so easy to forget a configuration, security setting or even a file. Cold Fusion 5 enables you to package all the components, settings, files, etc into a single archive file which can be deployed on another system or just used as a back up. To do this you simply run a deployment wizard that creates either a one off deployment to another server or a scriptable package that can also encrypt the .cfm files which contain your code. This package can then be run on another system and the script will configure the web application and data sources etc correctly. On the subject of deployment, Cold Fusion 5 is now available for SuSE and Cobalt Linux as well as NT and Windows 2000. Macromedia have also integrated Cold Fusion 5 with SNMP so that it can be managed with one of the many enterprise management tools.
Cold Fusion 5 is a worthy successor to the previous versions. The enhancements have been aimed at making web applications more rapid and in these troubled .com times this is a move in the right direction. With the performance enhancements to what was already a fast technology Cold Fusion 5 is worth a serious study by anyone involved in developing dynamic content web sites.
Overall 5/6
Ease of Use 5/6
Features 5/6
Value for Money 4/6
Web based admin tool – easy and clear
This little code, (shown in Cold Fusion Studio) produces
This page, no prizes for design, but shows how powerful Cold Fusion tags can be
Setting all the properties of a tag is helped by these dialog boxes
Debugging window allows you to watch variables
Deployment Wizard makes transferring your site to the live server easy
Article by: Mark Newton
Published in: Mark Newton