So, I’ve been working with Zend Framework for more than 2 years now, and I love it. But now I’ve got to create a small custom framework for one of my courses, and a fellow coder suggested I try HMVC.
So, my question is:
What are the pros/cons of choosing HMVC over straight up MVC in PHP?
I have heard about the scaleability pros, and such, but I’m looking for a more broad and complete answer. And I would really like to see a list in each part (prefferably with a source).
Basically, the HMVC pattern is just an extension of MVC. An HMVC application includes one or more MVC sub-applications. So anything MVC can do, HMVC can do too. Now, it depends on whether you need the flexibility and scalability that HMVC offers.
In terms of performance, there’s no difference between HMVC and MVC (as long as it’s properly implemented). Sam de Freyssinet, one of the developers of Kohana (an HMVC framework), explains that very well – http://techportal.inviqa.com/2010/02/22/scaling-web-applications-with-hmvc/