Welcome Guest, Not a member yet? Register   Sign In
How to use HMVC
#1

[eluser]SMaton[/eluser]
Hi,

I've been pointed to HMVC to implement modules that I want to be displayed dynamically. But I must admit that I don't quite understand how to use it properly.

1. The wiki page installation guide says that in order to test it, one simply has to copy the different modules into various sub-folders and then access the appropriate url. Somewhere in the forums I read that one must set an auto-load to enable HMVC. But then, I see that it "just works" as described in the wiki. Do I miss something?

2. How do you actually use it? I see some people deriving from HMVC, others from controller and again others from module. Is there somewhere a clear description on how to use it? (containing i.e. a main page with some modules loaded and run; a bunch of files I could upload onto my server and see how it actually works)

Thanks,
Stefan

PS: I'm new to this framework, I have done 2 small php projects, so I'm certainly no php-guru... sorry if I'm asking stupid questions.
#2

[eluser]Yorick Peterse[/eluser]
First thing you should know is that as far as I know there's no native way to use HMVC in CodeIgniter without the use of libraries. There are mainly two libraries you'd want to use, Matchbox and Modular Extensions.

I'm currently using the latter one and I absolutely love it : http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/
#3

[eluser]SMaton[/eluser]
Yeah... that's what I've downloaded and installed. But there's no real explanation of how to use it with a short example (one main page with i.e. 2 or 3 modules). That's what would be interesting to see.
#4

[eluser]Yorick Peterse[/eluser]
[quote author="SMaton" date="1246929126"]Yeah... that's what I've downloaded and installed. But there's no real explanation of how to use it with a short example (one main page with i.e. 2 or 3 modules). That's what would be interesting to see.[/quote]

There isn't much else to do besides putting them into seperate modules. The modular extensions documentation is quite easy to understand Smile
#5

[eluser]SMaton[/eluser]
Ok... I get it now... didn't see the link to the further wiki entry...

Thanks,
Stefan




Theme © iAndrew 2016 - Forum software by © MyBB