Railing a bit
Friday, 30. December 2005, 20:35:53
If you are a web developer and you don't know what I'm talking about, I won't believe you. But just in case is true, go as fast as you can and check out this wonderful web development framework and the breath-taking programming language behind it.
I've been hearing about this platform for a while now, but I really didn't had the time to do the little research needed, until a few days ago. And believe me, it's amazing!
Among the greatest features Rails offer (IMO) are,
- Based on Ruby, which I have found to be a great general-purpose programming language, with lots of well designed and powerful features (blocks, yield and iterators, mix-ins, just to mention a few).
- The use of the Model/View/Controller design pattern, which contributes to the quality and maintainability of the code over time.
- A well defined directory structure that keeps projects highly organized.
- The use of convention over configuration. This feature saves a lot of time with just minor sacrifice on the design.
- The outstanding object-relational mapping, which is heavily supported by automatic class-table name associations. No more bloated code-generators to reflect database models into immutable sets of classes.
- Layouts, partials and components to make it easier not to repeat yourself with common UI elements.
- The fact that it encourages you to work with separate databases for development, testing and production modes, which also contributes to the project organization and reduces risks of accidentally modifying or destructing important data.
- Perhaps more, but these are the ones I recall now...
I have a handicap, though. Many people will tell you that RoR will surely give you a productivity several orders of magnitude higher. Although in part this is true, mostly because of scaffolding and other techniques, I always want to understand the underpinnings of a system before exploiting it in production mode, so I am still grasping the most obscure Ruby language features, as well as how all these Rails magic work under the hood. I want to have at least an idea.
For instance, I want to create a title property for all my controllers, so that the layout just automatically uses it as the content of an H1 element in the markup. The global application controller would have a global default value for this attribute, and descendant controllers would modify it as needed. I want this property to behave much like the built-in layout property, that specifies which layout is used to render a controller. But at the time of this post, I haven't figured this out yet.