DEV Community

Adnan Babakan (he/him)
Adnan Babakan (he/him)

Posted on

Which one should I use for my new project? RoR, Django or Laravel?

Hey there people.

So I have a new project that's not forced to be written using a specific language or framework and I wanted to ask if anyone has any suggestion about any of these three frameworks for the back-end?

I know Laravel and it was my first choice but I want to try a new one too.

Front-end is going to be on Nuxt.js (My favorite XD) so the back-end is only going to be used for building RESTful.

The website is going to be a very simple social network so nothing very special is needed.

Top comments (6)

andrewbrown profile image
Andrew Brown 🇨🇦 • Edited

All three are great frameworks.

Python / Django is highly in demand in the industry because so many startups are "data-driven" so they use Python for Panda and scikit-learn so they end up using Python for everything.

Ruby on Rails is the most complete framework, has the most documentation and support around and will give you a clear picture of all the components involved in the framework.

PHP has the advantage of low operation costs. Where Ruby and Python require more memory you could deploy a PHP Laravel app on the smallest of servers. Laravel is heavily influenced by Rails with a large emphasis on writing your own middleware. You won't be writing any middleware in Rails since it gives you all the middleware you need by default.

If you want something very different from the three then choose Django. But if you want something truly wild and new I would suggest Elixir / Pheonix

adnanbabakan profile image
Adnan Babakan (he/him)

Thank you so much for your time that you spend writing this for me.
This was very informative and very useful.
Something new and cutting-edge is always tempting but still the community around it is always important so that I find my questions' answers quickly and I believe Ruby on Rails is worth it to try since this website is also written in Ruby I think.
I will still wait for other answers so I make my last choice. XD
Thanks again

buphmin profile image

Of the three I have played with Laravel and Django and know very little about rails other than it's popularity. Laravel uses Symfony components, which are top notch PHP code, so I suspect Laravel is over all pretty decent. I have heard good things about Django but from my limited time with the framework I know it is fairly object oriented and knowing what I know now Python is not all that great for OOP.

If the backend is only a REST api you may want to consider nodejs and something like express. Performance wise in a request/response scenario nodejs will be significantly faster without a large difference in code and scale much better. Food for thought. Otherwise I'd choose Laravel as it likely will perform the best of the 3 because PHP is very fast.

adnanbabakan profile image
Adnan Babakan (he/him)

Thanks for sharing your experience.
Almost all the back-ends which are actually API end-points are in Node.js so I wanted to try a new thing rather than Node.js.
And about Laravel I have worked with Laravel before and I'm kind of hesitating about using it since I don't love PHP that much nowadays. XD

buphmin profile image

Fair enough. PHP really isn't that bad if you write good code. It has a lot of opportunities for abuse, but other than that it has some good stuff in it.

panosru profile image
Panagiotis • Edited

Trying new things is almost always good, I find myself in the same boat as yours quite often.

Sharing my idea about the topic is mostly not to recommend to you what to use, but to focus on a few key points that I find valuable to share.

For PHP I use Phalcon. Its speed is superior to other frameworks. Before using Phalcon, I used Laravel. I still occasionally use Laravel when working with clients, who already have it deployed. I have not used Symfony framework as a whole in a while. However, I do use its components. Outlining the pros and cons would make an article of its own. In short, any of the forth-mentioned PHP frameworks provide a comprehensive solution to your problems, although I would choose Phalcon.

As Mr Brown mentioned, learning Elixir/Phoenix is a great opportunity to try something new. If you are already familiar with the syntax of Ruby and Rails framework, you will become comfortable with Elixir/Phoenix relatively quickly. Personally, since I mostly write in C-Styled languages, it took me 2-3 days to get used to Elixir's syntactic style. The speed Elixir provides, being Erlang-based, is astonishing. I would go as far as to say, the performance is superior to all other languages. The downside is the lack of support from the community in comparison to Node, PHP, C#, Ruby, Go, Python, Java etc. The majority of packages lack proper documentation, some are even outdated. Despite that, the three weeks I took to create a project from scratch in Elixir/Phoenix were fun and fulfilling.

Regarding Node/Express (.js), I agree with "buphmin". It's a great combination for API building. Node not only has rightfully claimed a spot among top technologies but has also built a large community and does not lack a variety of updated packaged - although not my choice of preference - it's almost a fail-proof option for your case.

My personal preference is C#/.NET, without wanting to sound biased about it, and trying to be as much objective as possible, I feel that this combination is a very robust and a good choice for the long run.

Other combinations I suggest for your consideration are Go/Echo, Go/Gin, or Rust/Rocket. In contrast with Elixir, those have gathered more attraction recently - especially Go - allowing developers to interact with an active community and choose from a variety of packages. Although Rust falls in the same downside as Elixir regarding the documentation, it provides better CPU performance when dealing with heavy tasks, while providing you with all the traits of a modern framework with Rocket. On the other hand, while Go is lacking in speed compared to Rust and Elixir, it has a very strong community and the documentation is great and is backed by Google.

For Python/Django, Ruby/RoR, Java/Spring or JEE I don't qualify enough to express my opinion since anything I have done so far with those technologies is on RND level.

The choice you make is utterly yours. Based on your criteria, goals and requirements of the project, you pick the one that serves your purpose.

Things I would consider would be the community, the packages available to make my life easier, look for popular packages and their latest update, performance-wise and code syntaxes.

Crucial also is to follow a proper architecture, for if not, you might face difficulties while progressing; but that is another topic.