According to Google Trends, Laravel quickly became more popular than Rails, which is quite obvious as there are more PHP developers than Ruby. Rails on the other hand, has enjoyed very stable interest which has decreased only slightly over the past five years.
There’s no better place to visit when speaking about communities than Reddit. Let’s have a look at the numbers: the subreddit for Laravel has 507,000 readers, while the one for Rails has almost 46,000. The difference is comparable and remember that Laravel is twice as young as Rails.
Stack Overflow is the home destination for almost every developer in the world. This is the most popular knowledge market and an oracle for programmers. There’s simply no other place with so many answers to so many problems and questions. The numbers here also speak in Rails’ favour: 320,768 questions asked about Rails versus 156,985 about Laravel.
Another Brick in the Wall
Usually, programming means building things using stuff other people have already built. You can think of web development as building unique things with bricks. But how many bricks do our frameworks provide?
In the Ruby world, these bricks are called gems (fancy, isn’t it?). Technically, RubyGems is a package manager for Ruby which was present in the Ruby community almost since the beginning of the language in 2004.
There’s a saying amongst Ruby developers that "theres probably a Gem for everything". What’s more surprising, that saying is almost entirely true.
And if there isn’t a gem for something, it will probably be written sooner or later. There is a gem that provides user authorization or manage user’s roles and abilities in your application, and there is also a gem that turns your test’s output into a rainbow.
To give you an idea on the size of this community let’s have a look at some more numbers. The repository has served over 58 billion downloads of over 162,000 of gems.
Composer and Packagist
For a long time in PHP there was no easy and centralized way of managing libraries and dependencies.
The situation changed in 2012 with the release of Composer, a package managing system for PHP. It uses Packagist - the PHP Package Repository. Its statistics are impressive as well: over 282,000 packages installed more than 28 billion times since April 2012 - for a bunch of tips on getting started with Composer take a look here.
Those results, of course, are about libraries for entire programming languages – some of them are versatile, while others can be used only for specific frameworks and tools. We can say one thing for sure - for developers working in both the Ruby on Rails and Laravel frameworks – the sky is the limit when it comes to browsing and using packages.
Our comparison comes to a draw.
Below we will summarize what we have learned and find the strongest and weakest points for each of the frameworks and figure out which will fit your business needs best.
Ruby on Rails
Ruby on Rails older but still a very modern framework. It has a big and active community and is relatively easy to learn. It provides tools for scaffolding your application and makes development quicker in the early stages.
Due to Ruby’s readability, apps developed in Rails are self-documented which can make the understanding of implementation details much easier if you have some technical background. Unfortunately, Ruby is still considered to be a slower language, so it might not be the best choice for you if you want exceptional performance.
The differences are not big though, and many changes have been introduced throughout the years with the last update on September 9th, 2020. It's also worth noting that not every hosting service supports Rails - here are the top 5 that do.
Rails has proven that it’s a very universal framework despite some minor disadvantages. Just have a look at some of the applications developed in Rails:
- Airbnb: Apartment booking system
- Twitter: One of the most popular social networks
- Twitch.tv: The most popular gaming livestream service
- Github: Service for managing git repositories
- Kickstarter: The most popular crowdfunding service
PHP seems to be a very unfriendly language (in comparison with how much is ready to use in Ruby), but it definitely is more popular in education and amongst developers in general.
Consequently, it should be easier for you to find someone to work on a PHP project. Laravel also provides a good routing system, which makes developing REST APIs (Application Programming Interfaces) easy. Laravel is worth considering if your application only relies on providing data to other apps.
Ok, so we’ve gone through quite a lot of information but we still didn’t answer the question: what framework is better?
Sadly, there’s no definite answer to this question.
You can take into consideration many different aspects and still, after your product is finished, someone will come by and say that they could have done it better, faster, or cheaper. If you’re looking for a verified and battle-tested solution used in many successful projects, and you’re not a performance freak, Rails is probably the better choice.
On the other hand, if you want to try a new and very promising technology or just want to have API, you should consider Laravel.
The best way to decide is to become familiar with the use cases for each framework and to speak with developers working in different technologies- ask them questions and try to learn their point of view and get some estimations for your unique idea before choosing which is right for you.
You can also contact Netguru to lend a helping hand - we would love to hear from you.