DEV Community

Farhad
Farhad

Posted on

Laravel Or Ruby on Rails 2021?

Hey everyone,
I would like to know which framework will you choose for 2021 I have no exp with ruby and ruby on rails, I am amazed 🤩 by ruby's syntax but I kinda feel Laravel is more modern and popular. so, can you please inform me about its capabilities comparing with Laravel. Thanks, 🙏

Top comments (11)

Collapse
 
ericchapman profile image
Eric The Coder

I use both Laravel and Rails. Personally I prefer Laravel as a framework but of course Ruby is my favorite programming language. Ruby is fun and powerful.

Having say that, I dont like Rails as much as Ruby. To me, Laravel have better documentation, more maintain packages and bigger active community.

Also Laravel have a third party tool call Livewire that allow to do reactive UI using Larvel PHP common syntax without any javascript. There is also a tool for Rails call stimulus reflex that does close to the same thing.

For my pro projects I reach for Laravel and use Ruby for some console project like web scrapper and other small personal project.

Collapse
 
quatermain profile image
Oliver Kriška

Fyi you should know that Livewire was created as a answer for that time new Hotwire for Ruby. And used technique and some code (js) from Rails’s Livewire.

Collapse
 
feriun profile image
Farhad

I was exactly looking for such an answer, Thank you a lot 😎🙏👍

Collapse
 
henriquefernandez profile image
henriquefernandez

Ruby on Rails. I've used both professionaly.

  • Ruby on Rails is much more mature, productive and the framework "just works" as expected.
  • Ruby is far less verbose as PHP, and it matters a lot when you are writing or debugging your app in a interactive console like Pry.
  • Code keeps much more concise and Rspec is the best testing framework created until now, in my opinion.
  • Ruby 3 has 3 times more performance, true concurrency, pattern matching and RBS.
  • Rails 6 has incredible support for the new "Hotwire" framework by Basecamp, it means that your app will flow like a SPA and works in IOs and Android with much less effort.
  • Rails has the best code generators.
  • Ruby on Rails is a battle proven tool used by Shopify, Github, Airbnb and a lot of big companies in high scale.

And the list can grow and grow...

Ruby on Rails are the most underrated tool i know.

Laravel has a nice architecture, but is built upon PHP and much of its features are just a weird copy of Rails community, like the built in Auth. Devise is far better.

Collapse
 
feriun profile image
Farhad

❤ Thank You for your comment,
I have no background with Ruby but it has been a while since I've started learning Ruby, all I can say is that it's perfect and I believed thier claim "A dynamic, open-source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write."

Collapse
 
thorstenhirsch profile image
Thorsten Hirsch

Depends on what you want to achieve. Do you want to focus on the framework or on the language? Do you want to get a job or do you learn it just for yourself? Do you want to see the basics only or add lots of stuff?

Collapse
 
feriun profile image
Farhad

I want to focus on the framework but I have experiences with Laravel, I needed to focus on PHP too, for an optimized output, I like to get a job and I want to build web sites with features not only a basic functionality... So, would you think it worth it to learn ruby from the base and then I switch to Ruby on Rails?

Collapse
 
thorstenhirsch profile image
Thorsten Hirsch • Edited

Since you're a junior I'd recommend not to learn another full stack framework. Laravel and Rails can both be used to build the backend and the frontend of websites, yes, but that's not how modern web apps are built. Modern frontends are separate projects and more sophisticated than what Laravel and Rails can do for the frontend.

Since you already know Laravel I'd recommend to learn something different. So if you really want to focus on the backend the best technology stack to get a job is Java. Learn Spring Boot. And then learn some more Java technologies that you find interesting. The Java universe is huge! Quarkus might be a good choice after Spring Boot.

Thread Thread
 
feriun profile image
Farhad • Edited

Thank you 👍 for your recommendation but we had java courses in university, I don't find it interesting for me 😢

Collapse
 
davidkroell profile image
David Kröll

I've never developed with Laravel in a professional environment, but I have done some school projects (in 2019), and it felt very amazing. It does mostly everything for you. A simple CRUD application is built real quick and it is broadly adapted. It is in fact really popular, but I personally do not like PHP/Laravel anymore. Nevertheless it fits perfecty whenyou want to built server-rendered applications (no JavaScript).

If you use a frontend framework like React or Vue, Laravel would of course also fit but then you have two different tech stacks.

For me personally, I'd either go for JavaScript in front- and backend or switch to C# if the backend gets more complicated.

Collapse
 
feriun profile image
Farhad

Yes, that's exactly what I want to know, Laravel is packed with features, Does Ruby on Rails too? will a same web site get easier and more fun to build with Ruby?