Hacker News new | ask | show | jobs
by madawan 4146 days ago
When I tried SF2 I found it to be a terrible, Java-like, pile of abstractions. This might work for some people, but if you prefer thinking about business logic (as opposed to "where do I extend this IoC dependency container so that it can find my ControllerFactory), it's not for you. It left me bitter.

Yii is supposed to be nicer, I heard from colleagues, but I left PHP programming the moment I saw the opportunity so I can't vouch for that.

2 comments

Extending the IoC container?? A ControllerFactory?? You never do anything like that in Symfony. The thing I appreciate most about Symfony2 is how it enforces good design patterns.
One might argue that the SOLID principles applied in Symphony and inherited by Laravel are in fact anti-patterns which only serve to add massive cognitive overhead. They've wrecked countless Java projects over the years and are now going to do PHP the same favor.

There's even less reason for a scripting language with a GIL to be saddled with this level of complexity, than there is for Java.

Much of the complexity in Symfony comes from its "dependency injection" component (a misnomer, really) and the inclusion of annotation magic in the standard framework distribution.

These days, I'd rather use the basic components (e.g. Symfony's HttpFoundation library) with something like league/container (formerly orno/di) and a simple routing library like nikic/FastRoute.

> They've wrecked countless Java projects over the years and are now going to do PHP the same favor.

Oooh do enlighten. I made an argument when Symfony2 first came out that PHP isn't Java, and now I've been brainwashed to think the Symfony community is right.

Very refreshing to here an alternative point of view :)

Can you elaborate on "the SOLID principles [...] are in fact anti-patterns"? I don't see this point of view exposed often, can you point me to some resources in this regard?
I really enjoy using Yii. It's not perfect, but it seems underrated to me.