Should I make this a Different Module in HMVC Codeigniter? Should I make this a Different Module in HMVC Codeigniter? codeigniter codeigniter

Should I make this a Different Module in HMVC Codeigniter?


It really depends, and it's up to you.

If you want the comment system to apply to other modules some day, definitely make it it's own module. If it's only related to blogs, you could leave it in the blogs modules as it's own controller. This is also where modules::run() and $this->load->module() can come in handy, calling a controller from anywhere to get view fragments, to display the comments.

I would probably make everything it's own module.

It's pretty much impossible to be truly 100% modular, there will always be certain dependencies. The best thing you can do is try to organize it in a way that makes sense to your particular project. In general, modularize as much as possible - if you decide to get rid of blog comments some day, you can just delete the comments module.