News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Wojciech Sznapka:
Is Symfony2 a MVC framework?
November 05, 2012 @ 10:18:44

In his latest post Wojciech Sznapka wonders if Symfony2 is actually MVC or if it's just the "C" and "V" in the equation with the "M" (Model) layer being left wide open.

The question is: where is Model layer in Symfony2? My answer is: there's ain't one and it's good.. Symfony2 isn't hardly bounded with Model layer, as it could have been seen in first version. We can see many Active Record model implementations in modern web frameworks such as Ruby on Rails, Django and symfony 1. I'm not saying those solutions are bad. The main problem was, that big systems maintained by plenty of developers changing over time tends to have a messy codebase. The common place to locate business logic were Model layer. The result of that approach were huge model classes, randomly structured Table/Peer classes full of static method and general feeling that system is hardly impossible to maintain anymore.

He talks about the main problem that comes from this style of coding - overly complex systems - and one possible way to help mitigate them using domain-driven design practices. He lists a few of the things that Symfony2 comes with that could be helpful for this method including the dependency injection container, the use of entities, repositories and value objects.

0 comments voice your opinion now!
symfony2 mvc framework domaindrivendesign ddd


blog comments powered by Disqus

Similar Posts

Paul Jones' Blog: Solar 0.25.0 released

EngineYard.com: Cloud Out Loud - Future of PHP (ZF2 & CakePHP)

Symfony Blog: The "Practical symfony" book is now on sale

Henrik Bjørnskov's Blog: Symfony2: Using the validator symfony1 style

Phil Sturgeon's Blog: CodeIgniter "2.0": Rumours, facts and requests


Community Events

Don't see your event here?
Let us know!


language version opinion interview laravel5 xdebug laravel framework php7 release series example install api community introduction podcast extension voicesoftheelephpant unittest

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework