Ruby on Rails is my new favorite web stack

I’ve been using Ruby on Rails on and off for personal projects and just finished working my way through Agile Web Development with Rails and Programming Ruby. Before I go on I would like to commend Dave Thomas and David Hansson for what is the most well written book on a web framework that I’ve read to date (and I’ve read a lot). Great work guys!

What Ruby on Rails does best is make web programming easy and quick. It provides a default project structure that’s sensible and ready to go out of the box. With it’s sensible defaults it only requires filling in configuration files when you want to do something out of the norm. It provides seamless integration between the domain layer and MVC layer (including validation), a powerful OR mapping layer (with native support for single table inheritance, trees, ordered lists, etc), provides a great unit and functional testing environment, and above all it allows you to override it’s sensible defaults when you need to do the complicated stuff. In other words it makes the easy things very easy while making the hard things still very doable.

That said there are a few things I don’t like but those have more to wih Ruby the language, than Ruby on Rails:

1. I miss being able to look at a method declaration and see what types of objects it expects.
2. I miss being able to do across the board powerful refactorings in IDEA or Eclipse. With Ruby’s duck typing you just can’t get the level of refactoring in an IDE as you can in a statically typed language.
3. I miss having to explicitly declare a variable because I occasionally make typos later on in the code and Ruby silently creates a new variable for me instead of telling me I’m using an undeclared variable.
4. My only complaint with Rails is that the erb templating language is intrusive just like PHP or JSP, I wish it were more like Tapestry where pages are pure HTML that can be filled with sample data that gets replaced with real data at runtime.

Despite those complaints Ruby on Rails has just barely edged out the mostly open-source Java stack as my favorite web development environment simply because I can work so much faster in it.

This entry was posted in Ruby. Bookmark the permalink.