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
    SYS-CON Events announced today that Technologic Systems Inc., an embedded systems solutions company, will exhibit at SYS-CON's @ThingsExpo, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Technologic Systems is an embedded systems company with headquarters in Fountain Hills, Arizona. They have been in business for 32 years, helping more than 8,000 OEM customers and building over a hundred COTS products that have never been discontinued. Technologic Systems’ pr...
    SYS-CON Events announced today that CA Technologies has been named “Platinum Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY, and the 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CA Technologies helps customers succeed in a future where every business – from apparel to energy – is being rewritten by software. From ...
    The taxi industry never saw Uber coming. Startups are a threat to incumbents like never before, and a major enabler for startups is that they are instantly “cloud ready.” If innovation moves at the pace of IT, then your company is in trouble. Why? Because your data center will not keep up with frenetic pace AWS, Microsoft and Google are rolling out new capabilities In his session at 20th Cloud Expo, Don Browning, VP of Cloud Architecture at Turner, will posit that disruption is inevitable for c...
    SYS-CON Events announced today that Cloudistics, an on-premises cloud computing company, has been named “Bronze Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Cloudistics delivers a complete public cloud experience with composable on-premises infrastructures to medium and large enterprises. Its software-defined technology natively converges network, storage, compute, virtualization, and management into a ...
    Keeping pace with advancements in software delivery processes and tooling is taxing even for the most proficient organizations. Point tools, platforms, open source and the increasing adoption of private and public cloud services requires strong engineering rigor - all in the face of developer demands to use the tools of choice. As Agile has settled in as a mainstream practice, now DevOps has emerged as the next wave to improve software delivery speed and output. To make DevOps work, organization...
    SYS-CON Events announced today that Loom Systems will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Founded in 2015, Loom Systems delivers an advanced AI solution to predict and prevent problems in the digital business. Loom stands alone in the industry as an AI analysis platform requiring no prior math knowledge from operators, leveraging the existing staff to succeed in the digital era. With offices in S...
    The explosion of new web/cloud/IoT-based applications and the data they generate are transforming our world right before our eyes. In this rush to adopt these new technologies, organizations are often ignoring fundamental questions concerning who owns the data and failing to ask for permission to conduct invasive surveillance of their customers. Organizations that are not transparent about how their systems gather data telemetry without offering shared data ownership risk product rejection, regu...
    SYS-CON Events announced today that Interoute, owner-operator of one of Europe's largest networks and a global cloud services platform, has been named “Bronze Sponsor” of SYS-CON's 20th Cloud Expo, which will take place on June 6-8, 2017 at the Javits Center in New York, New York. Interoute is the owner-operator of one of Europe's largest networks and a global cloud services platform which encompasses 12 data centers, 14 virtual data centers and 31 colocation centers, with connections to 195 add...
    SYS-CON Events announced today that SoftLayer, an IBM Company, has been named “Gold Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2016, at the Javits Center in New York, New York. SoftLayer, an IBM Company, provides cloud infrastructure as a service from a growing number of data centers and network points of presence around the world. SoftLayer’s customers range from Web startups to global enterprises.
    SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 20th International Cloud Expo, which will take place on June 6–8, 2017, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buyers...
    SYS-CON Events announced today that T-Mobile will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. As America's Un-carrier, T-Mobile US, Inc., is redefining the way consumers and businesses buy wireless services through leading product and service innovation. The Company's advanced nationwide 4G LTE network delivers outstanding wireless experiences to 67.4 million customers who are unwilling to compromise on ...
    SYS-CON Events announced today that Infranics will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Since 2000, Infranics has developed SysMaster Suite, which is required for the stable and efficient management of ICT infrastructure. The ICT management solution developed and provided by Infranics continues to add intelligence to the ICT infrastructure through the IMC (Infra Management Cycle) based on mathemat...
    SYS-CON Events announced today that SD Times | BZ Media has been named “Media Sponsor” of SYS-CON's 20th International Cloud Expo, which will take place on June 6–8, 2017, at the Javits Center in New York City, NY. BZ Media LLC is a high-tech media company that produces technical conferences and expositions, and publishes a magazine, newsletters and websites in the software development, SharePoint, mobile development and commercial UAV markets.
    SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 20th International Cloud Expo, which will take place on June 6–8, 2017, at the Javits Center in New York City, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
    In his keynote at @ThingsExpo, Chris Matthieu, Director of IoT Engineering at Citrix and co-founder and CTO of Octoblu, focused on building an IoT platform and company. He provided a behind-the-scenes look at Octoblu’s platform, business, and pivots along the way (including the Citrix acquisition of Octoblu).
    "I think that everyone recognizes that for IoT to really realize its full potential and value that it is about creating ecosystems and marketplaces and that no single vendor is able to support what is required," explained Esmeralda Swartz, VP, Marketing Enterprise and Cloud at Ericsson, in this SYS-CON.tv interview at @ThingsExpo, held June 7-9, 2016, at the Javits Center in New York City, NY.
    SYS-CON Events announced today that HTBase will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. HTBase (Gartner 2016 Cool Vendor) delivers a Composable IT infrastructure solution architected for agility and increased efficiency. It turns compute, storage, and fabric into fluid pools of resources that are easily composed and re-composed to meet each application’s needs. With HTBase, companies can quickly prov...
    Web Real-Time Communication APIs have quickly revolutionized what browsers are capable of. In addition to video and audio streams, we can now bi-directionally send arbitrary data over WebRTC's PeerConnection Data Channels. With the advent of Progressive Web Apps and new hardware APIs such as WebBluetooh and WebUSB, we can finally enable users to stitch together the Internet of Things directly from their browsers while communicating privately and securely in a decentralized way.
    DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm.
    What sort of WebRTC based applications can we expect to see over the next year and beyond? One way to predict development trends is to see what sorts of applications startups are building. In his session at @ThingsExpo, Arin Sime, founder of WebRTC.ventures, will discuss the current and likely future trends in WebRTC application development based on real requests for custom applications from real customers, as well as other public sources of information,