Tuesday, 5 November 2013

<cfclient>: source code of CFSummit app

Being true to his promise, Rakshith (well: actually it was Ram who posted it, but Rakshith announced it on Twitter) this morning posted the source code for the CFSummit mobile app, which was written using CFClient. I hastily downloaded it and had a quick look through the source code. Fairly rapidly reaching a conclusion.

And this is it:

I mean literally writing out JS statements in CFML. In tags, no less. EG:

<cfset $(document).ready(on_ready)>

Are you having a laugh, Adobe?

Because no-one's laughing with you.

Sadly it's very clearly written by someone with very journeyman-like skills at CFML too (actually the more I look, it's just very journeyman-like programming in general, which is worrying). If Adobe were going to do this, they should at least have gotten someone who knows what they're doing to do it. This is embarrassing.

All this code does is affirm what a lot of people have been saying: "we don't need or want to write JS in CFML. This is a very very poor idea".

I can't see anything else that's noteworthy in the code. There's a coupla instances of queryExecute() in the code, but nothing else that's not just CFML 101 level code.

I don't mean to sound melodramatic, but this really was my reaction when I looked at this code: "[gasp] what have you done? What have you done to my language?? [buries head in hands in despair momentarily]".

The code and related blog entry is here: "Source code of CFSummit2013 mobile application".