G'day:
Ever since ColdFusion 9 implemented a jerry-built1 way of making DB calls in CFScript via Query.cfc, people have been observing/complaining/hand-wringing that the way one passes the SQL string from the calling code to JDBC via CFML is much more elegant with the CFQUERY tag than it is with using Query.cfc. In case the situation if not clear, here's an example:
Tuesday, 11 December 2012
Thursday, 6 December 2012
Constants for CFML
G'day:
This one is just an idea I had for ColdFusion 11 (or Railo... just "for CFML" really). Well it's not an idea that's particular to me, nor is it a new one. Or an earth-shattering one. Or one that will sell any licences in and of itself. It would be handy though.
CFML has no notion of named constants, EG:
const PI = 3; // near enough ;-)
Whilst one can created variables, not all values are supposed to be variable. For example π doesn't change: it's not a variable. It doesn't vary.
Updated 2024-08-30
Reworded to avoid my misuse of the word "singleton" which I was using to mean "an object that is created once and reused", which is not a singleton. A singleton is about implementation, not usage. This was pointed out to me by John Whish of the CFML community, during a conversation we were having about misuse of that term.
CFML has no notion of named constants, EG:
const PI = 3; // near enough ;-)
Whilst one can created variables, not all values are supposed to be variable. For example π doesn't change: it's not a variable. It doesn't vary.
Wednesday, 5 December 2012
Forgot to say
G'day:
OK, I often say "this'll be a quick one", and then waffle on for a coupla thousand words. Not this time: it'll be quick.
One thing I forgot to mention in the "I love being wrong" article I posted a few hours ago was how I determined that the form scope was indeed being deleted and reconstructed every request, not simply being cleared (because as I mentioned: it's being both cleared and deleted, which seems logically tautological, if you see what I mean).
OK, I often say "this'll be a quick one", and then waffle on for a coupla thousand words. Not this time: it'll be quick.
One thing I forgot to mention in the "I love being wrong" article I posted a few hours ago was how I determined that the form scope was indeed being deleted and reconstructed every request, not simply being cleared (because as I mentioned: it's being both cleared and deleted, which seems logically tautological, if you see what I mean).
Labels:
Code Examples,
ColdFusion
I love being wrong
G'day:
That's not sarcasm, I actually do rather like being wrong about stuff: it's a great vector for learning new things and improving one's knowledge. Provided one doesn't get defensive about being wrong (which if just daft), and does endeavour to understand how one was wrong, and do something about it.
Anyway, enough airy-fairy philosophising. What was I wrong about?
The form scope.
That's not sarcasm, I actually do rather like being wrong about stuff: it's a great vector for learning new things and improving one's knowledge. Provided one doesn't get defensive about being wrong (which if just daft), and does endeavour to understand how one was wrong, and do something about it.
Anyway, enough airy-fairy philosophising. What was I wrong about?
The form scope.
Labels:
CFML,
Code Examples,
StackOverflow
Monday, 3 December 2012
Survey Results: where to focus Adobe's efforts to improve CFML's CFScript coverage
G'day:
Thanks to a coupla people fwding my Twitter status updates asking for participation, and I guess repeated nagging from myself; on Friday last week I finally hit my target of 50 responses. I've closed that survey now.
The results were fairly predictable, I guess: no-one's interested in UI-ish things (form, layout & UI widgets) being availed in CFScript, and a bit of a mix in between. Basically people thought "internal" type stuff, or integration with some external systems warranted inclusion in CFScript, but were a bit "meh" about it other than that.
Thanks to a coupla people fwding my Twitter status updates asking for participation, and I guess repeated nagging from myself; on Friday last week I finally hit my target of 50 responses. I've closed that survey now.
The results were fairly predictable, I guess: no-one's interested in UI-ish things (form, layout & UI widgets) being availed in CFScript, and a bit of a mix in between. Basically people thought "internal" type stuff, or integration with some external systems warranted inclusion in CFScript, but were a bit "meh" about it other than that.
Labels:
ColdFusion,
ColdFusion 11,
Survey
Sunday, 2 December 2012
What's up with OpenBD?
G'day
This is just a quick one.
I found myself - yet again - typing into one of my articles (an update to yesterday's one which discussed CFML's date datatypes) something to this effect "but the code didn't work on OpenBD, so I didn't bother testing it".
This is just a quick one.
I found myself - yet again - typing into one of my articles (an update to yesterday's one which discussed CFML's date datatypes) something to this effect "but the code didn't work on OpenBD, so I didn't bother testing it".
Labels:
OpenBD
Saturday, 1 December 2012
What you see is not necessarily what you get
G'day
This is another case of me not having enough space on Stack Overflow to articulate myself properly, so I'm creating a blog article and will cross reference my answer to here. With enough of a summary on S/O to try to avoid snippy comments from the self-appointed sheriffs.
This is another case of me not having enough space on Stack Overflow to articulate myself properly, so I'm creating a blog article and will cross reference my answer to here. With enough of a summary on S/O to try to avoid snippy comments from the self-appointed sheriffs.
Labels:
CFML,
Code Examples,
StackOverflow
Subscribe to:
Posts (Atom)