Symfony vs Laravel vs Nette - Which PHP Framework Should You Choose
Today, we look on the answer.
According to Wikipedia "the only weapon that is effective against a werewolf, witch, or other monsters". But also "a direct and effortless solution to a problem." Spoiler alert: Silver bullet does not exist.
What does that mean in the software world? Let's say you use framework A. You have many problems - bad documentation, missing package in the core for command bus etc. - with it and you've heard that all of them solves framework B. So you migrate to framework B. Many problems solved. You use it for 2 years and new problems appear and you've just heard that all of them solves framework C...
There are no solutions. There are only trade-offs.
If you have a new partner every 2 years, how well do you think you'll get to know them? Same goes for frameworks (or any field, really).
So which PHP framework would I recommend to you in 2018? You know from my posts and from founding PHP group "Symfonists" in the Czech Republic in 2016, that I'm all over the Symfony. Even though there are many things I disagree with.
Luckily, I'm aware of this confirmation bias, so when somebody asks me the question in the title, I think the right answer is:
Use what you love. There is no better way to do things.
Yes, it can be that simple. I could give you technical arguments like:
- drop 3 lines of framework A code and show that in framework B it takes 20 to do the same,
- show that framework A can process 35 % more requests than framework B,
- show a metric that is 4 times bigger in framework B than in framework A,
- argue that this framework has 10 times more plugins, that one has autowiring and that one has not.
But that's not really the point - it's not a contest, it's fun. Programming needs to be fun, because:
If you're not doing a job you want to do for the rest of your life... why are you doing it?
Ok, let's say you're looking for your first framework to fall in love with. What is the best place to start?
I really fell in love with Nette mainly because of monthly meetups called Posobota. In English: last Saturday shortened to "LaSaturday". Maintained for last ~5 years by Honza Černý who's keeping an awesome job of running them.
It's a meetup with 50 developers, a regular meetup. Regular meetups is the best place to build deep meaningful relationships, where you can learn a massive amount of knowledge over the years and to share ideas and get feedback on them.
This could never happen on conferences, no matter how big.
There is a place where can you learn almost everything about Laravel. It's called Laracasts, it's entertaining, it's short (mostly 3-5 mins long videos) and to the point. A very rare combination in software educational sources.
What I love the most about Symfony? It has people, education, sharing, the newest information, dopamine-driven reward system... guess!
It's a StackoverFlow support for Symfony. I learned a lot of basic know-how there and almost all of the edge-cases. The answers are experienced and right to the point. I just love it. And when I find an outdated answer, I can improve it. That way it's clear, what was the best-proven practice in Symfony 2, in Symfony 3 and is now in Symfony 4 in one page - one example for all How to get Parameter in Controller. Its like Rector just to humans.
It might be weird to see that software is all about people. It's about people, emotions, relationships, what people create from their love - a post, a package, a book, a video series, a local meetup, a beer meetup, a shirt with a logo, a hat with a log, stickers, open-source package, conference, a talk...
There would be no frameworks without you - people talking about it on meetups, online forums, people who write about it with passion in comments on Reddit.
So just go out there on a meetup, grab a beer. No pressure, you can stay there just for 30 minutes and then go home - but try to feel the mood and see how people work in that group. See how that fits you. That way you'll know you have found the best framework for you, not by some random metrics.
As they say:
One loves vanilla ice-cream, the other pistachio.
Spread love! That's all there is :)
❤️️ Do you find value in topics what I write about?
Support my writing by throwing a couple bucks at my Patreon