Kay lives here

working with the web

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

I’ve been a long-time Fusebox coder (since version 2) and have always asserted that for most small scale web applications, a procedural approach is 100% fine. I could never be bothered with the overhead that object-oriented code takes, considering the size and simplicity of the projects I typically did.

That is what I still believe. However, of late I’ve been working with other people’s code that is more OO in approach, and I can see the benefits, especially for larger and more complex projects. I’ve been getting more and more ColdFusion projects recently and it’s a lot of fun. I had two projects about to start, and although neither 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 reason I thought I’d give it a try was Illudium PU-36 Code Generator, which is actually a crazy name for a pretty cool tool that generates all the factory, service, DAO and bean CFCs directly from your database tables – in other words, saving you a ton of typing, cutting and pasting and then more wasted time tracking down errors caused by typos (cool screencast here). I happened to be talking to Andrew Mercer, CFUGWA’s OO Guru, and as well as answering some of my noobish questions he pointed me towards Russ Johnson’s Fusebox 5 templates for Illudium PU-36. They generate Controller and View circuit.xml files plus listing and form pages in Fusebox 5 friendly format, giving you a massive head start on creating administration applications. What impressed me most, however, was that the forms and tables that are generated are nice, semantic, valid HTML. Although I changed the forms a bit – I’m hopping on the latest trend which is putting each label and input pair into an ordered list item – they were so close to what I’d normally create myself that I was literally rubbing my hands together with glee.

However, there was another hurdle. Russ’s Fusebox 5 templates are designed to be used with ColdSpring. So I had to get a handle on that too. After reading about ColdSpring I can see the benefits of that too, and at the simple level it’s not hard to integrate. All in all, I can see what I probably should be doing, framework-wise.

However, timelines and scopes started to creep, as they do, and some atypical 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 conceptual hurdles – which was not surprising, really – so I went back to doing what I know: procedural Fusebox 5.

So is that bad? It’s clean, understandable, 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 meantime, thank your deity of choice for good ole’ dependable Fusebox!

5 Comments

  1. Yes – been there, done that. Unfortunately each project seemed to have time constraints… I finally said ‘enough’ and just dove in and did it. The project was late but hopefully you’ll make it up on the next one.

    I’m working on an old Fusebox app now and am missing my Mach-II and wishing I had time to tinker with lludium PU-36 :)

  2. Its not bad. It happens to me all the time. I Somehow just don’t get the time to make a leap to a new framework or method as somewhere in all that something will trip me up and the whole lot comes down like a house of cards when the time constraints of the project are taken into account.

    I looked at lludium for example for a project and put it aside as fiddling with it was burning too much project time.

    Guess what is really needed is a kind of skills / new framework study group / mentoring 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 little time upfront and make your own templates. I am glad others have shared their templates, but that means you must learn their coding styles and conventions before it becomes useful. However, the point of Illudium is that it really is extremely easy to make your own templates and then just generate the application using *your* coding style and *your* conventions.

    Perhaps when a project affords you more time, you might try again :)

  4. Hi Brian – thanks for stopping by! I had a look at the Illudium project wiki – customising templates looks pretty interesting. What we need here is more rainy days with no deadlines :)

  5. Great to see someone using those templates! Even better to see someone recommend them! Brians right, thats the problem with scaffolding code, you have to get used to the style of the templates, unless you take time to write your own.

    But in any case, if you have to modify a few things, its still far faster than writing all that code by hand!! I use the ColdBox templates now to help speed development of my apps, of course I modified the templates a bit to suit my needs. Nice to have that flexibility!

    I will actually create templates for a specific application that start out with the same base so that any modifications that I have to do to a particular section can be easily generated rather than having to hand modify each one.