HMVC pros and cons compared to MVC in PHP

So, I have been working with Zend Framework for over 2 years now and I like it. But now I need to create a small user structure for one of my courses, and another coder suggested trying HMVC.

So my question is:

What are the pros and cons of choosing HMVC over direct MVC in PHP?

I have heard about the benefits of scalability, etc., but I am looking for a wider and more complete answer. And I would really like to see a list in each part (preferably with a source).

+4
source share
1 answer

Basically, the HMVC pattern is just an extension of MVC. An HMVC application includes one or more MVC routines. So whatever 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 is no difference between HMVC and MVC (provided that it is implemented correctly). Sam de Freixine, one of the developers of Kohana (HMVC structure), very well explains this: http://techportal.inviqa.com/2010/02/22/scaling-web-applications-with-hmvc/

+5
source

Source: https://habr.com/ru/post/1397198/


All Articles