Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Computing
Conference & Expo
November 2-4, 2009 NYC
Register Today and SAVE !..
SYS-CON.TV
Today's Top SOA Links


Yes, Yes, It Can Scale!
Yes, Yes, It Can Scale!

Barely a day goes by without someone wanting me to reassure them that ColdFusion scales. Whether it's Web administrators who are experiencing poor application performance, partners who want to be sure ColdFusion can handle their anticipated load, developers whose bosses are threatening their jobs over failed deployments, or press and analysts positioning ColdFusion as a "low-end solution." Whichever it is, inevitably I end up in the position of defending ColdFusion and its scalability.

Well, enough is enough. I'm going to set the record straight, even if I offend folks in the process. I was one of ColdFusion's first end users and I still write lots of ColdFusion code. I've been involved in helping direct ColdFusion's development through several major releases, and I'm the author of the best-selling books on ColdFusion. I also spend a considerable amount of time interacting with other ColdFusion developers. Without blowing my own horn too much, I think I am more than qualified to address this issue. So here goes.

Yes, like the rest of you, I have heard those statements positioning ColdFusion as an "entry-level" or "low-end" solution. And I also think I know how ColdFusion earned that reputation. Do any of you write in Visual Basic? If so, you know that "real programmers" don't take you or your code seriously. Visual Basic suffers from an image problem, even though thousands of corporations trust the language with mission-critical applications. Why is that? Simply because Visual Basic makes application development easy, even fun - and any language that's easy just can't be a high-end tool, can it? After all, if you want to write high-end code you need expensive tools, a massive learning curve and complex language elements - or so some developers would have you believe.

And while I'm not going to get into a debate on the pros and cons of Visual Basic, I do believe that ColdFusion suffers from the exact same image problem.

The single most important aspect of ColdFusion - the feature that in my opinion has made ColdFusion as successful as it is - is its ease of use. As every one of you knows, with ColdFusion you really can hit the ground running. Most ColdFusion developers are knocking out working code within hours of installing the product - and not just experimental code. I'm talking about real working applications interacting with real live data. That's what we love about the product - how quickly and efficiently we can get tasks done. But ColdFusion's minimal learning curve and incredible ease of use is a double-edged sword. Yes, it makes our lives easier and lets us get our jobs done quicker, but at the same time, to many, it clearly positions the product as a low-end tool.

Let me put it another way. If Allaire had made the product more complicated and required a massive learning curve - if developers had to understand the technicalities of features like C's pointers, C++'s polymorphism and Java's garbage collection - if there were complex compile and link steps needed before you could test a change - well, then ColdFusion would be perceived as a high-end tool. Talk about irony.

Now in all fairness, there's some truth to this perception (for both ColdFusion and Visual Basic). Let me explain.

Part of the reason that more complex languages are perceived as higher-end tools is that the tools are so difficult to learn that by the time developers are writing real code they've already learned the dos and don'ts of application development - that and the fact that the learning process generally tends to eliminate less experienced developers.

Thus most developers who write in those languages are writing better code. But that has nothing to do with the language itself. Rather, it has to do with the developers, their experience and the kind of code they write.

And that, I believe, is the real issue.

Most ColdFusion developers lack the background and discipline of traditional application development. That's not a bad thing; on the contrary, it's exactly what Allaire intended. Web application development should be accessible to all developers regardless of prior experience. At the same time, when ColdFusion doesn't scale, it's completely unfair to point fingers at the product rather than to the true source of the problem.

ColdFusion development is easy; good ColdFusion development is not. Writing solid, robust and effective ColdFusion code requires that you master a diverse range of skills - from basic coding techniques, code organization, reuse, and memory and cache management to database design and interaction. And for the record, when I have helped debug or diagnose scalability problems, 99 out of 100 times that last item has been the culprit (which is why I dedicated two entire columns to it - see CFDJ Vol. 1, issues 2 and 3).

A reader who sent me a message in response to my column on query caching (CFDJ Vol. 1, issue 2) said he had been close to dumping ColdFusion because it couldn't scale - that was until he implemented some of the caching suggestions I offered. He wrote that the site now runs 10 times as fast as it did, and he is definitely not going to dump ColdFusion any time soon. And while I'm glad I was able to help, I wonder how many other developers are blaming ColdFusion when it is definitely not the problem.

If you're concerned about scalability (and you should be), consider the following:

  • Clean up your code - obfuscated code is hard to read and hard to maintain, and it makes ColdFusion have to work harder too.
  • Break your code into small, bite-sized chunks - smaller code blocks can be reused easier, they can be cached more effectively and they help avoid code obfuscation.
  • Use the tools the language offers - arrays and structures are a little harder to use than simple variables, but using them correctly can improve code performance dramatically.
  • Optimize database activity - from the right relational database design, optimized SQL, and the appropriate use of keys and indexes to the right kind of hardware and caching configurations - all of these impact scalability.
  • Eliminate unnecessary database access and processing - caching, caching, caching - the sites that scale best are designed not to hit databases or perform complex processing unless absolutely necessary.
  • Perform regression testing and load impact analysis before deploying your application - the fact that an app works on your desktop doesn't mean it'll work well under a heavy load. Plus it's highly unlikely that the way you tested the app and the way end users use it will be the same. The application will probably be stressed where you least expect it. Use ColdFusion's performance monitoring and logging options - hey, if ColdFusion is telling you there's a problem, the least you can do is listen.

  • Set up server clusters. Machines go down - it's a fact of life. Always strive to eliminate any single point of failure. ColdFusion Enterprise comes with clustering technologies that may be used on their own or in conjunction with hardware-based solutions to ensure uptime.

    This is just a high-level list of ideas, and the list is definitely not complete (although it's potential fodder for future columns).

    I've seen some truly great code written in ColdFusion - two exceptional examples within the past few weeks alone (I'm not going to mention company names; I have no permission to do so. Suffice it to say that both are high-visibility public e-commerce sites with highly recognizable branding). Both were developed in ColdFusion by developers with extensive development experience and the ability to apply that experience to ColdFusion development. I've also seen some truly horrid ColdFusion code (heck, I even wrote some of it myself, back when I was first starting). Great code and horrid code - both are possible, both are doable and both are fully supported by ColdFusion.

    I'm not saying you can't be a good ColdFusion developer without prior development experience. But I am definitely saying that if you think you'll be knocking out bulletproof code minutes after installing ColdFusion for the first time, you're sadly mistaken. Don't confuse the euphoria you experience from seeing your first apps work with the confidence that you're ready to roll out production-quality code.

    Here's the bottom line. The next time you're running into scalability problems, remember this: ColdFusion is not an application, it's a toolbox.

    You can use the tools in your toolbox to build a great house. You can also use those same tools to build a really terrible one. It's not the tools, it's how you use them.

    And that's why I titled this column ColdFusion "CAN Scale," not ColdFusion "DOES Scale." Yes, ColdFusion CAN scale. Will it? Well, that's up to you.

    About Ben Forta
    Ben Forta is Adobe's Senior Technical Evangelist. In that capacity he spends a considerable amount of time talking and writing about Adobe products (with an emphasis on ColdFusion and Flex), and providing feedback to help shape the future direction of the products. By the way, if you are not yet a ColdFusion user, you should be. It is an incredible product, and is truly deserving of all the praise it has been receiving. In a prior life he was a ColdFusion customer (he wrote one of the first large high visibility web sites using the product) and was so impressed he ended up working for the company that created it (Allaire). Ben is also the author of books on ColdFusion, SQL, Windows 2000, JSP, WAP, Regular Expressions, and more. Before joining Adobe (well, Allaire actually, and then Macromedia and Allaire merged, and then Adobe bought Macromedia) he helped found a company called Car.com which provides automotive services (buy a car, sell a car, etc) over the Web. Car.com (including Stoneage) is one of the largest automotive web sites out there, was written entirely in ColdFusion, and is now owned by Auto-By-Tel.

  • In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    Ok, so how do I learn how to administer our cold fusion web site so it scales properly and write optimized code? What books would you recommend to a programmer who's self-taught and has been developing programs for a hospital for 4 years (in VB, javascript, DHTML, ASP, Perl and now CF)?

    test


    Your Feedback
    Kevin Trammel wrote: Ok, so how do I learn how to administer our cold fusion web site so it scales properly and write optimized code? What books would you recommend to a programmer who's self-taught and has been developing programs for a hospital for 4 years (in VB, javascript, DHTML, ASP, Perl and now CF)?
    wrote: test
    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

    SYS-CON Featured Whitepapers
    ADS BY GOOGLE