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, Adobe Flex

ColdFusion: Article

Isn't It About Time to Dump CF5?

Going from CF5 to CFMX7

A new project just landed on my desk. This is not a maintenance project; it's brand new, start from scratch, development. The client asked me to build a site in ColdFusion 5. It's my fourth project in the past year that's based on a legacy version of CF. I could have saved the client both time and money by building it in CFMX, since I have a lot of the functionality pre-built as ColdFusion Components. But CFCs don't work in CF5, so those pre-built components are pretty useless. There's no better time to upgrade than right now; in this article I thought I'd show you the process I'd take when upgrading a server from CF5 to CFMX7.

The Upgrade
There are compelling reasons to get off CF5. For developers, it's the use of CFCs that let you build more maintainable code. For business folk, it's support. It's harder to find CF5-based developers and I suspect that when CFMX8 comes out, support for CF5 will drop. If they follow an 18-month release schedule, then I'm sure it will happen within the next year. Other niceties like PDF generation and event gateways make the upgrade more appealing. So let me step you through the process.

First download the latest version of ColdFusion. You can do so from the Adobe Web site. The J2EE version is a slightly different beast so I'll just step you through the standard install. It's closest to the CF5 installation. The J2EE version, if you already have a J2EE server, can create multiple isolated ColdFusion instances. This is great if you have to isolate apps from each other, but I don't usually use this. You can get the same functionality from the multi-server install (and it's easier to manage).

Launch the install program, and follow these steps:

  1. Select your language and click Okay. Read the introduction note. There are no decisions to make on this screen so click Next. Read through the license agreement and select "I agree" then click Next. These were the easy steps.
  2. Enter your license number or select the trial/developer edition. For this example, the developer edition is okay. Select it, and click Next.
  3. This screen in Figure 1 lets you select which version to install. I've already mentioned versions, but you can read more details about them in the livedocs at http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000003.htm#1211441. Select "server" and click Next.
  4. This screen lets you select the sub-components you want to install. There are three options, the documentation, the search services, and the ODBC services. I won't install the tutorials or documentation on a production server, but I usually keep the other two. On a dev server I usually install it all. Click Next.
  5. Select the directory that you want to install to. I usually keep the default. Click Next.
  6. A previous version was detected, as shown in Figure 2. You can use the built in the Web server or reconfigure the existing Web server. We want to reconfigure. Click Next. The installer will detect your Web server. You're given the option of configuring multiple Web sites. On Windows XP, IIS doesn't let you have multiple Web sites, so select Update All and click Next. Enter your Web root and click Next.
  7. Enter the password for the ColdFusion Administrator. Click Next and enter the password for RDS. Click Next.
  8. You'll get a summary of the install options, as shown in Figure 3. Review them and click Install. ColdFusion will start installing. Go top off your drink of the day (coffee, water, or vodka).
  9. When you come back, CF should be installed.
Now that ColdFusion is installed, you have to configure it. This happens the first time you open the ColdFusion Administrator, or you could select the checkbox on the final install screen to do the configuration manually. Click Done (and check the box) to enter the configuration wizard, as shown in Figure 4.
  1. Enter your ColdFusion Administrator password and click Login.
  2. ColdFusion will chug for a bit and then give you the option of migrating your settings. You probably want to do this, so click Next. If you want to start CFMX new and configure it as needed you can skip this.
  3. You'll see a list of items that can be migrated. Datasources, verity collections, and mappings are just some of them. Click Next.
  4. ColdFusion will chug some more. It will let you know if there are any problems. Click Next to start the migration.
  5. Once again, the setup wizard chugs and lets you know that things were done. Click Ok to open the Getting Started experience (if you installed he samples / documentation).
The Code Analyzer
Before upgrading a production machine, you might want to test your apps on a development machine first. I strongly recommend it, especially when moving from ColdFusion 5 to ColdFusion MX. ColdFusion 5 was built on a C++ architecture, whereas CFMX is on top of J2EE. These changes in underlying structure introduced a few oddities to the language. Most of your code will work without a problem, and there are many upgrade success stories. But, for those few gotchas it's good to test. To help alleviate the migration problem, the ColdFusion administrator includes a code analyzer. It will examine your code and help isolate problems or potential problems. (The code analyzer also helps if you're just upgrading from CFMX to CFMX7, although you're less likely to have serious issues). Once ColdFusion's installed, launch the administrator and sign in. Select Code Analyzer under the "Debugging and Logging" menu. You'll see a screen like Figure 5.

Enter the name of your directory, the type of files to analyze, and click the run analyzer option. For the file types, most likely you'll be analyzing cfm files and therefore want to use the default "*.cfm" as the type. If you've used some tricks on the Web server to make ColdFusion process files with alternate extensions such as HTML then you'll want to add those extensions here. Click the advanced options feature, and you'll see Figure 6. This lets you specify which tags, functions, or issues to look for in your code. Normally, I'd just use the basic option, but if you need this kind of granular control it's there.

Click Run Analyzer and you should a list similar to Figure 7. (Or maybe you code perfectly and get nothing returned.) You can sort the listing by clicking on the column headers. Click the first icon to see a detailed report of the errors. Click on the second to see a file specific.

I don't recommend using the code analyzer as a substitute for doing quality assurance tests on your apps, but it's a good starting point to figure out what areas may need code changes.

Here are some of the most common issues I've faced when upgrading:

  • Security Model: The security model changed in moving off the C code base. Many tags and functions related to the CF5 way of doing things have been rendered obsolete. Tags such as cfauthenticate and cfimpersonate are gone. Functions such as isAuthorized, isAuthenticated, and AuthenticatedUser are gone. Take a look at cflogin and cfloginuser for information on ColdFusion's new security features. (You didn't use that old security framework anyway, did you?)
  • Monitor Errors: CF5 had an error type for the cferror called monitor. Monitor was so you could follow specific error types. It trumped cftry / cfcatch blocks. This kind of error handling is gone.
  • Graphing: cfgraph and cfgraphdata are gone. Instead look at cfchart, cfhartdata, and cfhartseries.
  • Dynamic Database Access: ColdFusion 5 lets you use connections strings to connect to the database. This was useful in many cases, especially shared hosting environments and preventing other people on your server from guessing your DSN and getting access to all of your data. Connection strings were added to BlueDragon.net, but with ColdFusion the best you're going to get is a security sandbox that restricts database access.
  • Registry Access: The cfregistry tag no longer works on Unix machines. Unix doesn't have a registry in the same way that ColdFusion does; so that's not a surprise.
  • Periods in the Variable Name: In CF5, the period was valid in a variable name. In CFMX, a structure will be created. The text before the period will be the structure name and the text after the period will be the key. This is called dot notation and is similar to how you access many values in CF, such the results of a query set.
  • ODBC: This is more of a configuration issue than a coding issue. In CF5, ColdFusion could access datasources created in the ODBC control panel by default. Since CFMX is Java-based, it uses JDBC instead of ODBC. You can access control panel databases uses an ODBC bridge, or connect to the database directly using the JDBC drivers included.
There's some documentation included with CFMX6 that talks about migrating from 5 to MX. It's worth a read since it goes into more depth than this article. Check it out at http://livedocs.macromedia.com/coldfusion/6/ Migrating_ColdFusion_5_Applications/cf_migration_guide.htm.

Final Thoughts
It seems weird to be writing about this so long after the initial release of CFMX. I look forward to the day when I can remove CF5 from my machine and clients will stop asking me for version 5-compatible code (I've started turning down requests for 4.5 development). Until then, I keep ColdFusion 5, ColdFusion MX, and BlueDragon running side-by-side. This is beneficial when it comes to migrating apps between versions or testing code for cross-version compatibility. I described this set up in an article I co-wrote with Charlie Arehart at http://coldfusion.sys-con.com/read/42069.htm. Although it's a bit dated, all the techniques still apply.

More Stories By Jeffry Houser

Jeffry is a technical entrepreneur with over 10 years of making the web work for you. Lately Jeffry has been cooped up in his cave building the first in a line of easy to use interface components for Flex Developers at www.flextras.com . He has a Computer Science degree from the days before business met the Internet and owns DotComIt, an Adobe Solutions Partner specializing in Rich Internet Applications. Jeffry is an Adobe Community Expert and produces The Flex Show, a podcast that includes expert interviews and screencast tutorials. Jeffry is also co-manager of the Hartford CT Adobe User Group, author of three ColdFusion books and over 30 articles, and has spoken at various events all over the US. In his spare time he is a musician, old school adventure game aficionado, and recording engineer. He also owns a Wii. You can read his blog at www.jeffryhouser.com, check out his podcast at www.theflexshow.com or check out his company at www.dot-com-it.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
R Martin Ladner 06/08/06 05:24:28 PM EDT

- We host a site that started off nicely in ColdFusion (4.5 -> 5) but has the misfortune to have been added to in whatever language the latest contract programmer liked. (We keep it available and do remedial programming; another firm has the contract for routine programming of major modules.) Thus although the initial functionality (and most of the admin services) are handled by ColdFusion (5), it also provides functionality using ASP, Java Servlets, and Java Server Pages. The most fragile portions of the site are the ones relying on specific java configurations. (Yes, there are several.) Installing yet another java environment has the potential to kill the whole thing.
- I'm not anxious to spearhead a transition to CFMX. I'd like Java to settle down to where frequent updates aren't needed for the infrastructure. And, I'd like JDBC to become a bit more mature before I have to rely on it for the portions of the application that have been rock solid (via CF 5 and ODBC) thus far. =Marty=

CFDJ News Desk 06/03/06 04:21:11 PM EDT

A new project just landed on my desk. This is not a maintenance project; it's brand new, start from scratch, development. The client asked me to build a site in ColdFusion 5. It's my fourth project in the past year that's based on a legacy version of CF. I could have saved the client both time and money by building it in CFMX, since I have a lot of the functionality pre-built as ColdFusion Components. But CFCs don't work in CF5, so those pre-built components are pretty useless. There's no better time to upgrade than right now; in this article I thought I'd show you the process I'd take when upgrading a server from CF5 to CFMX7.

@ThingsExpo Stories
DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that Conference Guru has been named “Media Sponsor” of the 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to gre...
The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and shared the must-have mindsets for removing complexity from the develop...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked 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 m...
"Evatronix provides design services to companies that need to integrate the IoT technology in their products but they don't necessarily have the expertise, knowledge and design team to do so," explained Adam Morawiec, VP of Business Development at Evatronix, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
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, discussed how from store operations and ...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, 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 buye...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, 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.