Rails Technologies Decisions

Let’s say you are working on a Rails project and you need to use a new GEM, or rather, you need a new area of functionality and you are pretty sure a GEM exists to solve your problem.  How do you go about deciding your approach?  Recently, I have found a pattern that works really well for this.  It’s a simple 4 step approach.  Let me take you through my approach using an example.  I have a new project and need to add authentication.  I have been using restful_authentication for years, but since I am now on Rails 3 I decide to re-examine the landscape.

Step 1 – ruby-toolbox.com

First, I go to ruby-toolbox.com and click the Choose Category button in the upper right corner (hopefully they have not re-designed their site after pushing this post).  I find the category that best suits my problem and view the list of approaches.  What makes the toolbox so awesome is the user voting.  For this example, the Rails Authentication category indicates devise is the leading GEM.

Step 2 – railscasts.com

I next go to railscasts.com and watch the Ryan Bates video on my selected GEM.  Truthfully, Ryan Bates is one of the best online instructors I have ever seen and his video casts are to the point and very well-done.  I should know having worked on e-learning technologies for years.  The best part about the railscasts is you actually see how the technology works and what it takes to integrate it.  In other words, you get a “try before you buy” type of experience to see if the solution meets your needs.

Step 3 – stackoverflow.com

My final step is to make sure the technology is compatible with my stack and is not facing any major issues.  I do a search on stackoverflow to see what questions people are posting and what solutions are provided.  After a quick perusing of the posted questions about devise and rails 3, I see nothing to prevent me from moving forward.  Decision made.

Step 4 – github.com find the README for the GEM

Make sure you always check the README filer on GitHub to validate the usage of the GEM.  Most GEMS provide helpful instructions and informative summaries of the functionality.

Step 5 – back to railscasts.com

This time when I watch the railscasts video I make changes to my application in tandem with Ryan.  He just does an excellent job of talking you through each step.  You should verify key steps against the README in case changes have been made since the cast was created.

Cheers!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.