By barneyb on July 30, 2010
If you've ever used Grails, you probably know about the 'flash' scope that it provides for passing data from one request to the next. Certainly not a must-have feature, but it's quite handy. The typical use case is after a form submit, you set stuff into the flash scope and then redirect to some page [...]
Posted in cfml
By barneyb on July 23, 2010
Guess what time it is, kids!!
It's "Barney still wants CFML closures" time! Yay!
Today's impetus is Edmund, Sean Corfield's event driven programming framework. In order to register event listeners, you have to a CFC instance with a specific method to be invoked on it, and which accepts an Edmund Event as it's sole argument. Which means [...]
Posted in cfml
By barneyb on July 23, 2010
If you're reading this, chances are good you're a software developer. And that means you never touch the DB outside a transaction, right? Of course, right.
Most of the time, transactions are a bit of a bear because their use is orthagonal to your business tasks. To put that another way, business operations flow vertically from [...]
Posted in database, railo
By barneyb on July 8, 2010
Both Railo and ColdFusion have added a builtin 'location' function in recent versions, and like their CFLOCATION counterpart, the default behaviour is to append the jsessionid/CFIDE/CFTOKEN tuple to the URL when redirecting. I find this rather annoying, and it's even worse since FB3lite has a 'location' function which defaults it to false. Unfortunately there isn't [...]
Posted in railo
By barneyb on June 8, 2010
I've added two new methods to my Amazon S3 CFC: listBuckets and listObjects. Both of them do about what you'd expect, returning a CFDIRECTORY-esque recordset object containing the rows you are interested in. I've attempted to make S3 appear like a "normal" filesystem where "/" is S3 itself, the top-level directories are your buckets, and [...]
Posted in amazon, cfml
By barneyb on May 28, 2010
Joshua (a coworker) and I have been talking about gravity simulation for a while, and this week I threw together a very simple model to do exactly that. This grew out of a game called Flotilla that he came across somewhere and has been working with the developer to add a network multiplayer mode. Flotilla, [...]
Posted in development, groovy
By barneyb on May 26, 2010
Yesterday I presented CFGroovy to the Tulsa CFUG via Connect. The recording is now available on Connect, thanks to Steve. You can also grab the slidedeck (as a PDF) I skimmed through, and of course, the CFGroovy framework itself (project page, core SVN, demo SVN), including the demo files that I showed.  Note that the [...]
Posted in cfml, groovy, personal
By barneyb on May 25, 2010
If you've ever wanted to do raw JDBC stuff in your ColdFusion applications, you probably know that you can get a javax.sql.DataSource via this code:
createObject("java", "coldfusion.server.ServiceFactory")
.dataSourceService.getDatasource("myDSN")
Unfortunately, this doesn't work on Railo, because the result isn't actually a javax.sql.DataSource, it just looks like one (see RAILO-43). To put that another way, it's duck typed.
Fortunately, [...]
Posted in coldfusion, groovy, railo
By barneyb on May 18, 2010
Next Tuesday (May 25th), I will be presenting CFGroovy to the Tulsa CFUG via Connect. Details are at http://www.tulsacfug.org/meetings.cfm, but the important bit is that it's at 12:30 central time, not in the evening. Steve Bryant – who manages the group – graciously extended a general invitation to anyone else who would like to join [...]
Posted in coldfusion, groovy
By barneyb on May 17, 2010
If you can identify this pair of shoes, I'll buy you a drink of your choice next time we meet. If you're wearing a pair of them, I'll buy you two.
Posted in personal