CodeIgniter Forums
Which HMVC library do you prefer? Why? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Which HMVC library do you prefer? Why? (/showthread.php?tid=36341)

Pages: 1 2 3


Which HMVC library do you prefer? Why? - El Forum - 11-28-2010

[eluser]RJ[/eluser]
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.


Which HMVC library do you prefer? Why? - El Forum - 11-28-2010

[eluser]InsiteFX[/eluser]
HMVC

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

InsiteFX


Which HMVC library do you prefer? Why? - El Forum - 11-29-2010

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


Which HMVC library do you prefer? Why? - El Forum - 11-29-2010

[eluser]WanWizard[/eluser]
Care to explain why?


Which HMVC library do you prefer? Why? - El Forum - 11-29-2010

[eluser]wiredesignz[/eluser]
[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.


Which HMVC library do you prefer? Why? - El Forum - 11-29-2010

[eluser]Developer13[/eluser]
[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?


Which HMVC library do you prefer? Why? - El Forum - 11-29-2010

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

@wiredesignz,

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?


Which HMVC library do you prefer? Why? - El Forum - 11-29-2010

[eluser]amosjohn[/eluser]
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.


Which HMVC library do you prefer? Why? - El Forum - 11-29-2010

[eluser]RJ[/eluser]
DataMapper obviously works with Modular CI, does it work with Modular Extensions as well?


Which HMVC library do you prefer? Why? - El Forum - 11-29-2010

[eluser]WanWizard[/eluser]
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.