Kay lives here

working with the web

ColdFusion_iconimage.png

Easier than I thought, but not as easy as I thought: Illudium PU-36, Fusebox 5, and ColdSpring

thing.jpg

I’ve been a long-time Fuse­box coder (since ver­sion 2) and have always asserted that for most small scale web appli­ca­tions, a pro­ce­dural approach is 100% fine. I could never be both­ered with the over­head that object-oriented code takes, con­sid­er­ing the size and sim­plic­ity of the projects I typ­i­cally did.

That is what I still believe. How­ever, of late I’ve been work­ing with other people’s code that is more OO in approach, and I can see the ben­e­fits, espe­cially for larger and more com­plex projects. I’ve been get­ting more and more Cold­Fu­sion projects recently and it’s a lot of fun. I had two projects about to start, and although nei­ther of them were huge, I decided to try and go the whole OO hog, and maybe learn some new stuff in the process.

Part of the rea­son I thought I’d give it a try was Illudium PU-36 Code Gen­er­a­tor, which is actu­ally a crazy name for a pretty cool tool that gen­er­ates all the fac­tory, ser­vice, DAO and bean CFCs directly from your data­base tables — in other words, sav­ing you a ton of typ­ing, cut­ting and past­ing and then more wasted time track­ing down errors caused by typos (cool screen­cast here). I hap­pened to be talk­ing to Andrew Mer­cer, CFUGWA’s OO Guru, and as well as answer­ing some of my noobish ques­tions he pointed me towards Russ Johnson’s Fuse­box 5 tem­plates for Illudium PU-36. They gen­er­ate Con­troller and View circuit.xml files plus list­ing and form pages in Fuse­box 5 friendly for­mat, giv­ing you a mas­sive head start on cre­at­ing admin­is­tra­tion appli­ca­tions. What impressed me most, how­ever, was that the forms and tables that are gen­er­ated are nice, seman­tic, valid HTML. Although I changed the forms a bit — I’m hop­ping on the lat­est trend which is putting each label and input pair into an ordered list item — they were so close to what I’d nor­mally cre­ate myself that I was lit­er­ally rub­bing my hands together with glee.

How­ever, there was another hur­dle. Russ’s Fuse­box 5 tem­plates are designed to be used with Cold­Spring. So I had to get a han­dle on that too. After read­ing about Cold­Spring I can see the ben­e­fits of that too, and at the sim­ple level it’s not hard to inte­grate. All in all, I can see what I prob­a­bly should be doing, framework-wise.

How­ever, time­lines and scopes started to creep, as they do, and some atyp­i­cal staffing issues meant that in the end, I didn’t have the time I would have liked to work on those projects. The crunch started and it started to look tight. I came across some con­cep­tual hur­dles — which was not sur­pris­ing, really — so I went back to doing what I know: pro­ce­dural Fuse­box 5.

So is that bad? It’s clean, under­stand­able, framework-compliant code. It works, it’s easy to debug, and it was easy for me to write. So no, I don’t think it’s bad at all.

The next project I have with more time, I will have another crack at an OO approach. In the mean­time, thank your deity of choice for good ole’ depend­able Fusebox!

5 Comments

  1. Yes — been there, done that. Unfor­tu­nately each project seemed to have time con­straints… I finally said ‘enough’ and just dove in and did it. The project was late but hope­fully you’ll make it up on the next one.

    I’m work­ing on an old Fuse­box app now and am miss­ing my Mach-II and wish­ing I had time to tin­ker with lludium PU-36 :)

  2. Its not bad. It hap­pens to me all the time. I Some­how just don’t get the time to make a leap to a new frame­work or method as some­where in all that some­thing will trip me up and the whole lot comes down like a house of cards when the time con­straints of the project are taken into account.

    I looked at lludium for exam­ple for a project and put it aside as fid­dling with it was burn­ing too much project time.

    Guess what is really needed is a kind of skills / new frame­work study group / men­tor­ing coop.

  3. Well, glad you tried Illudium even if you didn’t end up using it in the end. And what do you mean a “crazy name”?!?! No Looney Tunes fan I see!

    I think the key here is that to use Illudium right you need to take a lit­tle time upfront and make your own tem­plates. I am glad oth­ers have shared their tem­plates, but that means you must learn their cod­ing styles and con­ven­tions before it becomes use­ful. How­ever, the point of Illudium is that it really is extremely easy to make your own tem­plates and then just gen­er­ate the appli­ca­tion using *your* cod­ing style and *your* conventions.

    Per­haps when a project affords you more time, you might try again :)

  4. Hi Brian — thanks for stop­ping by! I had a look at the Illudium project wiki — cus­tomis­ing tem­plates looks pretty inter­est­ing. What we need here is more rainy days with no deadlines :)

  5. Great to see some­one using those tem­plates! Even bet­ter to see some­one rec­om­mend them! Bri­ans right, thats the prob­lem with scaf­fold­ing code, you have to get used to the style of the tem­plates, unless you take time to write your own.

    But in any case, if you have to mod­ify a few things, its still far faster than writ­ing all that code by hand!! I use the Cold­Box tem­plates now to help speed devel­op­ment of my apps, of course I mod­i­fied the tem­plates a bit to suit my needs. Nice to have that flexibility!

    I will actu­ally cre­ate tem­plates for a spe­cific appli­ca­tion that start out with the same base so that any mod­i­fi­ca­tions that I have to do to a par­tic­u­lar sec­tion can be eas­ily gen­er­ated rather than hav­ing to hand mod­ify each one.