Ruby on Rails (or as it’s called now Rails) is one of the most popular web application frameworks of all time. But, why is Rails so popular in the first place?
There are many reasons for this. One of the reasons is obvious once you know how software is made.
In The Year 2005…
The first reason that Rails took off in the first place was that PHP and Java both had significant problems.
If you go back to the year 2005 the programming world was very different. Web applications were still a new thing.
I remember spending most of my time building database backed web applications in PHP and MySQL. All my PHP was hand crafted code without any frameworks behind it.
That was pretty normal back then.
Web application complexity grew from one or two page applications to enterprise level. Speaking of enterprise…
Enterprise Complexity = Trouble
Java at the time had their Java Enterprise Edition technology stack. It was a big convoluted mess.
I swear, at the time everything was a pile of XML configuration, ten different types of “beans” and you need a background in quantum mechanics just to deploy anything.
Java was gross. So gross in fact, that Java still has a bit of a bad reputation over a decade later (undeservedly so).
Within that mess of Java Enterprise on one end and PHP on the other, there weren’t a lot of web platform options that felt good to build with.
David Heinemeier Hansson (or DHH as he is known) created Ruby on Rails. DHH is a very smart programmer and also a bit of a loudmouth blogger.
Side Note: Rails as it is today would be unknown without DHH being so iconoclastic in such a public way. I consider his brash blogging and public speaking style to be a good thing.
Ruby On Rails launched with the infamous “build a blog in 15 minutes” demo. At the time, it was a huge deal.
The idea that you could go from nothing to a full fledged web application that was useful in less than the time it took to watch an episode of your favorite TV show was amazing. Actually, it still is amazing.
And so that built a bunch of interest from a lot of developers.
At the same time, web application businesses started to pop up. It became obvious that software was moving from the desktop to “the cloud”. (Though nobody called it that back then) And so Rails was in a very good place at a very good time.
What Ruby On Rails Got Right
Ruby On Rails had a few things going for it that PHP, Java, and Python couldn’t touch.
First, it was built on Ruby. Ruby is a very nice programming language to work in. It is designed around the idea of programmer happiness. It feels nice to work with. It pulls in a lot of good ideas in a reasonable way.
There is a lot to like about Ruby.
Also, Ruby is easier to like than PHP or Java. PHP is famously full of bizarre design choices and is less elegant than Ruby.
Java is also full of interesting choices. Its biggest flaw on the web was the long compile/deploy/reload cycle for each code change.
Making a change and hitting refresh and seeing it right away is a big driver of progress when building a web application. Java Enterprise Edition never did that as well as PHP or Ruby.
Those reasons along with a laundry list of others made Ruby nicer to work with than PHP or Java for many programmers.
Convention Over Configuration
Second, Rails had a lot of nice conventions and automation that didn’t exist before. It built around a Model View Controller style that encouraged cleaner system design.
The biggest impact was the conventions around file and folder structure. Knowing where to look for code and being able to find it reliably is a huge deal. Most frameworks get this wrong.
The other automations like generators for models, views, and controllers were very useful and interesting. Also, Rails seemed to be the first framework that made database migrations a first class citizen.
The automations, conventions, and MVC approach that so many other web frameworks do today can mostly be traced back to Rails.
There Is A Gem For That
Third, the secret weapon of the Ruby community (and thus Rails) is package management system known as Ruby Gems. A gem is a library you can install into your system with the command
gem install <package>.
Good package management solves so many problems in software development. Ruby had a good package manager before PHP, Python, and Java.
Back in 2005 PHP didn’t have a Ruby Gems equivalent. Python’s packaging system was worse and not centralized. Java had Ant and Maven, which is to say XML HELL. (Maven sucks. I don’t like it.)
So, the idea that you could
gem install rails to get Rails on your system was amazing. Need to add markdown support? Run
gem install markdown.(or whatever the markdown library was at the time)
Compared to any other system, ruby gems is delightful, even to this day. Also, at the time people were hand packaging their own libraries into their projects. So yeah, it was mind blowing.
The Value Of Rails Is Greater Than The Sum Of Its Parts
When you put everything together, Ruby on Rails had so much going for it. It became the fastest and easiest way for companies to build web apps in a cost effective way.
Rails was (and is) a great tool for building web applications in a cost effective way. Thus, with the rise in popularity of web applications, so also the rise in popularity of Rails.
Over a decade later, I find myself working in Rails every day on a very large codebase. Rails is the backbone of billions of dollars worth of software around the world.
For the most part, it works well and is well suited for the task.
Rails Works And That Is A Good Thing!
Ultimately, Rails’ long term popularity boils down to that. It works, it provides tremendous value, and is an excellent platform to build a software business on.
Despite the faddish nature of the technology industry, Rails has proven to be much more than a passing fad. Compared to the hundreds of competing technologies, that is quite an achievement.
Here’s to another decade of Rails!