BroadwayWorld.com - the Premiere Theater Site on the Net

Robert Diamond

Subscribe to Robert Diamond: eMailAlertsEmail Alerts
Get Robert Diamond via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Related Topics: ColdFusion on Ulitzer

CFDJ: Article

ColdFusion Server 5.0

ColdFusion Server 5.0

The biggest new release of ColdFusion in recent memory is now upon us. We've been hearing about it for months, saw it previewed at the Allaire Developer's Conference last year, and have been reading about it ever since - ColdFusion Server 5.0.

Now it's finally ready-it will improve, enrich, and in some ways even change forever the way you develop in ColdFusion.

ColdFusion Server 5.0 delivers a wealth of new features and capabilities that make it easy to build powerful Web solutions. It includes a number of enhancements designed to increase productivity, improve performance, and simplify the management of ColdFusion applications.

The following provides a high-level overview of the most significant features and explains their benefits. Watch for expanded ongoing covrage, tips and tricks, and more in CFDJ throughout the rest of the year.

Here's the summary, straight from the horse's mouth.

User-Defined Functions
Developers can now use CFScript to define custom functions that are instantly available in any ColdFusion application. By creating UDFs for frequently used algorithms or procedures, developers can increase productivity and maintainability. UDFs offer the same or better performance than equivalent custom tags and enable the use of return values.

Query of Queries
One of the most clamored-for features is finally here - query of queries. Cross data source joins, cross data source unions, in-memory data denormalizations, and improvements in large-scale database queries are just some of the capabilities made available with the new query of queries feature. Using a subset of the Structured Query Language (SQL), ColdFusion applications can now query existing result sets in memory. Data in different RDBMSs can be combined and treated in the application as though they were from a single source. Accessing data directly in the CF process can also eliminate frequent connections to and from a database. In other words, cursorlike functionality can be achieved without maintaining a connection to the back end. The new CFSQL tag enables developers to efficiently integrate data from heterogeneous data sources and treat it as if it were from a single source.

Charting and Graphing
In one of the first visible results of the recent merger between Allaire Corp. and Macromedia, charting and graphing have been added. Thanks, Macromedia! Powered by Macromedia's Generator, the ColdFusion 5.0 charting engine can dynamically generate up to 13 different charts and graphs in either Flash, GIF, or JPEG format. Data can be drawn from nearly any source, including SQL queries, hard-coded data, and application variables.

New Verity VDK 2.6.1 and Verity K2 Server Integration
The full-text search capability provided by ColdFusion for documents and data sources now uses the Verity K2 Server. Indices can also be larger (up to 125,000 documents with ColdFusion Professional, 250,000 with ColdFusion Enterprise) and can now index the latest file formats, including Microsoft Office 2000. Multiple language capabilities are also now a standard part of the product.

Crystal Reports 8.0 Integration
Users can now create dynamic reports with a simple tag interface that passes data to the latest version of Crystal Reports. Used in conjunction with the ColdFusion charting engine, this feature provides a rich business reporting capability.

Incremental Page Delivery
The new CFFLUSH tag offers developers control over how a page is delivered to the browser. Thus, complex pages that take longer to build can be delivered in increments, giving users a more immediate response to their request. For example, a long report page could immediately send its header and a message stating, "Please wait while the report is built," until the full page becomes available.

Database Connectivity
ColdFusion 5.0 includes new Merant ODBC 3.7 Drivers on all platforms, including new wire protocol drivers that increase performance by interfacing directly with the native database protocols.

Application Deployment Services
Also new are site archiving features that enable easy backup and restoration of site configuration files and/or applications. This simplifies management by enabling the easy movement of applications between servers; for example, from testing to production or from one production server to another.

Enhanced Application Monitoring
ColdFusion 5.0 builds on the server's existing management capabilities by adding the ability to create an unlimited number of customizable alerts. These can be used in turn to send notifications via e-mail or pager, or to trigger automatic recovery procedures.

Server Log Analysis
New to CF 5.0, the Log File Analyzer provides a browser-based tool for filtering, searching, and querying log files in order to pinpoint application problems or locate performance bottlenecks.

SNMP Support
ColdFusion now supports integration with enterprise management systems such as IBM Tivoli, CA Unicenter, or BMC Patrol.

This new tag has been added to the CFML language and allows developers to write a message to a custom user log or to a ColdFusion log at any point during the execution of a page. This can be of great value when debugging an application in development and for understanding patterns of usage in production applications.

Linux Improvements
ColdFusion applications can now be deployed on additional Linux distributions, including SuSE and Cobalt Qube, RaQ, and XTR servers. The server also shows significant performance improvements on the Linux platform.

Hardware Load Balancing Integration
The ColdFusion Server provides agent-based integration with hardware load-balancing solutions, such as Cisco's CSS 11000. By sending performance data to the load balancer, ColdFusion enables the switch to better distribute load among servers.

Enhanced COM Support
A number of improvements have been made with regard to implementing COM/COM+ in ColdFusion apps.

Enhanced CORBA Support
ColdFusion 5.0 changed the architecture involved with calling CORBA objects to dynamically load libraries using a connector. This new approach is more generic and doesn't tie the ColdFusion user to a specific Orb vendor. Macromedia provides implementations of the connectors for some of the popular Orbs and, for those that are not supported, Macromedia will make the source available under NDA to a select group of third-party candidates or Orb vendors.

New Tags

Use the new tags, cfgraph and cfgraphdata, to generate dynamic charts and graphs in either Flash, GIF, or JPG format from various data sources, including database query results, hard-coded data, variables, and other data.

<CFQUERY NAME="AllMonths" DATASOURCE="cffivedb">
SELECT Month, Amount, MonthNumber
FROM GraphTest1
ORDER BY MonthNumber

<cfgraph type="bar"
title="Monthly Totals">

These attributes provide the basic information about the graph such as its type and the data it displays (see Table 1).

Query of Queries
Sample of cross data source joins:

<cfquery name="MailingList1" datasource="SQLList" dbtype="OLEDB"> SELECT Name, Email FROM MailingList </cfquery>

<cfquery name="MailingList2" datasource="OracleList" dbtype="Oracle80"> SELECT Name, Email FROM MailingList
<cfquery name="QofQUnion" dbtype="Query">
SELECT Name, Email
FROM MailingList1
SELECT Name, Email FROM MailingList2

User Defined Functions

function myname(first, last)
VAR middle;
middle = "Homer";
return first & middle & last;

<!--- "myname" can now be used like any CFML Built in Function --->
<CFSET xxx = myname("John", "Doe")>

Spectra's CFA_DUMP becomes part of the core CFML language. Use this tag to display the value of any variable in a formatted table.

<cfdump var="variable">

The cfflush tag flushes the current ColdFusion output buffer to the Web server, which then sends it back to the client. The first instance of the cfflush tag on a page sends back all the HTTP headers as well. Subsequent flush tags send only the output buffered since the previous flush.

<cfflush interval = "bytes">

In ColdFusion 5.0, you can now generate application-specific, scheduled task, and custom logs. You can target files for storing logged information, and you can limit logs by size or entries by age. The ColdFusion Administrator now also supports filtering for log views. The ability to direct logging output on an application-specific basis should be especially valuable for ISPs who need to track application information on a customer-by-customer basis and provide log information to customers while protecting sensitive customer information. The user-defined log and user-defined message features allow you to integrate application specific management re-quirements into your ColdFusion Applications. For example, you can use the cflog tag to write a message to a custom user log or to a ColdFusion log. The user message repository allows you to standardize logging messages.

The log management supports limiting log entries by date or absolute size. When you specify file storage for logs, you can specify how many generations of log files are maintained.

<cflog text = "text"
log = "log type"
file = "filename"
type = "message type"
thread = "thread ID yes or no"
date = "date yes or no"
time = "time yes or no"
application = "application name yes or no">

Required. The text of the message to be displayed. Enter any text.

If you omit, the file attribute specifies the standard log file in which to write the message. Ignored if you specify a file attribute. Valid values are:

  • Application - Default. Writes to the Application.log file, normally used for application-specific messages.
  • Scheduler - Writes to the Scheduler.log file, normally used to log the execution of scheduled tasks.

The name of the file in which to log the message. All log files must have the suffix .log. You must specify only the main part of the file name, without the .log suffix. For example, to log to the Testing.log file, specify "Testing": The file must be located in the default log directory. You cannot specify a directory path. The file is created automatically if it does not exist. Default is Application.

The type (severity) of the message. Valid entries:

  • Information - Default. All informational messages.
  • Warning
  • Error
  • Fatal Information

Specifies whether to log the thread ID. The thread ID identifies which internal service thread logged a particular message. Since a service thread normally services a CFML page request to completion, then moves on to the next queued request, the thread ID serves as a rough indication of which request logged a message. Leaving thread IDs turned on can help diagnose patterns of server activity. Valid values are Yes and No. Default is Yes.

Specifies whether to log the system date. Enter Yes or No. Default is Yes.

Specifies whether to log the system time. Enter Yes or No. Default is Yes.

Specifies whether to log the application name if one has been specified in a cfapplication tag. Enter Yes or No. Default is Yes.

Performance testing and final code improvements are not yet complete. Preliminary testing, however, demonstrates considerable gains across all platforms. On the Tack2Plus application, an e-commerce application that was also the basis for the ColdFusion 4.5.1 Performance Briefs and Whitepaper, we observed the following improvements over version 4.5.1 SP2:

  • Up to 3.5X improvement on NT/Win2K (+226% with the untuned I/O-bound Tack2Plus app)
  • Up to 4.5X improvement on Linux (+350% with the untuned I/O-bound Tack2Plus app)
  • Up to 33% improvement on Solaris and HP-UX with the untuned I/O-bound Tack2Plus app

Server Memory Management Enhancements
ColdFusion 5.0 for Windows and Linux now features automatic footprint reduction to minimize the amount of memory used by the ColdFusion 5.0 Server on these platforms. ColdFusion 5.0 dynamically releases unused memory back to the operating system to minimize its process footprint. Customers with Web applications that occasionally use very large blocks of memory will see this memory returned to the operating system when the operation is complete.

Basic Security Enhancement
ColdFusion now allows you to disable certain attributes and tags. You can disable the following tags and attributes:

  • cfcontent
  • cfdirectory
  • cffile
  • cfobject
  • cfregistry
  • cfadminsecurity
  • cfexecute
  • cfftp
  • cflog
  • cfmail
  • dbtype=dynamic attribute
  • connectstring attribute

All in all it seems like a great new upgrade, and here at CFDJ we're certainly looking forward to it! The majority of all the new features and enhancements in CF 5 are user-requested, and that's an important thing to note when evaluating it. Everything in it has been asked for by the community, and Macromedia has certainly delivered.

More Stories By Robert Diamond

Robert Diamond is the founder and editor-in-chief of BroadwayWorld.com, the premiere theater site on the net now receiving over 100,000 unique visitors a day. He is also the owner of Wisdom Digital Media - a leading designer of entertainment and technology web sites. He is also the lead producer on BroadwayWorld.com's consistently sold-out Joe's Pub concert series, and Standing Ovations benefit concerts. Diamond was also named one of the "Top thirty magazine industry executives under the age of 30" by Folio magazine. Robert holds a BS degree in information management and technology from the School of Information Studies at Syracuse University. Visit his blog at www.robertdiamond.com.

Comments (2) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

Most Recent Comments
Marco Ciavolino 06/09/02 09:15:00 AM EDT

There seems to be no simple way to dynamically get a list of the queries on a page for debugging purposes. They are visible if CFSETTING turns on debug mode, but not as a list of names.


Marco Ciaovlino

Syed Mohammad Atif 02/07/02 08:39:00 AM EST

Plz send me any example how to create functions for reusability and how to use tag to to use com Components using structure.