DEV Community

Cover image for Top 5 PHP frameworks: Laravel vs Yii vs Zend vs Phalcon vs Symfony, their good and bad sides

Top 5 PHP frameworks: Laravel vs Yii vs Zend vs Phalcon vs Symfony, their good and bad sides

mkdev.me on June 09, 2019

РНР frameworks have a wide variety of functions and ecosystems suitable for zillions of tasks. With them you can create more sophisticated, safe an...
Collapse
 
szymach profile image
Piotr Szymaszek

So are ORMs good or bad? First you write "Databases are handled through ORM which leads to higher performance", but then "Symfony uses much-feared ORM (Propel and Doctrine) and is resource-intensive"?

Collapse
 
nme84 profile image
Jeroen van den Broek

Worse than that, he makes no mention of Laravel's deep involvement with Eloquent, an arguably less elegant ORM solution in which the data defines the model rather than the model defining the data. It's really easy to end up with code that cannot use code completion because your editor has no way of knowing what fields exist in your database.

Most of the cons listed for Symfony (the framework I'm most familiar with) are very weak as well. Yes, Symfony supports annotations but they are always just one of several options. There is little to no need to use them if for whatever reason you don't want to. And what the hell does "Too many entities of different kinds" even mean? Entities in Symfony's context are part of your ORM so assuming those aren't what he's talking about it is a poor choice of words. And in this case I don't see what the problem is. Too many features? Too many options? How is an abundance of either of those a problem as long as things are documented well (which they are)?

Collapse
 
buphmin profile image
buphmin

So ORM's have pros and cons always. They can help with maintainability, structure, and coding in a more object oriented fashion. They also take longer to run, use more ram and generally create more boilerplate.

Collapse
 
szymach profile image
Piotr Szymaszek

Yes, but the author contradicts himself without giving a reason for it. You cannot state the same thing as a pro and then as a con without a word of explanation for it.

Collapse
 
mateuschmitz profile image
Mateus Schmitz

Good post!

Something cool:
When I was working in a Brazilian hosting company, I suggested offering Phalcon in a shared environment. We did, and we were the first one in Brazil.

It was me that put the KingHost's logo in phalconphp.com/pt/hosting

I have been using Phalcon for the last 3/4 years, and it's my favorite framework. I think its performance, lower overhead and learning curve are excellent points. The fact that being developed in Zephir is something to be considered.

Collapse
 
buphmin profile image
buphmin

Neat article. I have found it pretty hard to get everything right when looking at frameworks since there is just so much to them.