*** You! The story of Ruby on Rails
Sun, Feb 15 2009 12:00 AM
Ruby on rails is one of those technologies that just took of where a lot of other different technologies didn't do anything.
I would like to share my insights about why this technology blossomed where a lot of others failed.
First of all they did a lot of things right, most things are marketing related.
The first steps
Perhaps it is best to start out with the beginnings of the Rails framework.
Rails was extracted from the basecamp application that 37signals made.
This is an online project management application.
One of the things that needs to be said about 37signals is that these guys know their stuff.
They are the more with less poster boys of the web.
A reputation they have earned with things like releasing a todolist application with under 600 lines of code (ta-da list) .
The 10x as productive / less code mantra
Somehow it all got about lines of code, some people are thinking aha so they are doing the perl thing.
Perhaps, but one of the major selling points was lines of code:
LOC = Lines Of Code
|ta-da list ||579 LOC|
|rails ||1 KLOC|
|basecamp ||4 Kloc|
We are talking about beginning of 2005 here so these sizes are probably not anywhere near where they are now.
At that time the Java frameworks contained a lot of XML for config works so when you where looking at things like Hibernate then a project of significant size would have ta-da lists size in config files alone :)
The interesting part is that there where quite a few people from java shops deserting the base also adding to the Rails is so much more productive mantra.
How did they get to so productive
Rails is an opinionated framework, which means in this case that the framework chooses a lot of defaults for you to use.
Active Record, the database layer is always something where a lot of time is spent. Web applications are usually quite heavy on the communications with databases of some sorts.
Active Record, offers a very compact way of setting up the communications with the database with a lot of things happening in the background.
Also the syntax used to communicate with the database is very streamlined.
Scaffolding, scaffolding is a way of setting up pages which interact with the database without actually writing these pages.
Ruby, Ruby is a dynamic language and you can write pretty compact code with it like Perl but more readable according to some.
Ajax where it's nice, built in Ajax stuff with a nice interface to it.
Some smart concepts like flash, which is a way to display text to the next page.
Cutting fat from wherever they can by adding magic / abstraction.
What others where doing at the time
in the JAVA camp
The Java Spring framework was getting a lot of attention.
It featured: MVC, Dependency Injection and some other things it also started the there is too much overhead in setting up an J2EE project movement.
in the .Net camp
ASP.Net v2 was just released with it's datasources and Master pages.
For me the thing to do to be more productive was code generation.
The like minded
At the time of Rails there where some other projects who where taking shape at just about the same time.
Django: a project in python which has it's origins in the publishing world with a great auto admin system.
There where probably some others, but I'm not quite sure of the moment at which each got introduced.
And the others followed
The succes of Rails made such an impact that a lot of other frameworks started popping up with some of the same ideals / mindset.
You can think of: Grails (groovy rails), Cake PHP, Catalyst, Castle Project.
So what's wrong with it
There are / where a couple of problems with it.
Rails also has it's problems some of these have been well downplayed others have been ignored and others have been contested.
Some of the things which have been troublesome:
The memory leaks there have been several, in ruby itself, in fcgi + ruby, in rails etc.
This offcourse has also led to deployment problems, which have been plagueing Rails for quite some times.
Shared hosting + Rails didn't mix well.
This has been changed with the coming of phusion passenger (mod_rails).
Which provides easy to set up hosting for Linux / BSD / OS X apache.
Performance of the Ruby language is horrible when set off to other alternatives. (the solution is always caching though)
Rails has a long hard troubled past with UTF-8 support aka support for languages which aren't using the standard character set.
Things seemed to have been mostly solved with character proxies and the like.
Last but not least it's web development with an attitude, which means that the core members which create(d) the Rails Framework are opinionated and will clearly state what they don't want. (See the picture at the top to get the idea)
You might also get into trouble when what you want isn't exactly what they want.
Rails has become a large player in the web development field, while still not as large as the PHP community nor the .Net community it is still a player.
For a look at how far the Rails framework has come there are several screen casts out there to show you the power of rails today.
I have a feeling the guys supporting Rails have grown up a bit in the time it has been around. But the platform and it's creators still make things seem like the wild west of web development.
So your still in for a wild ride when things get down to it.