Sam Farmer

Growing up I never imagined I would play bass guitar for the Dave Matthews Band. And indeed it never happened.

But I have become passionate about making software.

Thoughts on my first ColdFusion 9 application going into production

February 11, 2010

I recently released my first application built with ColdFusion 9 to production and it took full advantage of some of the new features of ColdFusion 9.  Overall these features sped up development and have nudged me to become a better developer.

ORM

Damn this is cool.  Create a new cfc with persistent=true, write all the needed properties, and as long as the ormsettings include dbupdate=update and ormReload() is called all the database table creation is complete.  Then use entityNew, entityLoad and entitySave to work with the object(s).  Making changes to the model is as simple as adding a property.  Setting up event handlers to automatically deal with audit data improves the applications quality and is also damn cool!  That added with the code assist from CFBuilder makes development very rapid.

But beyond the ease and speed I also feel that ORM has made me a better object-oriented developer as I noticed  I finally really stopped thinking about tables and instead objects.

Improved CFScript

After all these years of loving writing everything CF in tags it feels a little weird to switch to loving script but its less code, cleaner and easier to read.  Now I love using cfscript for writing CF in the model and controller layers.  For views good old tags are still my preferences.   The only disapointment is that not all tags are available in script (and way fewer than as suggested by Ben Forta).  I hope that will be enhanced in either 9.0.1 or 10.

Caching

This application retrieved a lot of information from third parties so to increase speed and reliability I did a fair amount of caching.  It doesn't get much easier than using cachePut and cacheGet which work with every data type (xml, structures, strings, etc).

Virtual File System

While I have not done any fully scientific, load balanced tests my quick tests show code running faster from the VFS which makes sense as its in RAM.  ColdFusion treats the VFS just like any other file system which makes using the VFS extremely easy.  The only problems I encountered came about if the VFS connection was not closed properly and that file could then often not be used until a restart.  To accomodate for this I added try/catch around use of VFS where an error might occur and closed the files in the catch.

There are many, many more features of ColdFusion 9 and I tried to cram as many as possible into my Best of ColdFusion 9 submission SpreadEdit as possible but this application only used the above ones!

Overall I've really enjoyed building applications with ColdFusion 9.  Its definitely faster in both performance and development, especially when combined with ColdFusion Builder.  I think it may well shift how we build applications.


No Comments

Some comments have been lost over the years due to moving hosts.

More


More blog entries that I have written.

Code coloring by PRISM.