Saturday, 7 February 2015

Lucee: does its future include CFML?

G'day:
There's a lively thread on the Lucee Google Group at the moment: "Outsider Perspective". There's a fair bit of cruft in there... OK, it's mostly cruft... but there was one very interesting comment from Micha:

ACF compatibility
[...]
So what could be the medium for Lucee, that is very simple, the medium are templates (.cfc,.cfm).
What if Lucee acts different depending on the file extension.
So all templates with .cfm and .cfc extensions are still handled the old way, but files with the extension .lucee are handled in a modern way. this gives you the opportunity to still use your old code but you can extend it with new one and you have no confuguration nightmare anymore!

My emphasis, obviously.

Hmmmm. I tried to get Micha to elaborate for a public audience, but he hasn't been forthcoming yet, leaving it up to community speculation. Most of the speculation thusfar has been around what the file extension should be (yes, really), and no real grist. I've been holding off on that thread until Micha antes-up a bit.

However, on this blog... I'll allow myself to speculate away like nobody's business...

CFML is Dead and doesn't know it

I saw a movie once... and I'm damned if I can remember what movie it was... but it had a nasty assassin person in it who in one scene killed one of his opposition by covertly slicing their femoral artery open whilst in the middle of talking to them. The victim took a moment to realise what happened, and commenced flailing around in panic as one might expect in the circumstances. The assassin, still there, consoled the victim saying "it's OK. It's done. It's finished. It's OK. You're OK. Just let yourself go, etc", in a genuinely sympathetic sort of way. It was dead gruesome. The victim wouldn't accept they were already dead, for all intents and purposes; the assassin knew better: one does not recover from a sliced femoral artery.

Update:

Duncan found the reference. It was Drive, and it was Albert Brooks vs Bryan Cranston. And his arm, not his leg. Here's the clip - fast forward to 3m10s (warning, it's not for the faint-hearted):



Why am I saying this? Because the CFML community is the victim in this scenario, and the greater IT industry is the assassin. Sorry - and, hey, it's been a while since someone said this - but CFML is dead. As a language it's well and truly in maintenance mode. It's market share will decline - although it will take an awful long time to dissipate entirely - and it will cease being relevant within a 3-4yrs, I should think.

To everyone in the CFML community clinging onto it for your livelihood: wake up. Your days are numbered. Your femoral artery is cut. If you don't agree with this you are simply in denial. That's the long and the short of it.

Lucee

I think Micha has a good idea here.

There's nothing intrinsically wrong with a lot of the general approach CFML has as far as a scripting language goes. It's just got itself a terminally bad rap thanks - I think - to some poor market positioning judgement on the part of Macromedia and Adobe, lack of openness on their part too, but mostly because the CFML community itself on the whole shows itself up to be a bit of a clown act when it comes to how it approaches the modern programming community. The CFML community is just way too "self-entitled" (Aunty Adobe will provide, so we don't have to), and at the same time simply not being that good. CFML devs seem to thrive on writing poorly planned or realised code, shun modern practices, and - FFS - still generally conduct themselves as if "it's cool! you can mix code with HTML with all these tags!" is a good thing. You lot: you killed CFML. Thanks for that.

All is not doom and gloom though.

Micha's onto something with Lucee. I like the idea of Lucee providing CFML compatibility - it is the core of their current user base after all - but other than that, all the new ideas he comes up with could be put into a different dialect that the Lucee server also processes. And if I was the former-Railo-now-Lucee community, I'd be encouraging this as much as possible.

Here are the benefits.

CFML compatibility

This is a significant consideration for Lucee. When I first started looking at Railo (when it first went open source, back in v3), I thought they were doing the wrong thing when it came to diverging from Adobe's lead, because it just creates FUD for its own client base. They were a fledgling implementation, and irrespective of how good the divergent ideas were they really did not need to put up compatibility barriers between Railo's CFML and Adobe's. I stand by this position to an extent.

However it soon became obvious that Micha et al had a far better handle on where CFML should go, and their ambitions on the whole seemed very sensible. It became Railo who were implementing the interesting stuff, and Adobe was either playing catch-up or wasting everyone's time with nonsense like <cfclient>. And given CFML was one the wane, I accepted that Railo was its future, and the Adobe ColdFusion Team were basically an anchor.

Lucee has a burden to provide CFML compatibility, and I still think the more they diversify from Adobe's "reference" implementation, the more it will hurt their cause when it comes to picking up migratory clients from Adobe.

Lucee should still pay attention to what Adobe does with CFML, and make sure they implement the core changes to maintain compatibility. But I think that's all they should do vis-a-vis CFML.

A better language

Years ago Micha emailed me - this is before we'd met each other - and made it clear he wasn't interested in simply mimicking Adobe's efforts, he had ambitions to make the best CFML engine he could (this was in reaction to me positioning them as a mimic more than anything else). And he's proven himself right. Well Micha and Igal and the rest of the Railo/Lucee guys. They have some great ideas, and they implement them well. However I have always been hesitant of them implementing too much that diverges from Adobe's CFML.

So here's where this idea of .lucee files come in. The Lucee platform can serve up traditional CFML via .cfm and .cfc files, and it can also move the language on via .lucee code. They can get rid of most of the CFML tags, and relegate them to view-only code (and get rid of the bloody "cf" everywhere!), they can revise some of the poor language decisions made a decade or more ago ("component" when it should have been "class"; arrays starting from 1, etc), and they can pile new features into the language and not have to worry about whether they're backwards / sideways compatible with Adobe's generally uninspiring or just too slow efforts.

Some might say that if one doesn't want to use CFML, then f*** off and use something else. Well I already have, so that rings a bit hollow. The thing is I'm not thinking purely about myself (this is rare in the CFML community, I know ;-), I'm thinking how best Lucee can position themselves to make a fist of it. You and I and all the individual CFML devs out there can simply move on to using Python or Ruby or Groovy or Clojure or (FFS, I despair) PHP, but obviously Lucee - as an association - has made a commitment to CFML and their CFML-using community. They can't just up-sticks and use Go instead.

I say that Lucee are planning the right thing, and the CFML community should get behind it. In having a platform that serves old-school CFML and allows one to move onto more modern code is an absolute godsend to the CFML community. One should be able to run one's CFML app in legacy/maintenance mode, and make all the enhancements to the application using Lucee's new dialect. Write new views using a proper templating engine, and write the business logic in proper classes. And if one doesn't know how to do this yet (or understand why one should do that), then it's a gentle learning curve. It'll also let die-hard CFML devs gently learn that CFML's approach to things is not the be all an end all, and start them moving on. This only helps their own community members grow as developers.

I see this new Lucee proposal as perhaps the most commuity-responsible thing to happen in the CFML industry since CFCs were added to the language.

I want Micha to flesh-out his vision, and I want the community to get behind it. I sure as shit am.

--
Adam