Rails has been around for over 12 years. That’s an eternity in any kind of technology. The list of any software-related items that have survived that long has to consist of just a few. Sitting here thinking about it, I can only come up with:
More from this author
- Vi/Vim (which I am using to write this post)
Ok, well, I seem to be terrible at lists. I am sure there’s more, but the point remains: Rails has been around for ages. It has hair on it.
Knowing, as we do, that software is changing at the speed of light, especially in the web space, how can something like Rails persevere? Is there any way that it’s still relevant as a web framework? I mean, with Concurrent-this and Functional-that always dominating the headlines, how is this framework based on an object-oriented language still worth learning?
That’s what I am going to postulate today. Rails is still, very much, worth learning.
Disclaimer: I have updated SitePoint’s book Rails: Novice to Ninja for Rails 5, so I have a vested interest in the viability of Rails…
Doctrine and Vision
Rails has a doctrine. No, really, it does. It’s right here. I don’t know about you, but anytime I see such and such Doctrine, I think of mindless lemmings being forced into slavery by some tyrannical megalomaniac. I’ve probably read one too many post-apocalyptic sci-fi thrillers, though. The Rails Doctrine, however is all good. Here are the tenets:
- Optimize for programmer happiness
- Convention over Configuration
- The menu is omakase
- No one paradigm
- Exalt beautiful code
- Provide sharp knives
- Value integrated systems
- Progress over stability
- Push up a big tent
Now, I am not going to run through all of these, but I want you to read them. You know what they don’t really say? “Make a website.” The list has words like “happiness”, “beautiful”, “progress”, “value”. This is for a web framework. Think about this for a second.
These are noble and worthwhile tenets for just about any job where things are built. They set the tone for the direction of the framework and the community around it. While you may not agree with all of them, at least you know what they are. They’re written down for everyone to see.
Consider the thought that went into building this list. Any framework that puts that kind of thought into the principles that drive it has to be mature and intelligent. I love these principles and knowing they drive Rails makes me happy to use it.
It is a long-standing, well-known truth that Rails allows developers to sprint out of the gates. If you want to stand something up quickly as a proof-of-concept, you’ll be hard pressed to find anything better than Rails for the job. As such, Rails has been the choice of startups for generations.
But, it’s not just for startups. When you’re trying to learn something new in tech, it often takes ages to see anything real come out of your learnings. You have to get past a certain point, likely beyond “newbie” status to use it. This kind of commitment can be hard to sustain when you’re switching careers or have other responsibilities. If you are new to web development, Rails gives you success early. Very early. You don’t have to learn a whole programming language, just enough to get going. In fact, so many people come to Ruby through Rails that Rails is often confused with the language itself.
Learn Rails because you’ll be able to see progress instantly. And that will keep you learning.
Learn the Way of the Web
Another aspect of Rails that is chanted, mantra-esque, by its creators and users is “Convention Over Configuration”. This means, essentially, that Rails has adopted conventions (ways of doing things) that presume certain configurations. For example, you don’t have to pick a database when starting with Rails. Rails will use SQLite by convention if you don’t configure another database. While this certainly contributes to my previous point of immediate success, it also shows you how the web works.
Wait, what do I mean by that? Well, I mean that most websites need to store data, so Rails has a convention for that. The vast majority of web applications out there use session-based authentication, so Rails has a convention for that. Once you learn the conventions, you now have a list of things web applications need. You have a list of the “ways of the web”. Here’re some more examples:
- RESTful endpoints
- Asset compression and building
- Database migrations
- Package and dependency management
There’s more, but you get the idea. You can take this list and tweak the configuration to see other approaches. You can outright remove or replace these conventions with gems or your own code. When you’re ready, you can dig deeper into each convention and learn why it exists. These deeper dives will end up teaching you something fundamental about web application development and deployment. What’s better, is you can use the conventions until you’re ready, learning at your pace while still producing a solid web app.
Stand on the Shoulders of Giants
Building on the last point, Rails was built by some of the giants of web development. Rails started life as the framework used to build Basecamp, which is a very successful, high traffic offering. This means that the problems that spring up when creating a data-driven, high-traffic site were solved for Basecamp, and we get to reap those benefits.
In 12 years, Rails has been used for many successful sites. Many of the people involved with these sites have churned out incredible open source gems to solve problems that plagued them on their journey. One of the best examples is Devise, the de facto gem for authentication in Rails. Using Devise (and other gems), you can allow your users to authenticate in many, many ways. Email/password, Twitter, Facebook, Github, JWT, and the list goes on. Devise is only one example of thousands.
Rails is built by giants and a community of giants has built up around it.
You and What Army?
This community becomes your community when you start down the path with Rails. If you head over to Rubygems and search for “rails” you’ll see a result of roughly 160 pages of gems. 160 pages!! And more gems come out every week.
Also, searching for Rails help on the internet yields innumerable options. There are forums on SitePoint and elsewhere to ask questions. There’s a Slack group. You can’t swing a dead cat on the internet without hitting at least 12 Rails resources for answers. MEEYOOOOW!
Also, the number of books and videos and blogs about Rails is never ending. Did I mention that we’ve got a book coming out in just a few days on Rails 5….coughs.
The point is, there’s an army of folks working with Rails out there to help you. So, when someone says “Yeah? You and what army?”, you’ll have a great answer.
Ruby is Beautiful
In my opinion, one of the best reasons to learn Rails is because it is based on Ruby. In my multiple decades of programming, I have gone through many languages. Some that don’t even really exist anymore (Powerbuilder, anyone? How about magik? OK, QuickBasic then…) While some languages simply died, I abandoned others because of frustrations with the language.
With Ruby, it was love at first sight, and some 10 years later, I am still deeply in love. While all this love talk, no doubt, makes Ruby uncomfortable, I don’t care. Ruby is a beautiful language, and I will shout it from the server-tops.
In an article back in the early days of Ruby, Yukihiro Matsumoto (the creator of Ruby) wrote “…Ruby is designed to make programmers happy.” Don’t you want to use a language whose designer had that as an objective? I do. Oh, and he did a pretty good job reaching that goal.
It’s Still Got It
Well, at the end of this giant Rails love fest, you’re probably saying, “Well, that’s great, but can I make money with Rails?” Rather than give you my opinion, other that to say I write Ruby and Rails professionally almost every day, I’ll cite some real data:
- Ruby and Rails are in the top 10 programming languages of 2016
- Ruby/Rails is in the top 9 most in demand languages in 2016
- Ruby/Rails is moving up the lists. It is up 6 from 2015 here
You can find many articles and lists like those. Maybe the best way to answer this is to point you to an article written by Fabio Akita called “Rails Has Won: The Elephant in the Room”. This post isn’t the most complimentary article on Rails, but the title is true. Rails has kind of won. Beginners can learn it and experts can build great things with it. Rails is still making major changes to keep up with the ever-changing web development landscape.
While I mentioned I hope everyone wants to learn Rails and so they buy my book and I make loads of cash and retire to a life on non-stop Pokemanning, the book really doesn’t affect my view on Rails. I’ve been using Rails since 2006. In that time, other frameworks have made it into my toolbox and been discarded. Rails has stayed. It is truly the best tool I have for building most web applications. So, should you learn it? Seems like kind of a silly question now, doesn’t it?
How Can I Learn Ruby and Rails?
As mentioned earlier, I have recently released the third edition of my book Rails: Novice to Ninja. If you’re a SitePoint member you can find this on site now. Alternatively, you can also purchase an eBook or sleek paperback. For a sneak peak, check out this sample chapter.
Now go out there and learn Ruby. I’m sure you’ll love it as much as I do.