On Sunday, 13 April 2014 14:23:06 UTC+2, piotr_cz wrote:Lately I'm using something like Controller-Entity-Renderer pattern where Entity is plain old php object hooked up to Doctrine ORM and renderer is just an engine like Twig.
All really mportant stuff is being handled in Controller.
That is the Symfony-way. Disadvantage: leading to fat controllers (often camouflaged by "subroutines" of those controllers called Services). The DDD-way would be to add rich behaviour to the entities, going beyond CRUD. Then a controller is not or hardly necessary anymore. Nice, related read: https://groups.google.com/
BTW: MVC is a pattern, not a library, so no necessity to give names like "controller", "model" or "view" to the parts of software fullfilling the controller, model and view role of that pattern. I try to avoid anything called a controller, manager, etc. (but in Doctrine unfortunately have to use an EntityManager).