Welcome Guest, Not a member yet? Register   Sign In
Which HMVC library do you prefer? Why?

There are a few different libraries available that implement HMVC for Codeigniter. Which do you prefer? Why?

Modular Extensions
Modular CI

Thank you for your feedback.


Why? Because of the sopport you get from the Author!


The way I see it, there's only one that can be taken seriously - Modular Extensions HMVC by Wiredesignz

Care to explain why?

[quote author="WanWizard" date="1291037259"]Care to explain why?[/quote]

For a start your idea of what constitutes HMVC is distorted to suit your own needs, WanWizard.

Nowhere in the HMVC design pattern or PAC for that matter are models permitted to load other models. The HMVC design pattern supports modular MVC triads communicating only via controllers.

You constantly talk about "true HMVC" but I don't believe you actually know what that is.

[quote author="WanWizard" date="1291037259"]Care to explain why?[/quote]

Oh good god. Don't take it personally. I'm not taking any shots against your code. I'm offering my opinion. I use HMVC every single day, love it, and have no reason to even think about looking elsewhere.

I'll provide you with one reason, which I am sure won't satisfy your question:

It's the longest running extension which provides HMVC for CodeIgniter (since 2007?). Seriously - why bother with anything else?

I don't take things personally, I just want to know your reasoning, some I might be able to improve it.


You sound like a broken record. There is no "true HMVC" (a search reveals that you are the only one using this term), and there is no death penalty on "not following" whatever pattern you think people should follow.

Modular CI supports models loading models for several reasons (Modular CI support everything loading everything, no need to use get_instance()).

For starters, users asked about it. And I have a need to load Datamapper models in traditional CI models. And for consistency, why use $this->load() sometimes, and be forced to use get_instance() some other times? Not logical.

Also, DRY requires that you should be able to load models across modules. If a module introduces a new table, that module also contains the models for that table. If another module needs access to that same table, in your opinion one has to duplicate the model code? Or call a controller in the other module that calls the model?

Thinking about the right abstraction for a web application, the directory containing the class library must be located outside the directory containing the presentation files. This organization complies with the SEC ("Do not Repeat Yourself) principal to have multiple folders (www.domain.com, management.domain.com, api.domain.com, etc.) to work with the same objects.

DataMapper obviously works with Modular CI, does it work with Modular Extensions as well?

Yes, since a few days.

Wiredesignz has implemented the fix for it, so you can do new Model() where model is part of a loaded module.

Theme © iAndrew 2016 - Forum software by © MyBB