An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

CFUI Tags - Just Say No!

January 25, 2014 ·

Back in June 2007, I gave a talk at CFUnited about the very exciting, soon-to-be-released "AJAX Integration with ColdFusion 8" features. I am an unabashed server-side guy who is hopeless at front end development so I was very enamored of the (then) new cflayout, cfdiv, cfajaxproxy, data binding, and - I'm now ashamed to admit it - cfpod!

Yes, it's right there on slide 31 of my CFUnited 2007 presentation about the CFUI tags. I even had downloadable demo code that included cfpod!

CFML makes hard stuff easy and for me, back then, UI was hard. But that was nearly seven years ago and much has changed!

I'm still not great at front end stuff, but I can write some JavaScript (even tho' I hate the language) and I can wrestle jQuery into submission when I have to. Heck, only the other day I created a table-based view that dynamically filled in each row asynchronously using raw jQuery and simple server requests!

The truth is, those CFUI tags, they're a terrible thing. They're tied to the product, they don't get upgraded very often, and when they do, they break your existing, working web site! And, really, it's not that hard to do it yourself with any number of relatively easy-to-use JavaScript libraries out there!

Don't take my word for it! Ray Camden wants you to do your user interface the right way and Adam Cameron thinks you're a bloody wanker if you use the CFUI tags! I agree! I was that bloody wanker. I got better! You should get better too!

By the way, if you use Railo, this doesn't apply to you because Railo very sensibly decided not to implement the silly UI tags that appeared in ColdFusion 8. We complained at the time, but they were right. It was for our own good!

Tags: cfunited07 · coldfusion · javascript · jquery

3 responses

  • 1 Adam Cameron // Jan 26, 2014 at 1:43 AM

    Cheers for the plug, Sean!

    Lovely slide deck that one, btw ;-)

    --
    Adam
  • 2 John C Bland II // Jan 26, 2014 at 9:33 AM

    I can't believe they are still in use enough to need more convincing not to use them.
  • 3 Ryan Cogswell // Jan 27, 2014 at 8:01 AM

    I'm looking for the "like" button for this article. At the time when CF 8 came out, some of it really was a good idea (temporarily). JavaScript libraries had not yet matured to the point of making a lot these things as easy as they were with the new CF tags.
    We used cflayout to implement tabs on a couple pages, and, at that time, it seemed like a big improvement over directly using available JavaScript libraries directly. Boy did that change quickly. In 2013 we finally purged our system of the last remaining usages of CF UI tags. Most of them were replaced by JQuery UI, but over the next year a lot of our usages of JQuery UI will probably be replaced by JQuery Mobile, and so the pace of change in the JavaScript world continues to far outpace the rate of change from CF releases.