18 Jul 2012 - Bangalore, India
I have spent t lot of time setting up an application, doing the mundane "rake db:create", "rake db:migrate", "rake db:seed", "bundle" and a variety of other dumb things for every application. This is, honestly, quite annoying especially when I start working on a project midway.
It's also important to make an application "noob-proof" so that anyone can setup the application without any difficulty. This is particularly useful when you have a separate team doing Front End HTML and they don't know about RoR.
06 Jul 2012 - Bangalore, India
I have seen and written a lot of code, especially related to APIs, which, now, I feel is quite objectionable. Designing APIs so that someone else can use it can be quite irritating to say the least as you need to deal with various other teams - iOS / Android / Blackberry / whatever.
When you are working on an application that just serves APIs, things can be easier as, well, you just have to deal with your json (hopefully!) responses. But as soon as you throw in a web component things can get messy really quickly.
Here are a few points which I try to keep in mind when I design an application which serves an API and has a web component as well. All this is assuming that you do not use MVC in views to consume APIs. Although I don't have an issue with doing that, unless your application is huge, there is crazy AJAX and MVC is actually needed in your front end, this is just over-engineering. Clean, managable, extendable code can be written by having web and api logic the same application too:
04 May 2012 - Bangalore, India
There’s a cool feature implemented in Rails 3.1. You can now have a nested “has many through” relationship. Here’s an example to show what I mean by a “nested hmt”:
24 Apr 2012 - Bangalore, India
Mongodb is one of the most popular document-based databases due to it’s simplicity of use and speed.
I’ve been working with mongodb for more than a year now and it’s been quite awesome. No useless mysql queries, no joins, no “mysql-scalability” problems. It supports Hash and Array field types, has replication out-of-the-box, has a cool master-slave configuration which just works (unlike riak, which just seems confused).
Mongoid is my ODM choice as when I started out, Mongoid fully supported Rails 3 and used ActiveModel etc. whereas MongoMapper was still using the “validatable” gem, which meant they were inexplicably behind the curve.
To be honest, inspite of Mongoid being as brilliant as it is, it is still a work a progress. There are still issues, some of which are quite major ones.
Here’s one such issue I faced a while back.