Wednesday 30 April 2014

ColdFusion 11: if Adobe haven't quite sapped yer will to live yet...

... could you do me a quick favour?

A while back I raised this ticket with Adobe: 'List member functions should all be prefixed with "list"'; it's kinda self explanatory, but the gist is they'd implemented list member functions (good), but changed the names of the member functions to no-longer match their headless function counterparts. So the member function version of listAppend() was just append(); listEach() was just each().

I figured this was of dubious merit as it muddied what was a list-oriented member function and what was simply a string-oriented one (.append() could just as easily do a string-append as opposed to a list-append), and this notion got a lot of support: "Survey results: lists in CFML, and the naming of list member functions".

Credit where it's due, Adobe marked it to fix, and indeed "fixed" it before release of ColdFusion 11. So now we have myList.listAppend(), myList.listFind(), etc. But we still have myList.changeDelims(), myList.each() and a few others haven't got their list prefixes.

I duly raised another bug to cover this, yesterday: "listChangeDelims() member function missing".

Today Rupesh simply closed this ticket as "Closed/Withdrawn/NotABug", offering this insight:
delimiter is meaningful only for list and therefore there is no ambiguity on this. That is the reason the list methods dont need any separate qualification.
list.changeDelims() is better than list.listChangeDelims()
Same is the case for map, each and filter methods. They apply only for collection and I don't see any ambiguity there.
Honestly? Sigh.

Tuesday 29 April 2014

CFML: I know you are, you said you are, but what am I?

This is for Brad and Christopher and Mark.

ColdFusion 11: "Select ColdFusion Server Profile"

I'm just getting rid of the ColdFusion 11 beta on my machine, and installing the release version. Straight away there's an intriguing new feature that wasn't in the beta:  "Select ColdFusion Server Profile":

ColdFusion 10: be prepared, Adobe is removing the downloads

Amongst the (fairly muted) hubbub around ColdFusion 11 shipping today ("Announcing the launch of ColdFusion 11 and ColdFusion Builder 3"), Adobe slipped some bad news into the mix as well. In a few weeks they will be removing the ColdFusion 10 downloads from their site:
Availability of installers for CF10 and CFB 2.0.1
ColdFusion 10 installers and ColdFusion Builder 2.0.1 installers will only be available for download on for a limited time – till the 14th of May, 2014. If you need these installers for later use, then please download them before the 14th of May, 2014.

ColdFusion 11: it should go without saying...

I don't believe ColdFusion 11 is production-ready yet: the beta was too short, and - speaking for myself - I'm still finding bugs every time I decide to try something (not "every time I look for bugs" but "every time I try one of the new features, just to see how it works"). And not inconsequential bugs.

So I was out by a fortnight: ColdFusion 11 ships

I originally guessed that CF11 would be released on May 12: "ColdFusion 11 release date confirmed to be no later than...", but I was wrong. It's just been released: "Announcing the launch for ColdFusion 11 and ColdFusion Builder 3".

I've not much else to add on that topic, other than to say I don't think it's ready: it needed another round of beta.

It'll be interesting to see how many of the bugs I've raised in it have been fixed. I'll start looking into that this evening.

Anyway, there you go. That's the "breaking news".


"ColdFusion today is a uniquely irrelevant product"

Some of my elves put me onto this (no, I do not really have elves, but the person probably doesn't want to be identified as the person bringing this to my attention).

Here's a video presentation by Gojko Adžić entitled "How I Learned to Stop Worrying and Love Flexible Scope", which is about - at least in part - on how to plan a software road map. That in itself is moderately interesting. I have not watched the whole lot, as the streaming quality for me is very choppy, and it's a bit frustrating to watch/listen to.

But what is fascinating is that he's chosen Adobe ColdFusion's roadmap, and their general approach to software releases as the model "how not to" situation.

Monday 28 April 2014

ColdFusion 11: <cfclient> ports a lot of CFML functions to JS

I will start this article - which won't be a long one - by stating I am an adequate JavaScript developer, but I am by no means an expert. I'm at that stage wherein I'm au fait with the syntax and the nuts and bolts of writing OO-esque JS, but I don't spend enough time doing it to know the minutiae of "best practice" and don't automatically know the differences between the "best" way of doing something, and just "a way of doing something". Hence this article asks a question, rather than making any concrete statements.

Sunday 27 April 2014

ColdFusion 11: <cfclient>... how does normal CFML code and <cfclient> code interact?

Another quick one. I'm raising these quick-fire questions here because Adobe have declined to suggest a better place to raise them, other than as comments on one of their blog entries. Well that was Ram's suggestion (which I don't think is terribly-well thought out). He declined to react to my suggestion that the Adobe ColdFusion forums might be a good place. Anit suggested Twitter or just emailing him, but I think there'd be public interest in this stuff, so don't want to resort to email.

As I'm the master of what goes on on this blog: I'll clutter this thing up.

ColdFusion 11: <cfclient> seems to require /CFIDE to be available

This will be a short one... I just want to trot out various observations I make about <cfclient> as I make them. I don't want to waste too much effort on it.

I also feel a bit dirty round about now... I'm about to use a <cfform> tag.

As should everyone, I do not expose /CFIDE to the outside world. This is a terrible vector for security vulnerabilities. One that Adobe seems to be dragging its heels about resolving once and for all ("Isolate the /CFIDE/scripts directory from the rest of /CFIDE" (3732913)).

So when I'm using <cfform> (which is only ever when I am writing example code like this), I need to redirect ColdFusion to look in my isolated directory which just has the script stuff in it:

Saturday 26 April 2014

ColdFusion 11: <cfclient> in the context of the CFML language, not the tooling

This article could end up being a complete waste of space, as I am operating under more real-world re-interpretation of the raison d'être of <cfclient>, as described by Ram:
ColdFusion [11] has added support for client side CFML (<cfclient>) and this code is translated to JavaScript
Mike Henke has pointed out that the first part of this "CF11 has added support for client-side CFML" is actually bullshit (my wording, not his):
"ColdFusion Splendor has added support for client side CFML" is probably phrased wrong and gave me flash backs to VBScript or CFML running in the client browser.
Maybe this is better verbiage. "ColdFusion Splendor has added support for CFML to generate JS".
Because... there's not such thing as "client-side CFML". That would imply CFML actually running on the client (ie: the browser, or the mobile device, as is the target of <cfclient> as a concept). This is absolutely not true. I know Ram went on to qualify what he meant there, but the messaging from Adobe on <cfclient> has been inaccurate. Possibly I think to the point of actual misrepresentation (in the legal sense, I mean).

What <cfclient> does is... convert CFML code to JavaScript. So let's look at that idea.

Friday 25 April 2014

ColdFusion 11: custom serialisers. More questions than answers

I've been wanting to write an article about the new custom serialiser one can have in ColdFusion 11, but having looked at it I have more questions than I have answers, so I have put it off. But, equally, I have no place to ask the questions, so I'm stymied. So I figured I'd write an article covering my initial questions. Maybe someone can answer then.

Thursday 24 April 2014

CFDUMP, and how I'm a bit thick

This isn't even a case of me not RTFMing and then discovering something I didn't know. I knew this already. But am just a bit dense.

Tuesday 22 April 2014

ColdFusion 11: quick look at what data-type built-in functions are, in the context of using them as first-class functions

That was a foolishly long title. Oh well. The article itself is gonna be a quicky as I haven't had dinner yet and I'm getting hungry. Once I've cooked and got wine in hand... I'm not gonna be interest in writing this up.

Awdhesh and Rakshith gave an online presentation today on some of the language features of ColdFusion 11, and the subject of built-in functions being elevated to first class status came up. I thought I had covered this, but I'm buggered if I can find the article. If this is a double-up: sorry.

Monday 21 April 2014

Regex for simplifying string manipulation logic

An interesting blog article fell in front of me this morning: "Capitalization for us Mc’s and Mac’s!", by Brian McGarvie. It mentions a UDF on which handles... well as per his blog title: captialising his name as "McGarvie" rather than "Mcgarvie" like other capitalise() functions might do.

Sunday 20 April 2014

ColdFusion REST services and restSetResponse() revisited

Ages ago I wrote an article lamenting the way restSetResponse() has been implemented: "restSetResponse() requires the method to be returntype void. What?". At the time I was looking at how it was instrumental in how "ColdFusion takes something that should be easy and makes it hard" in the context of exception handling. That's slightly edge-case-y, I'll admit it.

But I think I've encountered a standard-operating-procedure situation today which demonstrates the implementation of restSetResponse() is not fit for purpose. Literally: it's not fit for the purpose it has been implemented for.

Today has been a frickin' frustrating day. I sat down to do another backbone.js tutorial ("Backbone.js Beginner Video Tutorial"), having finished "Anatomy of Backbone.js" and "Anatomy of Backbone.js Part 2" from CodeSchool yesterday. I started watching the video @ around 10am, and was inspecting the code on Github at 10:20am. At that point in time I figured I had better knock together the server-side code the tutorial will need: basically some RESTful web services for get-all, get, create, update and delete. Easy. I set out to implement this code using Railo, and had it all operational by 11:30am. At that juncture I started reading up on exactly what I should be returning for the less-obvious situations: the response for a GET is obvious: return the object(s) concerned. But what do I return for a POST? And a DELETE? So I started reading the HTTP spec ("Hypertext Transfer Protocol -- HTTP/1.1 - 9 Method Definitions"), which explained it all clearly.

One interesting thing I read on Stack Overflow which had me going "oh yeah! (duh)", was in answer to this question:

However I am wondering what should be the HTTP status code is the request sent by the client is valid (DELETE mySite/entity/123) and the entity to delete does not exist.
Because I was facing the same question (and with GET operations too). The answer is the very obvious:

In that case, the service should return an HTTP 404. Strictly speaking, a DELETE or a GET request for a resource that does not exist is not a "valid" request - ie. the client should not re-attempt that request because it will never succeed... The HTTP protocol defines 2 categories of problems - those with a 4xx status code, where the client must modify the request before retrying it, and those with a 5xx status code, which indicate that the service ran into trouble and the client should/could retry the same exact request without changing it.
As I'm perpetually wont to say to people who marvel that REST is some kind of wonderous thing... it's not. It's just "making HTTP requests". We do this every day in our browser. REST requests are no different. So if a resource doesn't exist... 404 the request.

Friday 18 April 2014

Official word from Adobe PSIRT re Heartbleed and ColdFusion

Adobe have completed their analysis of the Heartbleed issue in regards to their products, including ColdFusion, and have offered some guidance: "Heartbleed Update".

Wednesday 16 April 2014

Odd behaviour with struct keys with dots in their names

I've been looking at this one due to an interesting question on Stack Overflow: "Confusion in dynamic variable access in ColdFusion". I could not immediately see what the problem was, and it's taken me a coupla hours to work out what's going on.

Saturday 12 April 2014

ColdFusion 11 is not ready for release in one month's time. Simple.

This is a short adjunct, designed to encourage the Adobe ColdFusion Team to respond to their community. It'd be helpful if you could retweet it.

In my opinion, CF11 is not ready to release for one very good reason:

67 ColdFusion  bugs not even looked at yet? Yer having a fucking laugh, Rakshith.

I wrote a speculative article the other day: "ColdFusion 11 release date confirmed to be no later than...", which intuits that we're about four weeks shy of ColdFusion 11 coming out. I think this is borne out by an increase of bug closures with "can't be arsed... maybe in two years time" (I think it actually said "Closed/EnchancementRequired" or "Closed/NotEnoughTime").

However as far as I can tell, Adobe haven't even bothered to look at a whole bunch of the issues their paying customers have raised with them.

I really don't understand how Adobe can be so dismissive of their clients. I seriously can't see how this is even "minimum professional" behaviour, let alone appropriate behaviour when they're in one of their very rare development cycles.

In contrast, Railo has the "luxury" of being able to do continuous development, so continuous issue triage/resolution, and they very rarely leave an issue untriaged (and even unfixed!).

Adobe choose to only do development on ColdFusion once in a blue moon, so they really have to at least triage all the currently outstanding issues. And, if they were to have any sense of professional integrity, fix the bugs, implement the features, or explain why they don't.

Adobe have done a bunch of good stuff for ColdFusion 11, but they are way more than a month away from delivering a professional product. Part of being professional is listening to one's clients.

I would like Rakshith to respond to this article. And what's up with their bug-fixing...


Bugs in iterator functions in both Railo and ColdFusion

I decided to "do my bit" for the cfbackport project, and am looking at implementing the new collection iteration functions for older versions of ColdFusion. I'm aiming for CMFX6.0 onwards, but am having to guess at some of the language restrictions as I'm on my back-up laptop and only have CF10 & 11 to test with.

Well that's nice

I had a nice comment posted against one of my UDFs @ today:

Sting (Guest):
Well, This is He, even if his functions make no sense, he adds them here, because he is administrator of this site..
This is in regards to the savecontent() UDF I submitted a few weeks ago ("How about this for savecontent?").

TBH, the UDF is of minimal merit: it's definitely a proof of concept thing and simply replicates existing functionality. Although I happen to think it's a better approach to doing a <cfsavecontent> operation in CFScript, compared to the options Railo and ColdFusion have offered.

The reason why I posted is threefold:

  • it's a reasonable demonstration of doing less-obvious things with inline function expressions, so might prompt people to think about them more;
  • it demonstrates how "closing tag" operations can be done in CFScript without needing special "block" syntax (which I deeply dislike);
  • CFLib is a bit traffic-slow these days, so I thought it might remind people it's there.

Friday 11 April 2014

Railo is out: more new iteration methods

Micha posted on the Railo Google Group the other day "(Last) Railo beta release (". You can get this via the in-admin updater if you're set to use the "Development releases (Bleeding Edge)" update channel.

Staying true to form, the upgrade process is seamless, and it also offers a bunch of excellent new stuff, as well as bug fixes. This is definitely the way CFML should be heading... not waiting around two years between features, as we have been with ColdFusion.

There's a swag of new stuff, but I'm just gonna focus on the added iteration methods: for queries and lists.

ColdFusion has had some list iteration functions since ColdFusion 10, and adds more in ColdFusion 11. I discuss them in "ColdFusion 11: .map() and .reduce()". Railo hadn't implemented them, I think because they - somewhat dogmatically - don't consider lists to be a "type", therefore only consider string functions to be appropriate for strings. This is slightly specious IMO because Railo does have all the other list functions, after all. Anyway, they've added them now.

Here's example usage of the list-iteration member functions: .each(), .filter(), .every(), .some(), .map(), .reduce(). They have not implemented a list-sorting iteration function, for some reason. This code is also on GitHub: list.cfm.

rainbow = "whero,karaka,kowhai,kakariki,kikorangi,tawatawa,mawhero"


    echo("#index#/#listLen(list)#: #element#<br>")

Thursday 10 April 2014

ColdFusion 11 release date confirmed to be no later than...

This is the first "official" statement from Adobe I've heard about ColdFusion 11's release date. I was watching Ray's presentation that he gave to the Salt Lake City UG: "Recording and demos from my ColdFusion 11 presentation", and he let a tentative timeframe slip...

Oh, hohoho. You got me, CFHour

In slightly cliched fashion, I shall continue the overuse of this (mis)quote:
The reports of [CFHour's] death are greatly exaggerated.
It seems it was all a joke (not CFHour, I mean the announcement of their discontinuation), as they released another installment just now. I've not listened to it yet.

Yeah, so ignore this: "CF(Hour) is dead :-(".



Wednesday 9 April 2014

Ye Olde XMLSearche Bugge

Henry mentioned this last night:

That sounded like something I could get my teeth into, so had a look at it this morning.

Tuesday 8 April 2014

Cool CFML open source project I just spotted

Just a heads-up really. MisterDai (David Boyer) has a project on GitHub, cfbackport. The description in the readme says:

This project aims to make at least some functions from newer versions of Adobe
ColdFusion avilable in older versions.  For example, SessionInvalidate() is new
to CF10 but undocumented features make it possible in at least CF8+, possibly
even CF7.
Each set of functions is wrapped within an "if" statement to make sure they
aren't loaded if the version already supports them.

How cool is that idea? He's just uploaded a backport of queryExecute(), and there's a bunch of other stuff there too. This is definitely something the CFML community will benefit from, so would be good to get some more community participation going.

That's it. Nice work David.


listContains() is almost certainly not what you mean to be using

This topic is fished from a "conversation" (if one will permit it to be called that) from Twitter yesterday. I'm writing this so that it will show up in Google results if people are wondering about the function. Bottom line: if ever you find yerself using listContains(), there's a very very good chance you actually ought to be using listFind(), and you are overlooking a subtle difference between the two.

Monday 7 April 2014

Balls I say!

Sorry Rakshith, I know you deleted this message, but it's too amusing for me to not keep for posterity.

Sunday 6 April 2014

CFML: Predictable but perhaps unexpected behaviour with unscoped variables and shorthand operators

I've nothing earth-shattering to declare here (so "same ol', same ol'" then perhaps ;-), but here's a follow-up to a puzzling thing I observed during this adventure: "Railo: help me replicate a bug I'm seeing on one of my machines". It turns out there's... um... well I'm not sure what to make of it yet. It could be a bug; it could be expected behaviour.

Consider this code:

URL.firstVariable = 17;
someOtherVariable = firstVariable;

URL.secondVariable = 19;
secondVariable = 23;

URL.thirdVariable = 29;

Here we have three demonstrations.

Firstly if an unscoped variable reference is on the right-hand-side of an assignment expression, then CFML server will look through a number of different scopes to find a variable of this name (see "About scopes: Evaluating unscoped variables" in the docs). So in this case firstVariable will be resolved as being a reference to URL.firstVariable.

Saturday 5 April 2014

I am one step closer to being unshackled from ColdFusion

Note that that is ColdFusion, not CFML. I'm still onboard with CFML, and that's not likely to change in the mid-term. Today I switched all my hosted code from ColdFusion to Railo. So now my only connection to the Adobe product is my day job.


Very disappointing action from Adobe today, regarding securing /CFIDE. Adobe have followed-up the ticket I discuss in "Encourage Adobe to relocate /CFIDE/scripts", 3732913:

And they've done this without any hint of an explanation - you know, having the professionalism (even the civility) to pop an explanatory comment in on the ticket.

So it all sounds like they just couldn't be arsed. I mean... "enhancement required"? Basically they're actually saying "we won't do this because it would require us doing some work". Heaven forbid.



Thursday 3 April 2014


This is ubiquitous news just now, but I would just like to share how I found out about it:

Cheers for the heads-up Gavin.

Well done IT. This is a good day for social equality.


ColdFusion: Cracking good news regarding list member functions from Adobe

See, it pays to moan and complain and to disagree with stuff:

Good work, CFML community. You did that.

And good work Adobe for listening to the community!


Wednesday 2 April 2014

Survey results: lists in CFML, and the naming of list member functions

I didn't quite get 50 results for this survey, but so be it. It wasn't a terribly interesting one, granted. So, what do people think about lists, list functions, and what the approach to the naming of list member functions should be?

The subject line of the survey was:
ColdFusion 11 and Railo 4 have added "member functions" to CFML, so one can call a method on an object, rather than pass an object to a function. ColdFusion has implemented list functions as member functions of a string, and in the process have blurred the distinction between what's a list function and what's a string function. There is conversation about this on the Railo Google Group, and this has lead me to wonder what the community participants think about Adobe's approach here.
There were five questions.

Tuesday 1 April 2014

For the non-Firefox users amongst my readers

Inspired by OKCupid's move today, I am displaying a popover on this blog when a Firefox user first visits:

The text states this:

Sorry about the "WTF?" moment going on here. I am posting this notice in front of anyone accessing my blog from Firefox.

As I say in my communications policy for this blog, everything here is my opinion. Generally I stick to my opinions about stuff relating to CFML, but I reserve the right to express my opinion on any topic.

Something I have a strong opinion on is the topic of prejudice and bigotry. I won't conscion it. I do not simply mean racial bigotry, I mean bigotry of any stripe, including homophobia.

I was very disappointed to see that Mozilla have appointed a "card-carrying" bigot to the position of CEO. As we have all heard by now, Brendan Eich is so prejudiced against homosexual people he has financially invested in attempts to underwrite homophobia into United States law.

In my opinion, this is completely unacceptable. I can't have a say in whether he should be stood down from this position, but the longer he retains it, the dimmer is my view of Mozilla as a company.

As my own small protest I have deinistalled Firefox from my computer, and I am also now inviting you to do the same.

I'll only be displaying this banner to you once... I've popped a cookie on your browser so it should not display again. Sorry for the interruption.

Unlike OKCupid, I will display it only once.