What’s the basic differance between MVC and HMVC ?


MVC only has 1 controller per request, HMVC can have many.

MVC request processing:

1. bootstrap, determine uri
2. route and load controller
3. display output

HMVC request:

1. bootstrap, determine uri
2. route and load main controller
2a). create request, route, load controller
2b). create request, route, load controller
...

3. display output

Basically, at any point within an HMVC framework, you can do something like this:

Each request is entirely self-contained, as if someone went to (for users/login) http://example.com/users/login. It’s very similar to AJAX, except that all of the requests happen within the main request.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.