Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Any Tutorials on using HMVC to build an app?
  • I looked at the docs, but to be honest, I am lost at how to implement this.

    Thank you
  • I think the question should be: what do you want to achieve? What do you want functionally? Or are you going to implement something for the sake of it?
  • 1. I want to learn how to use HMVC
    2. I want to reuse some of my routines in future websites.

    I have used HMVC in Codeigniter (with addon) and just had to create a modules folder and add folders for controllers, models and views. Then just use modules::run
  • oil did a nice job for my admin back-end, however I needed to write a forget password routine.
    I was thinking it would be easier to drop this in in future apps.
    Or can oil be modified to easily add this?
  • HarroHarro
    Accepted Answer
    As I wrote earlier, HMVC in CodeIgniter is not HMVC, it's wiredesign's poor mans way to create modularity in CI.

    If you want modules with specific functionality you can isolate and re-use, you can just do that in Fuel without anything special.

    Fuel modules are explained here: http://fuelphp.com/docs/general/modules.html

    They are identical in structure to your app folder, but all classes in it have a namespace equal to the module name.

    So say you have a controller named "Controller_Login" in your app, and you move it to a module called "admin", it will become "\Admin\Controller_Login" (so "Controller_Login" in the namespace "Admin"). Likewise, the URI will change from "\login\action" to "\admin\login\action".

    So all those special things and strange constructions you had to use in CI, forget about it.
  • Cool, thanks for explaining this.
    I already accomplished more with FuelPHP over CI because of oil.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion