Archive for the ‘Agile development’ Category

Loving Rails

Tuesday, June 27th, 2006

I’m really getting into Ruby and Rails now - I don’t think I’ve touched a PHP script for over a week now (and this for someone who’s been writing PHP apps for six years!).

Obviously my job is as a PHP developer, but I’ve been fortunate enough to get my current project going in Rails rather than PHP so I’ve even been using Rails at work. That’ll change shortly as an existing client has some major additions to be made to the PHP-based system I wrote for them and I’m actually kind of dreading having to make the changes in PHP.

As much as I wrote the system to be as extensible as possible, the rapid prototyping and then main development possible with Ruby on Rails really gets you used to the good life. It shouldn’t actually be that bad as the system I wrote is reasonably similar in structure to Rails and even goes further in some parts (full form-building code), but there are certain things that either Ruby or Rails just make simpler (and quicker) than anything you can do with PHP (and I didn’t think I’d ever say that).

In my spare time I’ve been working on a content management system in Rails, primarily for two related projects, but also hopefully as a general system I can re-use on more websites. The speed at which I’ve been able to build it up is great, to the point where from a few weeks of programming where I get a bit of spare time here and there I now have a basic CMS handling logins, dynamic menu/sitemap generation, calendar system, news, general content pages, swish permissions back-end admin and even the beginnings of a file/image manager to be incorporated into TinyMCE to help non-techy authors who’ll be working on the finished websites.

The two websites in question are the Maserati Resource Centre (a non-commercial info resource and community for Maserati enthusiasts run by my Dad) and The Maserati Club (the international club). Both sites are in need of a serious update and I’ve re-designed them both as well (TMC site in conjunction with Andy Katz), but it’ll still be a month or two before the CMS is ready for either to go live.

In the meantime, I’m enjoying getting further into this Rails lark and building up what will hopefully be a very nice content management system when finished. I’ll post little screenshots once it’s a bit further along, though I’m trying to keep both site designs largely under wraps, so they’ll be more snippets than full screens.

Rapid development in Rails

Thursday, June 8th, 2006

We’re pitching to an existing client at the moment to develop a website for a new venture he’s starting and so I got handed a draft proposal to check over. As it’s not a high-value project, the idea put forward was to use existing shopping cart software we have a developer licence for and pull out the payment side which wasn’t wanted by the client (it’s just to generate enquiries which they’ll then deal with personally).

It seemed to me that it was going to involve a fair bit of re-working of this PHP software in order to get it working the way the client needed and that it might be easier to develop a system from scratch in Rails as the site doesn’t actually need to be very complicated. To get an idea, I went about quickly creating a basic database structure to model the site and then ran a bunch of Rails scaffold generators. After linking the models together and some mild tweaking of links and data display, I had the basics of the site working (and I do mean the basics - no style or more advanced features like search) and I’d spent under an hour doing it.

We can now offer the client a solution entirely tailored to their needs on the (reasonably) safe assumption that the coding isn’t going to involve more time than the client can afford to pay for. If the client does go for the Rails-based custom site, I believe both ’sides’ win. The client gets a truly bespoke system that’s tailored to their needs and their needs only, while we should be able to do that within the budget specified and provide a more maintainable, extensible system so it’s easier for us to support.

As much as I love PHP and have written my own frameworks for more complex systems over the past 6 years coding PHP, there’s nothing to match Rails for super-fast prototyping and then quick development after that, aided in no small part by the way Ruby itself works.

The only things in Rails that immediately spring to mind as being a bit more hassle than I’ve handled in my own PHP apps are form handling and theme/template switching, though there’s no great difficulty in adding these to a Rails app. I’ve already done a basic theme switcher for the first app I wrote while working through the Agile Web Development with Rails book, a forum.

I still need to really sit down and learn more of Ruby’s intricacies, but the Ruby on Rails combo is already proving great for quickly developing all kinds of web apps, from simple websites with a little bit of dynamic content to full content management systems (what I’m working on in my spare time).