Two Months On Rails
Published 30 March 05 by Justin French
I can’t even begin to describe what a joy programming for web applications has been in the last 60-odd days. I’ve built two quite complex CMSs from the ground-up in virtually no time at all, and the thought of doing them in the same timeframe with PHP make me laugh out loud.
I’m particularly fond of how quickly I can respond to my clients needs – Rails is agile and responsive. Here’s an example:
My client asked me for a “business directory”, so we spent a few minutes designing the MySQL table structure and URL structure over AIM, then whilst we’re chatting away about other things, I’ve written the macros for the model, and knocked up a quick interface for them to add/edit/delete records by re-using bits and pieces from elsewhere in the application.
In less than an hour they can start entering data and actually using the thing. No mock-ups, no documentation, and no delays. They’re instantly providing me with feedback, and helping me shape the application — real data, real users, right now. An hour or so after that, I’ve built & designed the front-end, and they can see how the new data sits in the website flow.
Moving along, I’ve also found that User Experience (UX) is a joy with Rails, rather than an effort. The use of the flash for providing users with feedback and messages is so easy that there’s no excuses left. How easy can it be?
if @advertiser.save flash['success'] = "your advertisement was created" redirect_to :action => "list" end
The template on the next screen will see the message, render it to the screen, and remove the message from the session data – all from a single line in my controller. Since it’s so easy to add these nice bits up front, User Experience becomes a built-in part of my process, rather than a chore or after-thought.
But really, my favourite feature of Rails right now is it’s growth. When I first decided to ditch my PHP framework for Rails, my primary motivator was the idea that there was no way my own PHP framework could compete with a team of energetic geniuses contributing to Rails around the clock. In the past few months, the progress has been amazing – there’s so much new stuff that I can’t possibly keep up.
A great example is Ajax/XMLHttpRequest – it’s only just starting to emerge as one of those “must have” technologies, but the Rails team have already implemented a full library for us. I don’t have to bury my head in a maze of cross-browser JavaScript at all – I just decide when it’s appropriate, and do it.
Before you go…
Here’s some links to my most popular posts: