0

I decided to try HMVC pattern with codeigniter but I have some doubts about how to think about and build my website structure using this pattern so I have some questions:

  1. if the main focus is on modules what is the purpose of application/controllers, application/views and application/models.
  2. can I remove the aboved folders and route the default controller to some module?
  3. if I have 3 controller each of them haveing unique $type and $id but all of them need to call a controller that control every thing about comments in website and just pass $type and $id, will this confilct with HMVC pattern?
Jaroslav Kadlec
  • 2,505
  • 4
  • 32
  • 43
someone
  • 17
  • 8

1 Answers1

0
  1. the purpose of this 3 folders is to have the most 'generic' things on your application. For example, if you have a crud model, you should have on the main model folder, outside your modules. Other example, if you have a generic header/footer view you should have it in the main views folder, and so on.
  2. You shouldn't remove this folders, but you can set the default controller just adding the module in front.
  3. I think this is not a problem, it will not be any conflict on hvmc pattern

here you have a good guide

David
  • 1,147
  • 4
  • 17
  • 29
  • thanks very much, wanna ask if there is any video tutorial on building complete website using this pattern so i can learn more , and thanks again – someone Feb 19 '16 at 11:12
  • thisvideo may help a bit more maybe https://www.youtube.com/watch?v=8fy8E_C5_qQ – David Feb 19 '16 at 11:15
  • yeah ,i know him , i saw his tutorial and helped much but seem no other tut. on it any way thanks very much – someone Feb 19 '16 at 17:06