Welcome!

You will be redirected in 30 seconds or close now.

ColdFusion Authors: Yakov Fain, Jeremy Geelan, Maureen O'Gara, Nancy Y. Nee, Tad Anderson

Related Topics: ColdFusion

ColdFusion: Article

ColdFusion 4.0 Developer Enhancements

ColdFusion 4.0 Developer Enhancements

In the premier issue of CFDJ, Richard Schulze wrote a fine article on several new features of ColdFusion 4.0, part of Allaire's recent upgrade to their entire product line. In this article I'll highlight some additional features of the new release. I'll also expand on his coverage of language features and Studio enhancements. And for those of you who missed Richard's article, I've included another brief review of the key new features.

A Major Product Upgrade
While 4.0 was released in October, some customers may only now be fully investigating its features. This is a substantial update, bringing significant new features that place CF at the vanguard of Web application development environments. With much-needed improvements in scalability, security, integration and rapid development capabilities, 4.0 solves several pressing problems for line-of-business CF implementations.

Still, with CF being used for ever more complex Web applications, it's reasonable for firms to exercise some caution in evaluating and implementing 4.0 and its many new features. As with any endeavor, with greater power comes a need for greater responsibility. While enabling a more capable, scalable and secure production application environment, 4.0 calls for consideration of how best to implement and take advantage of the new features. And to be honest, there are some significant changes that can affect existing applications if the new release is implemented too casually. Still, the new features are compelling and you'll want to get started with them as soon as you can.

The New Features
You can learn more about the new release in various Allaire resources (listed at the end of this article), as well as Schulze's article, mentioned above, but here are the most significant new features:

  • Rapid development
    Team development system
    One-step deployment
    Interactive debugging
    Two-way visiual programming
  • Open Integration
    Native database drivers
    CORBA components
    XML integration (WDDX)
    Visual tools extensions
  • Scalable deployment
    Auto-failover
    Dynamic load balancing
    Open state repository
  • Complete security
    Integrated authentication
    Access control
    Server sandbox security

    I'll touch on some of these features in this article, but beyond the "big picture" features, there are many other topics that may interest CF developers as well.

    Changes in Packaging
    and Marketing The launch of 4.0 initiated several marketing and packaging changes. Note that the names of all the products have changed subtly, with the application server (sometimes referred to previously as CFAS) now being known simply as ColdFusion Server, and both the ColdFusion and HomeSite names have been compressed into single-word representations. There are new logos for all the products, a revamped Allaire Web site, substantial new marketing efforts and a comprehensive series of Road Shows and Regional programs.

    More significant to current clients is a new segregation of the ColdFusion product into Professional and Enterprise editions. Gone is the lower-end "workgroup" edition. The Enterprise edition, as its name implies, embodies those features most suitable to higher-end installations. Specifically, Enterprise includes features such as auto-failover, load balancing, native database drivers, CORBA components and advanced security.

    Also changed is the price, befitting a more substantial new development system. It's been raised, though it's still a bargain compared to other similar Web development environments. (Frankly, many people got an awful lot of value out of the previous - and quite inexpensive - application server.) There were substantial discounts and generous upgrade paths offered at its launch, most of which have expired. Contact your Allaire sales rep for further details.

    Studio Enhancements
    While many CF developers have gotten by with simply coding CFML in text or generic HTML editors, it's time for them to reconsider that approach with the enhancements to ColdFusion Studio. Some of the new features mentioned above are in fact features of Studio, or features that benefit from tight integration of Studio with the CF server. Key among those are the new interactive debugging and team development capabilities and server sandbox security. There are many others as well.

    The debugger is a fascinating new tool. Anyone who has developed even a modestly complex CF application will have encountered situations in which it's been hard to tell just what was going on with an errant application - whether that was knowing just what code was being executed or knowing the value of a given variable, etc. The debugger solves both problems by enabling a programmer to set breakpoints (or single-step through code) and by monitoring the value of nearly any portion of the environment, including program variables, session and application variables and recordsets. This can also be valuable when you're reviewing someone else's complex code. The debugger can be a tad unstable at times, seeming to become stuck, but it's easily reset in such a situation by pressing the "end debug session" button and debugging again. The benefits well outweigh any first-release challenges.

    The team deployment feature includes new integrated server-side source code control (SCC). Whereas previous releases of ColdFusion came bundled with Starbase versions - a fine LAN-based SCC tool - it became clear that Web-based team development was an entirely new animal that called for a more Web-centric, centralized and server-integrated approach. The new release incorporates server-side SCC via Microsoft Source Safe (not included) installed on the ColdFusion Server. (You can certainly continue to use existing client-side SCC packages.) Secure remote development via HTTP rounds out the package to provide more effective team deployment.

    Finally, the Sandbox Security feature is an evolutionary - but substantial - change in that it's now possible to create a greater segregation of working environments among team members on the same server (or, more important, unrelated workers in different applications on the same server).

    It might be easy to miss some other new enhancements to Studio because they're really enhancements to HomeSite and may be listed as such only in brochures and other descriptions (Studio is really just HomeSite on steroids, with added features to integrate with ColdFusion). Among the new features of HomeSite that "trickle up" to Studio users are:

  • Tag inspector
  • Tag tree
  • Site view
  • Codesweeper
  • Bookmarking
  • Style editor (CSS)
  • Color coding of script code
  • Support for SMIL and XML

    The two-way visual programming aspect of Studio/HomeSite is interesting and well suited to quick prototyping and creation of initial layouts, but many CF developers will find the feature less than ideal for designing CFML templates. Design mode, as it's called, doesn't render your templates as they will look when CFML tags are executed, so most of the design benefits are lost. Additionally, code alignment can be unexpectedly modified if edited in design mode. There's a "codesweeper" feature that can be turned on to try to compensate for that, but it may be more trouble than it's worth for CFML templates. Try it for yourself.

    A more welcome but perhaps easily missed change in 4.0 is that "projects" are no longer a means to create "virtual" collections of files from various directories. This approach had been problematic, especially in regard to keeping the project synchronized as files were added and removed. In 4.0, a project is simply any chosen directory (with optional subdirectories) that, once defined as a project, can then be quickly selected from the projects tab (eliminating the need to traverse the local or remote resource tabs). More important, projects have attendant features such as source code control and one-step upload capabilities (which include uploading only new or modified files as well as encrypting on upload). Projects can also be defined for remote servers (using RDS or FTP), which open such files to other project features, such as "extended find and replace" and "verify links."

    Server Enhancements
    Some of the new features in ColdFusion Server have clear benefits that are easily understood by most knowledgeable Web developers: automatic failover, dynamic load balancing, native database drivers, CORBA components, etc. The release notes are clear about these if you're not familiar with them, but others listed at the beginning of this article may still have you wondering:
    1. "Integrated authentication" is an Enterprise capability that relieves developers of the burden of developing custom login features; more important, it can integrate with NT domains and LDAP directory servers or custom user databases.
    2. The "open state repository" capability allows you to alter the location where the values of client variables (enabled via CFAPPLICATION CLIENTMANAGEMENT="yes") are stored on the server. Previously these were stored in the server's registry, but you may now indicate that they be stored in either a database table on the server or in the client's browser as cookies. This not only relieves the burden on server resources but also may open the door to using client variables in sites that previously restricted their use because of the registry burden, and it's the key to maintaining state in a clustered environment where a user's session may be passed across servers.

    3. XML integration is primarily embodied in an interesting new feature known as Web Distributed Data Exchange, or WDDX. Whereas much of the industry seems stuck on the idea of XML as a replacement for HTML, Allaire has realized that XML's key role will be to facilitate the exchange of complex data between servers or to/from more intelligent client-side applications. WDDX is a clever, simple, yet effective new tool for just that purpose. With it, CFML variables, data structures and CFQUERY recordsets can be translated into XML (and vice versa) to be passed to other servers, whether running CF or another server platform, or to a browser. It is powerful indeed. Also, a complete set of JavaScript functions is provided to facilitate the creation and use of these XML data structures in a browser-based application. See documentation on the CFWDDX tag for more info.

    Several other new enhancements to the server don't warrant mention in some of the high-level, marketing-oriented literature that lists new features, but sometimes it's the little things that'll solve a key problem. Among these are:

  • Improved exception handling, which enables more effective and directed trapping and handling of errors
  • Associative arrays, which enable the creation of complex but often easier-to-use data "structures"
  • CFCASE and CFSWITCH statements
  • Greater support for DBMS stored procedures
  • Support for OLE-DB for database connectivity
  • Integration with the NT performance monitor
  • Extended scripting, which provides a means of programming within CFML that's not so tied to "tag-based" programming and the limitations caused by that approach

    Schulze's article also described the powerful new concept of cached or "persistent" queries.

    Issue to Note
    Even with all the great new features of 4.0, there are still some issues that should be considered before the upgrade is implemented. First, be aware that (as of this writing) the Enterprise package's failover features don't yet work in an NT environment. This is a known issue and Allaire has pledged to offer a free 4.0.1 maintenance release soon to correct this. Similarly, the advanced security features couldn't be implemented initially in Solaris environments and will be corrected in 4.0.1.

    Another new improvement to CF is support for stricter code validation. There are several reasons for Allaire to implement this, but the downside is that existing code may no longer validate in the stricter validation. Fortunately, they've offered two tools to assist programmers with this aspect. A new syntax checker can be used to quickly and easily test existing code without relying on execution errors to identify validation errors. You can choose whether to enforce strict validation on a server by way of a setting in the Administrator that allows you to turn it on or off - with a caveat.

    Note: Even if you turn off Strict Validation in the Administrator, several changes in CFML syntax may cause legacy applications to fail if they're not corrected. You can't simply turn on 4.0 and turn off Strict Validation and expect all the applications to run. They likely won't. It's crucial that you run all existing templates through the new syntax checker to identify any such code.

    Fortunately, you can easily direct the syntax checker (available on the page at start>programs>coldfusion server>welcome to coldfusion) to check all files in a directory (or those matching a pattern). The checker is installed by default in the server's CFDOCS directory and may also be executed directly, such as with http://yourdomain.com/cfdocs/cfmlsyntaxcheck.cfm. Note: The checker reports only the first error in each template, so you'll want to rerun it after making changes until it reports no more errors in all checked templates.

    It's imperative that you make this information clear to all developers on your server prior to implementing 4.0.

    There are some other subtle changes in the new release. If you used CFEXIT to terminate a template's execution, you'll find that it doesn't terminate execution if it's executed within a template called by either CFINCLUDE or CFMODULE. The correct tag is CFABORT. (Technically, CFEXIT is for use in custom tags.) This behavior can cause real problems in code that depends on CFEXIT to terminate a process, such as in an included error-handling code fragment. Note also that CFEXIT has a new "method" attribute that can change its behavior still further.

    Other Improvements
    Still other changes fix limitations from previous releases. For instance, CFFILE now supports an "AddNewLine" attribute for the "Write" and "Append" actions. Set it to "No" to suppress adding a trailing newline character to the output. It defaults to "Yes" for backward compatibility. Those who tripped over this issue previously will be delighted by the news. And those who tried in previous releases to use CFPARAM to change a URL or FORM variable found that it wasn't allowed. In CF 4.0, these scopes are no longer read-only. This now makes it easy to indicate a default value for a URL or FORM variable if none is provided in the calling template. (The CGI scope remains read-only.)

    A new CFSETTING option called SHOWDEBUGOUTPUT can control the display of debugging data within portions of a template when debugging has been turned on in the Administrator. And finally, a new variable called EXECUTIONTIME is available for CFQUERY. Used as QUERY.EXECUTIONTIME (not a "queryname." prefix), it returns the time it took for the last query to execute.

    There are many other minor improvements like these. See the Release Notes, mentioned below, for more information.

    Finding Out More
    There are several ways you can learn more about CF 4.0. Of course, the documentation is always a good place to start in regard to technical details (and the docs in CF 4.0 have been improved substantially, with more examples, more detail and even new books). You can view these online at www.allaire.com/Documents/cf4docs.cfm.

    In addition to CFDJ, there are also Release Notes that explain several other issues of note at www.allaire.com/documents/cf4/allaire_support/releasenotes.cfm, as well as a "New Features" document that can be found at www.allaire.com/documents/cf4/allaire_support/cf4features.cfm.

    If you stop at those, however, you'll be missing out. Another important document you should read is called the "Documentation Update." You can find it at www.allaire.com/documents/cf4/allaire_support/cf4doc_update.cfm. This not only lists corrections to the printed docs but, even more important, it lists some new features that weren't documented at all.

    About 4.0.1 I'd previously mentioned some features that Allaire has publicly pledged to support in release 4.0.1, which is in beta as of this writing. Because of nondisclosure agreements, I can't release specifics regarding the update, but it's more than just a set of bug fixes. Be sure to check it out when it arrives. One thing I think I'm safe to speak of is that the hassle of not being able to test both the existence of a variable and its value in a single CFIF statement will soon be history. That makes 4.0.1 a must-have! Watch for it soon.

    With 4.0, Allaire created a solid platform for the next generation of commerce-ready Web applications and has taken another step toward becoming the worldwide leader in platform-independent Web development tools and application servers.

  • More Stories By Charlie Arehart

    A veteran ColdFusion developer since 1997, Charlie Arehart is a long-time contributor to the community and a recognized Adobe Community Expert. He's a certified Advanced CF Developer and Instructor for CF 4/5/6/7 and served as tech editor of CFDJ until 2003. Now an independent contractor (carehart.org) living in Alpharetta, GA, Charlie provides high-level troubleshooting/tuning assistance and training/mentoring for CF teams. He helps run the Online ColdFusion Meetup (coldfusionmeetup.com, an online CF user group), is a contributor to the CF8 WACK books by Ben Forta, and is frequently invited to speak at developer conferences and user groups worldwide.

    Comments (0)

    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.


    @ThingsExpo Stories
    High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available. In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, will discuss how by using...
    In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lead...
    SYS-CON Events announced today that Daiya Industry will exhibit at the Japanese Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ruby Development Inc. builds new services in short period of time and provides a continuous support of those services based on Ruby on Rails. For more information, please visit https://github.com/RubyDevInc.
    As businesses evolve, they need technology that is simple to help them succeed today and flexible enough to help them build for tomorrow. Chrome is fit for the workplace of the future — providing a secure, consistent user experience across a range of devices that can be used anywhere. In her session at 21st Cloud Expo, Vidya Nagarajan, a Senior Product Manager at Google, will take a look at various options as to how ChromeOS can be leveraged to interact with people on the devices, and formats th...
    SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
    SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
    As hybrid cloud becomes the de-facto standard mode of operation for most enterprises, new challenges arise on how to efficiently and economically share data across environments. In his session at 21st Cloud Expo, Dr. Allon Cohen, VP of Product at Elastifile, will explore new techniques and best practices that help enterprise IT benefit from the advantages of hybrid cloud environments by enabling data availability for both legacy enterprise and cloud-native mission critical applications. By rev...
    Organizations do not need a Big Data strategy; they need a business strategy that incorporates Big Data. Most organizations lack a road map for using Big Data to optimize key business processes, deliver a differentiated customer experience, or uncover new business opportunities. They do not understand what’s possible with respect to integrating Big Data into the business model.
    Recently, REAN Cloud built a digital concierge for a North Carolina hospital that had observed that most patient call button questions were repetitive. In addition, the paper-based process used to measure patient health metrics was laborious, not in real-time and sometimes error-prone. In their session at 21st Cloud Expo, Sean Finnerty, Executive Director, Practice Lead, Health Care & Life Science at REAN Cloud, and Dr. S.P.T. Krishnan, Principal Architect at REAN Cloud, will discuss how they b...
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
    SYS-CON Events announced today that Dasher Technologies will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
    SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
    SYS-CON Events announced today that TidalScale, a leading provider of systems and services, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
    SYS-CON Events announced today that TidalScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
    Amazon is pursuing new markets and disrupting industries at an incredible pace. Almost every industry seems to be in its crosshairs. Companies and industries that once thought they were safe are now worried about being “Amazoned.”. The new watch word should be “Be afraid. Be very afraid.” In his session 21st Cloud Expo, Chris Kocher, a co-founder of Grey Heron, will address questions such as: What new areas is Amazon disrupting? How are they doing this? Where are they likely to go? What are th...
    SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
    Infoblox delivers Actionable Network Intelligence to enterprise, government, and service provider customers around the world. They are the industry leader in DNS, DHCP, and IP address management, the category known as DDI. We empower thousands of organizations to control and secure their networks from the core-enabling them to increase efficiency and visibility, improve customer service, and meet compliance requirements.
    Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
    SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
    In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ...