DEV Community

Discussion on: Why is Laravel much popular in USA than Symfony ?

Collapse
 
tbyte profile image
tbyte • Edited

If you like OOP, encapsulation, clean and well structured code, testability then yes, Symfony is the better solution because Laravel violates all of this principles.

It propagates a false simplicity. It bypasses object orientation massively with its facades , its ORM and its magic nonsense.

The ORM (Eloquent) barely deserves the name as it delivers Model classes which are not much more than associative arrays. Since the ORM does not know your columns it's not capable to tell if one exists or not - it will just fail on save. Apart from column access there is more magical stuff happening with mutators. This whole lib is one of the biggest pile of junk I've seen in a long time, and it implements the Active-Record antipattern. Nuff said I guess.

Blade is not bad but pointless. It can't do anything, twig can't do just as good or better. Also it's not running in a sandbox and allows everyone heavy php code usage in the templates which can lead to a huge mess when inexperienced developers are involved in the project.

IoC / Dependency injection is good, and was actually better than Symfony's approach for a long time because of the powerful auto wiring. You can inject anything into anything without messing with config files or declare services. Symfony is closing the gap now but still Laravel has an edge here.

Vue.js integration / Laravel-mix is great. I'm using it in Symfony where it integrates just as well.

Collapse
 
dennismerrell86 profile image
Dennis Merrell

Luckily Symfony sticks to "good principles" like chucking string event names left and right....

Collapse
 
pictor13 profile image
Igor Pellegrini • Edited

Not saying what's written above is not true, but the whole answer feels like strongly biased; especially because it's not really an answer to the question but just a big praise to Symfony.
Also, IMO, is written from an account that looks like a facade:
no comments on DEV; Github account exists since 2012 and has no single activity since then.