Sohan's Blog

Things I'm Learning

How Is Rails Plugins Helping Me in Developing

I am up to a web venture called - an online market place for you service providers in Bangladesh. This is somewhat similar in spirit to classified sites like ebay and craigslist, but the target market it consciously chosen to be the service industry. Anyway, I will go to the point why I picked rails for this project and how it is paying off.

A little background about me. I have some good background on .Net/C# and I developed several projects using this technologies. Also, I have some experience with Rails and developed almost same number of projects as that of .Net. So, I made an informed decision about choosing the Ruby on Rails framework for my project over .Net/C#. Here’s the rationale:

Story#1: As a CampZero developer, I want to deploy the system as soon as I am done with a feature.
Solution: Use capistrano to automate the deployment process. It took me less than 30 minutes to setup the automatic one-click deployment. The deployment steps are at a minimum as follows:
  1. Get the latest code from the code repository.
  2. Create a link to the shared log directory.
  3. Create a link to the shared assets directory.
  4. Create a link to the full text search configuration file.
  5. Migrate the database schema.
  6. Change the link to the application to the latest code.
  7. Restart the full text search engine.
  8. Restart the web server.
  9. Rollback if any step of 1-8 results in a failure.
The whole process is triggered by a single line of command ”cap staging deploy:migrations” and takes less that 3 minutes to complete on an average.

Story#2: As a guest user of CampZero, I would like to sign up for an account so that I can post an ad and/or rank the service providers.
The signup process is actually a three step process as follows:
  1. Create account, with password encrypted.
  2. Get an email with an activation link.
  3. Verify email address by clicking an activation link.
Also, there are several related works as follows:
  1. Login
  2. Logout
  3. Reset password
I used Authlogic for this purpose and it has taken care of all the aspects for me. For emailing I used ActionMailer. The whole job of authentication took no more than 4 hours! Thanks again to Authlogic.

Story#3: As a user of CampZero, I want to search for service providers using natural text.
The full text search was implemented using Sphinx and Thinking-sphinx. This also comes with default support for paginating lists. So, Thinking sphinx took care of all my search needs. I used the following features:
  1. Search by full text in the service description, title.
  2. Also search the service provider names and service categories.
  3. Rank by the ratings.
  4. Search using English morphology, for example, if searching for ‘cars’ it also searches for ‘car’.
I spent as little as 6 hours to setup and code the whole free text search! The total coding size for search is less than even 15 lines in total!

Story#4: As a service consumer, I want to rate and write comment on my service providers so that other consumers can make informed decisions.
I used two plugins called, rate-fu and acts as commentable! These plugins are great time savers as well. All the underlying logics for handling ratings and commenting are already there and you merely plug the features in. It took me 5 hours and most of it was due to the UI part!

I am convinced that for most web applications now, Ruby on Rails is an automatic best seller. But, of course, my prior experience helped me in getting things done even faster. Lets see how this project makes a business :-)