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
    Nordstrom is transforming the way that they do business and the cloud is the key to enabling speed and hyper personalized customer experiences. In his session at 21st Cloud Expo, Ken Schow, VP of Engineering at Nordstrom, will discuss some of the key learnings and common pitfalls of large enterprises moving to the cloud. This includes strategies around choosing a cloud provider(s), architecture, and lessons learned. In addition, he’ll go over some of the best practices for structured team migrat...
    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/.
    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.
    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 bu...
    Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, will discuss how from store operations...
    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...
    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 Datera 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. Datera offers a radically new approach to data management, where innovative software makes data infrastructure invisible, elastic and able to perform at the highest level. It eliminates hardware lock-in and gives IT organizations the choice to source x86 server nodes, with business model option...
    With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
    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.
    Digital transformation is changing the face of business. The IDC predicts that enterprises will commit to a massive new scale of digital transformation, to stake out leadership positions in the "digital transformation economy." Accordingly, attendees at the upcoming Cloud Expo | @ThingsExpo at the Santa Clara Convention Center in Santa Clara, CA, Oct 31-Nov 2, will find fresh new content in a new track called Enterprise Cloud & Digital Transformation.
    SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
    SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of 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. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp emp...
    Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
    SYS-CON Events announced today that Avere Systems, a leading provider of hybrid cloud enablement solutions, 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. Avere Systems was created by file systems experts determined to reinvent storage by changing the way enterprises thought about and bought storage resources. With decades of experience behind the company’s founders, Avere got its ...
    SYS-CON Events announced today that Avere Systems, a leading provider of enterprise storage for the hybrid cloud, 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. Avere delivers a more modern architectural approach to storage that doesn't require the overprovisioning of storage capacity to achieve performance, overspending on expensive storage media for inactive data or the overbui...
    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.
    SYS-CON Events announced today that Ryobi Systems 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. Ryobi Systems Co., Ltd., as an information service company, specialized in business support for local governments and medical industry. We are challenging to achive the precision farming with AI. For more information, visit http:...
    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...