Sunday, April 20, 2014

confusion related to HMVC design in codeigniter

There are two main different features that HMVC adds to CodeIgniter which often confuses people:
  1. Modular MVC
  2. Hierarchal MVC
Modular MVC is the feature that most people want to use and is essentially just a way to have a cleaner folder structure.
HMVC is the practise of calling controllers from other controllers without the need for a new HTTP request. This is very rarely useful in my opinion, other than for things like calling a custom 404 page or "widgets".
MMVC adds barely anything to performance, calling a controller via HMVC is obviously almost twice as slow.

Either way neither will be noticeable. If your site is starting to crawl under high traffic then this is one of the last things you'll need to worry about.

No comments:

Post a Comment