I have used both framework and symfony looks robust and simple while laravel is like a big truck.
Laravel vs symfony is much like comparing python vs golang where python is adopted by big community and golang is not but when it comes to robustness and efficiency, golang beats python.
Let's debate on thisπ€
Top comments (50)
Laravel is like WordPress, it gets popular thanks to its fanciness. They keep adding cool things from here and there.
Symfony for me is industry standard, it's for serious projects that want to stick with with battle tested, well thought out platform.
I agree with everyting except with the "Laravel is like Wordpress" bit.
Yes, Laravel is big and heavy if you want to use more features. You could very well build a lightweight performant application with only a few of it's features if you wanted to.
So, I view laravel as a nice wrapper to symfony with some cool new features, but yeah. symfony could be viewed as an industry standard or at least a starting point for any sort of project
That's a very cynical view you have there, but it is also incomplete and contains at least three things that are flatly incorrect. Nevertheless, a very popular opinion to have. I assume you don't really believe that and just think it is what you're supposed to say. I could be totally wrong, feel free to elaborate on the specifics of your position.
So I can not have my opinion then? If you think I'm wrong feel free to share your facts, it's your responsibility to convince me if you want to prove me wrong :).
Little modification required i think. Wp is CMS and laravel is framework that itself is a big difference because CMS has everything and you don't literally need to write code to run a website(until you have to put custom things) while laravel requires you to be a good PHP(with oops) developer π
There are some CMS built using laravel too incase you're referring that but fact is there's a huge difference between laravel and wordpress.
I'm glad you have your opinion, the cool thing is that opinions are easier to change than your shoes. Here are three things in your opinion that I disagree with.
1) Laravel is not like WordPress - Laravel is a framework, WordPress is a CMS
2) WordPress and Laravel are not popular due to their "fanciness" - fanciness is not defined or implicitly meaningful.
3) Laravel is built on Symfony components - what makes you think it isn't battle tested or "serious?" This disproves itself. If "serious" projects are built with Symfony, and Laravel is built on Symfony by your stated logic Laravel should be assumed to be equally "serious" as Symfony.
Additionally, WordPress and Laravel became popular a decade apart, and the reasons for their popularity are completely distinct from one another, ten long years worth of distinction.
I could go on, but I won't. I will, however, apologize if my tone offends you. I can be insensitive in presenting my dissent, but I do mean to help us all to better understanding. There's a lot of superstition floating around and it makes me touchy.
The choice does not lie in which is a perfect solution for every case, but which are sufficient and in what specific ways for a specific case. WordPress is the right choice for some cases, as much as it pains me to say so. Laravel is a cult, but it is a cult I love. It is useful for many use cases I personally encounter. Real companies make real money with it, large public nonprofits educate children with it I'm not sure what's not "serious" nor what is so "fancy" about that. I also don't know why "fancy" was used pejoratively in your post, and I'm happy with never knowing. Best of luck learning about the wild world of web stuff, there's a lot to know.
[Edited to be slightly nicer, 1 day later.]
You explained nicely π
Thank you for not going on Jeremy. Clearly we've been shown the light. How long and hard did you think you that post? I'm just curious
I probably spent twenty or thirty minutes on it.
Yeah why are you analyzing it Freud these are just opinions.
Because the devil is in the details, Jung. :D
Hey Dan, I'm in Idaho too, how about them apples?
Given that laravel uses a lot of symfony components, I see it as an extra layer on top of symfony.
I've never properly used Laravel (possibly going to explore it for my next project) but I'm building an application now which uses a lot of symfony components itself.
I really like the flexibility Symfony brings. Use only what you need, and nothing more. Yes you can start from website-skeleton and have more than you thought you would need. But you can also just use parts like httpfoundation and build everything else yourself.
I've first used Symfony 2 and 3 then I started using Laravel 5 (now it's version 8). I've never looked back since.
@gary Bell
Symfony alone is a general term that combines Symfony components and Symfony framework.
Symfony components is a robust php components library the same as The PHP League and Aura (more at Awesome php).
Beside Symfony components Laravel has its own set of components called "Illuminate". They are kind of coupled to the framework however a project like Torch shows how you can use them outside Laravel.
Symfony framework in the other hand is a suggestion by the same author for an architecture and code structure built on top of Symfony components.
Laravel uses some of Symfony components plus other vendor components and created its own set of components.
As I type this message Laravel and all its components uses exactly 11 unique Symfony component out of at least 40 unique external package it uses (check Laravel dependency graph).
Here's the list of unique components it uses. I made the extraction manually it's possible that I missed one or two.
Some of them are for debugging or console usage. When using Laravel you won't be directly exposed to these components as they are nicely wrapped by Laravel components and helpers.
Using any external component is not a degradation to the value of the product. Why would the author re-invent the wheel when there's already a well-tested component that serve his needs?
@Mukul Mishra
On a clean Laravel 8 installation, there's only 28 unique symfony packages being installed. The extra components are installed through external vendor Laravel uses and are not directly used by Laravel.
Regardless, how come hundreds of symfony packages being installed with Laravel while the whole Symfony components library contains only 73 packages?
Considering the list of Symfony components that Laravel really uses (listed above) do you really think that Laravel core is only built using Symfony components?
Yes symfony leads in this case. When I installed laravel hundreds of symfony packages were installed. Laravel is bigger ofcourse but core is built by symfony components
You're right, Laravel is a like a big stack of stuff that you're either all in on or not. All frameworks are cults. I say this as a member of the Laravel cult. The tradeoff is you'll end up re-implementing most of the stuff in Laravel that was built over years by well meaning smart folks from all over the world, but you'll get to make your own specific design choices. Every choice in every case has a cost and possibly a benefit. There's literally no way around it. Every choice is a trade-off. There is no single general solution to the highly varied problems that we solve with software. What are your needs, aptitudes, experience, budget, preferences, and constraints?
I disagree completely with both your summary and the resulting premise in regards to Python vs Go. That class of "programming languages/frameworks as sports teams" competition-minded domination psychology based evaluations are both meaningless and harmful. They are meaningless as posed, the questions being asked and assertions being made are not usefully meaningful as to be answerable nor employed in making informed decisions. They are harmful to software development culture because they force us into little camps that engage in pseudo-intellectual tribal warfare with "the others" in that other language ecosystem camp over there. They are harmful to software itself because we often reject the use of good ideas just because they come from another camp. This approach to evaluating software ecosystems is additionally harmful in that it persists as meta-misinformation by instructing future students in the field using corrupted approaches. We are literally all in this together, let's at least try to act like it.
If you want to understand the pros and cons of Laravel vs Symfony you're asking the wrong questions.
[ Post-Script Note: I don't consider myself above these prejudices, I admit I am part of them and I'm trying to escape. ]
for me laravel is only popular thanks to laracast
Laracast is a subscription-based model product. In my opinion, that model won't grab enough people to make Laravel popular.
Laracasts helped, but does not account for the popularity of Laravel. There are new developers entering the scene every day, and there's nothing wrong with Laracasts, it is a great resource. There's a lot of free content there, too, so subscriptions aren't the only factor.
Indeed Laracast is a great resource that delivery both knowledge and quality. However, all the courses are paid and I quote from their FAQ page:
The discussion forum is accessible to the public on the other hand.
Edit:
You can find some free courses and previews in Laracast.
That was not always the case, thanks for educating me. I still love ol' Jeffrey.
Nah, Mazen is wrong. Even the FAQ he quoted says there is free content.
Open up an incognito window or log out of your account and you'll find plenty of courses to watch for free.
Indeed, I've checked again and there's some free courses and previews. What got me that is not obvious when you check the current website and FAQ. It clearly state that it's subscription based.
Could you clarify how the FAQ I quoted says there's a free content? here's another quotation from Laracast's FAQ
The first FAQ you linked asks "is there any free content?" and the answer is "Of course!" aka "yes, there is free content."
It then says that the author wishes ALL the content could be free, but he charges for some of it because he needs to pay the bills.
Cool! Thanks for the clarification. I thought that 'Of course!' was part of his wish.
Great! Tried lumen too ?
I like both Laravel and Symfony and as you know Symfony is the father of Laravel :D. But learning curve of Laravel is really less than Symfony while Symfony has a more standard structure I believe.
Ruby on rails is the father of Laravel.
Laravel is not built on top of Symfony framework. It only uses some components from the Symfony components library.
I've elaborated more here
Taylor Otwell is literally the father of Laravel lol..and Spring framework is the very first MVC framework introduced to us. ofcourse ROR was a gamechanger but its not like we can say ASP is father of dJango.
depending on programming language, there are lots of libraries, packages, nudgets, bundles, extensions etc associated with frameworks but one thing is there which is globally relatable and that's the ** MVC Architecture **
Taylor was heavily inspired by RoR when first created Laravel and still some of new products and features are attempts to catch up with RoR.
Mazen, I agree with both you and Mukul on this point. RoR was an inspiration to Mr. Otwell, and to everyone building stuff for the web at that time. But Taylor is the ultimate LaraDaddy. It is worth noting that .NET MVC was probably an influence too. Spring and Spring Boot are probably the best things to ever happen in the Java world.
(I'm going to tell you a secret; I always call it LARRYVILLE in my head, just for fun. I have a scaffolding set up for Laravel by that name and I can't unhear it. Long Live Larryville!)
I think calling MVC an architecture is a bit of a mental trap, I consider it a design pattern. It's actually two different design patterns with a single name. What we call MVC now isn't really what the original pattern was meant to be, and that's okay. MVC for the web is super cool because it does provide some sort of global relatability, that's a really strong point. However, the application design doesn't inform the infrastructure and operation of the thing. MVC plus Infrastructure, Scaling, Distribution, Availability, Replication and Sharding strategies, CI/CD, Development Process, QA, Logging and Monitoring...maybe that makes a basic architecture, but MVC is a small piece of that, to me.
Good thread.
Symfony is great, Laravel is great, we should choose based on our needs and constraints for the given case.
Both have ecosystems and expected standards - basically a philosophy.
However, to keep this simple (and from my perspective), the key differences that I've noticed over the years:
Laravel:
Symfony:
For me it is based a lot on what you want to do with the application you are creating.
If you want an application with CRUD and a lot of logic coupled to the Framework to make an MVP or because the application is small and will not grow, use Laravel.
If what you want is an application that lasts in maintainable time and that is not coupled to the infrastructure, use Symfony.
With Laravel you marry the ORM eloquent an ORM that is an "Active Record" and that will be the one that will dictate the id of your models.
With Symfony you have an ORM that is a "Data Mapper" and that works with the implementation of "Unit of work" that allows the simple implementation of other IDs not stipulated by the ORM.
Many people will say that this of the IDs that I comment, can be achieved with libraries, but obviously you already have to develop things or modify things in the Framework to be able to work.
Also for people like me who are working daily with an application that has been in production with Laravel for a long time, you know that they sell you their ecosystem despite the fact that there are thousands of things that already exist on the market and are proven to work, like Laravel Horizon instead of Rabbit MQ, ...
The Laravel ecosystem is also very changeable, such as when they released Laravel Nova, on Twitter they only read things about that, we use it and they carry more than no real and active support over three years. As you can imagine that is a π© for an application in production.
If you know spanish you can watch this videos and understand more if what I al talking about.
youtu.be/EInyOtPra44
youtu.be/0xMY40aK3fk
youtu.be/-Cim-IgBoLA
It bums me whenever I need a package and see that there's a Laravel-only package available.
On the other hand, I am happy if there's a Symfony package for what I need, because I can use it even without Symfony (the framework).
That's a fair point about the current PHP ecosystem We should endeavor to make more packages that aren't specific to any framework, whenever possible.
I'm not a PHP dev by day but I often reach for it for many side projects and contract jobs. When I do, I really appreciate an opinionated framework like Laravel. The amount of time I save is extremely helpful. I don't want to have to think of things like routing or whatever. I would likely spend time writing some of the same solutions Laravel has already put together for me. I can really focus on solving client issues, which is probably not routing. I've also found that with a little digging, I've not had any issues customizing when needed.
twig is the best template engine for PHP !!
For sure.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.