Jump to content

Checking in on Ruby on Rails

  blackbear's Photo
Posted Jun 03 2010 07:55 AM

Ruby on Rails took the software industry by storm a few years ago. However, unlike many technologies that looked great for a while and then slacked in popularity, Rails continues to attract developers and is finding its way into large production applications.

RailsConf 2010Elise Huard has spent a lot of time lately evaluating the quality of Rails applications as a consultant, and she'll be sharing her experiences at next week's RailsConf 2010. She spoke to me about what makes a good Rails application, and how Rails is evolving.

Rails is "opinionated software"

Elise Huard: Rails is, as they say, "opinionated software." A certain number of choices are already made for you, and those choices are pretty good for most web applications. They will probably shield some developers -- particularly beginners -- from big, obvious mistakes. Of course, it's always possible to make code mix-ups. No framework can keep you from that.

The perception of Rails as a not-ready-for-Enterprise language

EH: I don't think it's the nature of Rails. Applications like LinkedIn and the Yellow Pages have shown that Rails is perfectly scalable and will perform very well. I think it's just the nature of the industry. Enterprise always goes with what has been shown to work. So it's normal that they always take technology that has been around for a few years before they go with it. Maybe there needs to be a concerted PR effort behind Rails. Developers really like using it, but that's not always enough to push technology.

Common failures in Rails applications

EH: One of the things is the modeling of the domain, which is also a problem in other languages. Not defining your model to work with what you want to obtain. Naming of things is very important. Keeping your code neat. Like any other platform, Rails needs discipline to keep clean and refactor regularly, and to evolve with the situation.

There's a number of common best practices. The obvious one is not to repeat the same code all over the place. Another low-hanging fruit is to upgrade plug-ins and the Rails version itself to the most recent version, which is not always done.

Is Rails becoming too bloated?

EH: I think it's going the right way now. Rails 3 tears it down to the essentials, makes it very modular and very lean so you can plug-in any kind of persistence layer or easily extend it. As long as you can just add a little bit of functionality by installing a gem, I think it's really good.

Rails and NoSQL

EH: There's been a lot of experimentation with MongoDB and all kinds of NoSQL databases. That's actually one of the great attributes of the Rails community: it's always keen on trying new things.

0 Subscribe

0 Replies