Ruby on Rails - Top Five Pointers

When looking to create web applications using a programming language that uses convention rather than configuration, Ruby on Rails is the scripting framework of choice. Ruby on Rails runs on the model-view-controller framework Ruby, and is one of the better tools on the market exceedingly proficient in creating CRUD styled web applications.

There are a few pointers you should keep in mind when using Ruby on Rails to create web applications:

1. Do not reinvent the wheel. Chances are what needs to be included or created has already been implemented in a plug-in for Ruby on Rails. One excellent resource for this is the Rails Plug-in Directory.

2. Resist shell scripting. Grab a copy of Rake - a Ruby build program that works similar to the make command.

3. Put all constants in one convenient location. More often than not, programs end up needing to repeatedly use the same constants. Instead of spreading these items over several places, use the Rails initializer feature to create a configuration file that calls out commonly used constants.

4. Check code while working on it. By using the console tool consolidated with the standard Rails programming, users are able to see what the code output will be or even if it will work at all.

5. Keep a handle on possible errors. One of the most embarrassing things that can occur when showing off a new Ruby on Rails application is having the viewing public be treated to an application exception. Fortunately, there are a bunch of exception notification plug-ins to keep this from happening. A list of these plug-ins can be found at http://github.com/rails/exception_notification/tree/master.

Remember - half the fun of creating a new application is in using the right tools.

This entry was posted on Friday, November 20th, 2009 at 8:36 pm and is filed under Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply