Don't Make Rails A Beast

Ruby on Rails is a beautiful framework. And by that I mean, it is a framework which can help developers create applications with code that is not “obnoxious” or unnecessarily complex.

Ruby on Rails still relies on developers all over the world to make it better. Your application is a reflection of yourself. Although most of the time, your application is a reflection of your client and his/her specifications and your interpretation of those specifications.

Rails Best Practices And How To Not Make a Rails Application Ugly

Rails Best Practices is a must-read for Rails developers. Although I do not follow some of those suggestions, it’s still best to do so.

Don’t throw the rule book out of the window.

  1. Make sure your associations work. Avoid deviating from conventions. Eventually if you design a table in such a way that foreign keys do not use the name prescribed by Rails, your associations may not work even with this:

      has_many through:
    

And you’d have to use SQL all the time, making your app look obnoxious.

  1. Don’t forget the usage of :include and :joins. Always check your ActiveRecord manual if you are not sure.
  2. Use plugins and gems that are well-tested and will not break your own tests if you use RSpec/Cucumber.
  3. Debug your application. Production != Development. Use Exception Notification plugin.
  4. Posted by @gregmoreno on PHRUG: That’s not a memory leak, it’s bloat.

Assumptions and predictions:

  1. In 2010, there will be more Ruby on Rails developers and more jobs because of its popularity. Slowly but surely, those web hosting companies who do not support Rails will choose to support Rails.
  2. There is really no difference between scripting kiddies and senior obnoxious coders. In rails, the scripting kiddies who follow conventions would probably rule over the latter.
  3. Many people will want to use other Ruby frameworks and DSL’s apart from Rails especially those who do not like MVC. Enter Sinatra DSL which embodies the most basic things a developer would need from a framework. Why use CakePHP? Sinatra and Ruby 1.9 can be faster.
  4. Developers will inevitably not want to use Windows operating system.