For the past week I have been playing with ruby and of course, rails. My experience has been an absolute pleasure, I can’t quite express the joy I have in having the opportunity to learn, use and abuse ruby on rails.
Having come to experience ruby after 11 years with PHP and PHP alone as a server side language, the only frustration I have is learning new syntax. No, that’s not a fault of ruby’s, infact I find ruby to be an absolutely beautiful language to write in. Its so… English!
If I were to pick my current top 5 features of ruby and rails they would be as follows.
1. Symbols, I love them, they are genius!
2. Extensibility is a dream come true. Only a week in and I’ve written a plugin to extend the base of ActiveRecord and ApplicationController allowing for easy and
automatic auditing for models.
I could have used an already existing gem, but none were exactly what I was looking for and as such it was the perfect opportunity to get down and dirty with extending the core. It’s so easy.
3. Models are so easy. They are simple to use and even simpler to configure, whether dealing with simple relationships or using nested attributes, once you get the feel you’ll be bashing out Model classes in no time.
4. Syntax, it’s so English. Loops are easily readable, conditional statements available to use in such easily readable manner and the lack of braces and semi colons is actually really, really pleasant.
reader.comment if reader.agrees?
5. Forms and validation, yet another absolute pleasure! Whether you have simple models and simple forms, or complex models with advanced nested forms, once you get to grips with it, which didn’t take much, you’ll love using the available helpers.
I’ll stop there, but there is plenty more I love about rails from routing and migrations, to the auto path alias generation that rails does for route resources, and the auto guessing of route path aliases when passing an object to form_for. But, those topics will likely be for another day, especially migrations. Oh my, migrations are generally amazing!
It will be interesting to read this post in a years time to compare my favourite, notable features.