Thursday, 23 January 2014

Oi! You bloody wankers! Stop using ColdFusion UI controls

So Ray's pipped me here slightly, but fair enough cos he's done all the work so far. See his own blog article "I'm not going to tell you to stop using ColdFusion UI tags anymore...", which covers exactly the same ground I'm gonna cover here. Except he's more polite.

For the last few months meself and some others (very notably Scott Stroz) have bee actively discouraging people from using CFML's UI widgets. IE: stuff like <cfform>, <cfwindow>, <cfpod> (I don't know anyone ever using <cfpod>, that said), when people raise questions about it on Stack Overflow, Twitter, and similar forums.

Ray and I got talking, and we'd both come to a similar conclusion that it's one thing to say "don't use that shit", but limiting the advice to that level is just appealing to dogma more than anything else, ie: "we're pronouncing that thou shalt not use these things... just... err... well because", rather than being more pragmatic and helpful, and saying "here's what you can do instead". I'm personally a bit stymied as far as "here's what you can do instead", because I don't even know what most of the CFUI controls actually do, let alone having believable-enough UI credentials to offer alternatives. And that's what the - very sound, I hasten to add - advice not to use these things has lacked: an alternative.

The thing is that when a journeyman CFML developer, or a seasoned CFML developer, but an unconfident UI developers, the CFUI stuff might seem like a really good option. You know, that old trope of ColdFusion marketing "making hard things easy". The problem is that it might have been true back in the mid-2000s decade, before every man and his dog had a UI framework / library / lifestyle-choice of their own, and I think CFUI stuff, it's simply not true any more. The CFUI stuff is cumbersome, out-of-date, and fairly pedestrian in what it delivers. Compare this to what's so easy to achieve with JQuery(/UI), AngularJS, Bootstrap, and the myriad of other solutions out there, which are just... brilliant at what they do. And stay contemporary. And see enhancements all the time. And are written by industry-leaders in the given field. The chief problems with ColdFusion's CFUI solutions are precisely that they are not brilliant, have not stayed contemporary (even to a minimum level of acceptability), and weren't written by industry leaders (or, indeed, even industry members: Adobe's ColdFusion team aren't even web developers, let along CFML developers). And whilst they do one thing adequately well, once one wants to do more than just that... it becomes hard to impossible to do so. They really were / are very poorly-engineered solutions with no foresight employed at all. Basically they were designed to look shiny when presented to someone with purse-strings (ie: they were designed to sell CF licences), but once one goes to use them, they only ever get one 80% of the way there, and the final 20% is locked away under ColdFusion's hood.

However if someone was thinking that <cfprogressbar> might be the thing for them, if there's a resource that gives a better-solution alternative for them, then they'll probably (hopefully!) use it. And perhaps we can help wean the CFML community off the CFUI stuff which will just ultimately cause them anguish anyhow.

Equally, and to an extent more importantly, I hear too many CFML developers still saying "but I don't know JavaScript, so it's good to have CF do it for me". No. Do not take that approach. Learn JavaScript. You're a web developer and you must know JavaScript. It was an annoying "nice to have" ten years ago, but it's essential for you now. So if you catch yourself thinking that... bad you... and just do it properly.

Anyway, the project has only an intro page for the time being, but at least it's a start. It's homed here: "ColdFusion UI the Right Way". If you wanna help out... let us know.

Do you know the funny thing in all this? To be able to document how to not use a given CFUI control, I'm gonna have to actually use the damn things first, to find out what they do. And then work out how to achieve the same ends in JQuery (etc). The first half of that is a productivity sinkhole: I don't want to know how to use these CFUI things. However learning how to do them better via contemporary options is something I'm long overdue to get into.



PS: Ray, dunno if you noticed, but I did manage to sneak the words "oi" "bloody" and "wankers" into this article, as discussed. Did you notice them?