Friday 28 February 2014

ColdFusion 11: Adobe listening to their clients

G'day (from London again now):
Earlier in the week I wrote an article "ColdFusion 11: lists and arrays and empty elements and weird ways to fix stuff", which commented on some poor logic / common sense behind the way Adobe had chosen to fix an issue around how the application setting this.sameFormFieldsAsArray works, in that the array it creates ignores empty form values.

Adobe had claimed "backwards compatibility" on this at the time, but it seems common sense has prevailed: realising that sometimes "being correct" is better than preserving incorrect behaviour for the sake of "backwards compatibility".

Today Himavanth Rachamsetty has added this comment to the ticket:

  • Himavanth Rachamsetty
    11:42:59 PM GMT+00:00 Feb 27, 2014
    Some background:
    The problem with form scope not retaining the empty elements (when there are multiple elements with same name) was actually fixed once in CF6.
    But it was reverted due to lot of public feedback
    and bugs being logged. 
    (Bugs # 33697, # 34340. These bugs are not available in the public bugtracker now. They were logged in the previous bug tracker.)
    This and the fact that people were always using getPageContext() if they needed the empty elements are the reasons we didn't want to fix this.

    But due to public feedback now, we have decided to sacrifice consistency for the sake of ease-of-use.
    If sameFormFieldsAsArray is set to true, the array in form scope will preserve empty elements.
    If it is false, the list will not preserve empty elements (for backward compatibility).

It seems we were our own worst enemies back in CFMX 6 days (I was on the Prerelease Programme back then, but cannot remember this issue being discussed... I didn't participate in it much), ensuring we were stuck with bung behaviour with the form field list, but Himavanth has seen there's no real backwards compatibility issue to answer to with the newer array option. I don't believe it's a consistency due over ease of use issue though, TBH: it's more a case of not expanding incorrect behaviour when there's no reason to. The list and array cannot cohabitate (as it's an application-wide setting), so there's nothing to be consistent with.

I'd love to see the reasoning the community had with those two old bugtracker issues...

Anyway, good to see Adobe listening to their community / clients!