“Rails is the 3rd most used programming language in the World”
Ruby on Rails is one of the most powerful ways to develop web applications in no-time. Being the 3rd most used programming language in the world, you can see it being used a lot in the marketplace: from Airbnb, Hulu, Basecamp to GitHub, everyone got to feel its power.
Rails is not only about technology - it’s about the people who create it, use it and benefit from it. Below you will find many examples of usage, what are the pros and cons, as there are no perfect frameworks made by men, same as no human beings are perfect. But hey, do not worry, Rails is quite close to that :).
In the following minutes, I will reveal to you RoRs most important principles. Then you’ll see Ruby put to practice in famous companies and some interesting usage statistics. But before that, in order to understand the Ruby present and future, some history might come in handy
So without further due, let's get to it.
What is Ruby on Rails Anyways?
Ruby is a dynamic, object-oriented programming language on top which Rails emerged as a framework. Rails is to Ruby same as Symphony for PHP or Django for Python.
The RoR story was written in 2003 by David Heinemeier Hansson. It began as a side-project and a way to improve the development process in Basecamp startup (and so we have the first example of usage, more below). Being quite an old framework, is, in fact, an advantage for Rails. It has one of the biggest communities, stable, secure and up to date mature technology.
Open Source at Its Best
Community: this is what makes Ruby and Rails extraordinary among others. It is made by enthusiasts and professionals, non-profit. Rubyists are also responsible for creating thousands of open source Ruby gems (over 150 000!), that extend and improve Ruby on any possible level.
“There’s a gem for everything” - anonymous
RoR is also widely tagged on stackoverflow.org (roughly about 300 000), this gives developers the opportunity to easily look for help and advice or to give one, which can significantly increase code quality and speed of development.
Ruby’s Principles and Assumptions
- Convention over configuration (CoC)
The paradigm on which Rails stands is that the developer should only specify unconventional aspects of the application. Rails will handle all the necessary configuration for setting up a project.
This makes developers happy as they do not need to waste their time on basic stuff. A happy skilled developer simply comes with a better quality of code and it is all deeply rooted in Ruby:
“I believe people want to express themselves when they program. They don't want to fight with the language. Programming languages must feel natural to programmers. I tried to make people enjoy programming and concentrate on the fun and creative part of programming when they use Ruby” - Yukihiro Matsumoto, Ruby creator.
- Don't repeat yourself (DRY)
“Thou shalt avoid unnecessary code”! is one of Ruby’s commandments. Say good-bye to repetition. With Ruby you don’t have to reinvent the wheel, like for example db communication or template layouts. What’s the outcome? A faster startup or MVP development.
Why Choose Ruby on Rails?
What about the advantages of Rails and Ruby? Why should you put your faith in Ruby and not PHP or Java? Well, there’s plenty of reason:
- Speed of development
Developers who use Ruby on Rails can build applications really fast compared to the competition, especially at the early stages which makes it excellent for startups or MVPs. Remember, the more time you save the more money you will save, it’s that simple.
- Code quality
Ruby code, along with testing it, is exceptionally clear, readable and natural which makes it self-documentary, thus speeds up the process of creation and clarifies the project.
- Testing the product
Rails focuses a lot on testing the application and making sure that the final product comes out without bugs and with the expected flow. Well tested code also comes with the benefit of total production time, it's some sort of investment for the future that saves time, money and keeps you away from unnecessary problems and stressful failures.
- Mature technology
Experienced technology gives stability for future usage and maintenance. It also allows integration up to date with other technologies (for example with vue.js on front-end thanks to default js usage with a large field for customization)
- Agile development
Do you have a dynamic project? Do you have an app that requires frequent changes, without delays, while keeping the flow and avoiding chaos? That's where Rails comes in handy, because Agile is its middle name.
- Easy business logic implementation
Thanks to the principles stated above, you’ll love the ease of coding and the logic behind.
Rails includes many features that already cover security issues like for instance SQL injection. Although this framework is not omnipotent in terms of protection, Rails can be supported by lots of gems to ensure you get the highest qualities of protection.
Scores amongst top 10 languages on GitHub.
Appears also in top 10 languages to be learned as a programmer
Rails is the 3rd most used programming language for websites in the World, and the 2nd in Poland with over 1,4 million live websites.
On the other hand, w3techs.com, scores Ruby as the 4th Most popular server-side programming language. Ruby is now the fastest growing server-side programming language, how cool is that?
- Accomplish more with less code
Ruby encourages to use one-liners. Rails works on behalf of speed of development by allowing teams of devs to skip the setup and default configurations.
The Case Against RoR
Ruby on Rails, as any other man-made technology, has some flaws. Although they are not visible at first glance, they are still there and can make you sleepless at night. Well, at least in some very extremely rare cases.
Let’s take a look at the most popular case against Ruby: Twitter moving away from it to other technologies.
"And that wall was not so much its code but in limitations in Ruby virtual machine. There's a lot of things that Ruby is great at, but long-running processes? Particularly memory intensive ones? Not so much." - Alex Payne, Twitter developer
Scaling via concurrency, when working with long running processes, is not the way Ruby was made, so no wonder it does not work as it might in Scala for example. Abandoning RoR, for Twitter, was due to scalability problems. On the other hand, we have to remember that it was almost 10 years ago. Rails has become a lot better in its former weaknesses.
“Rails is so easy to use that in some cases it might be overused.”
Most of the times it may happen due to poor programming and architectural decisions as the project grows. When used by the team of inexperienced in that matter developers, it might get tricky and over complicated while time passes and projects become bigger and bigger. As a result, after some period of time, rewriting a whole bunch of code can be needed in order to make a small change in users features.
To conclude, Rails and Ruby as a whole is very flexible, one just have to know how to use it, the same as in any other technology.
Ruby on Rails Examples: Smart-Ass Companies Choosing RoR
- Basecamp - the very first Ruby app!
Basecamp is an all-in-one project management software. Emails, chat threads, docs, ideas, plans, everything’s there. 3M+ people are using it!
- Github - the no 1. collaboration tool for developers
Created using RoR and Erlang, it now has 26M+ users. https://twitter.com/dhh/status/1030528476250562569
- GitLab (https://about.gitlab.com) - DevOps lifecycle tool for developers.
Probably 2nd biggest in the world of its kind.
“It’s worked out really well because the Ruby on Rails ecosystem allows you to shape a lot of functionality at a high quality,” GitLab CEO Sid Sijbrandij.
- Twitch Most popular by far live streaming platform, 15M+ active users!
- Airbnb - With 150M+ users, hosts or travelers, Airbnb disrupted the accommodation marketplace.
- Shopify - top e-commerce platform. With 600k+merchants and 1.2M+ active users, Shopify is the 5th most popular content management system.
- Kickstarter- worlds largest platform for funding projects and startups
- Couchsurfing accommodation sharing website: offering hospitality, arranging homestays, free of charge.
- Netflix - one of those startups that started with Rails and still use it in some
cases. It is the most popular video on demand and movie streaming platform for watching tv shows, series, and movies (many of them being original Netflix productions). 7th largest internet company Netflix with almost 250 million subscribers. Netflix is also known for contributing to Ruby community by creating probably the fastest gem for serializing json:api scoring almost 600 000 downloads.
- SoundCloud audio distribution platform allowing users to upload, listen and promote music. It appeared as a startup built on rails. Later on, same as Twitter, it abandoned Rails due to a monolithic spaghetti code problems.
- Twitter social networking giant. Used for publishing breaking news (sports, politics, cultural etc) known as "tweets", allowing users to share and comment on them. Started with Rails, later on, started using also Scala.
Among others: Dribble, Etsy, Bloomberg, ASk.fm, Groupon, Hulu, Cookpad and the list goes on an on.
So, is Ruby all sugar and spice?
Of course, it’s not all black or white when we speak of programming languages and frameworks. In the end, they’re all man-made, right? We are not perfect, and the things we create aren’t perfect either.
Ruby might have its pros, but also cons. But when you draw the line, RoR stands out as one of the leaders in the web development community.
Ruby seems to shine brightly among the other technologies. And if you’re building a startup, Ruby might be the answer to all of your prayers (see the Basecamp example). If You care about time, quality and continuous integration, RoR is here to help
P.S. Still having doubts? Is RoR able to stand straight in the future as well? See for yourself: