Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
FuelPHP HMVC?
  • Hello,
    I tried Laravel 5 and was not happy when I ran into issues and no one could help me.
    Yii2 looks ok, but seems too complicated.

    I used Codeigniter3 with HMVC, but when I moved it to webfaction, nothing worked. Worked fine on my mac.

    So now I am wondering if I should invest some time in FuelPHP using HMVC or just MVC.

    Thanks
  • HarroHarro
    Accepted Answer
    First you have to make clear what you mean by HMVC, and/or what you think HMVC is.

    With regards to Fuel, HMVC is a hierarchical Controller structure, where controller actions call other controller actions. You use this to avoid code repetition, decoupling between distinct application components, or to call an exposed API internally without having to do an HTTP request.

    For CodeIgniter, the term HMVC is (mis-)used to create a poor-mans implementation of modularisation. For which in Fuel you don't need HMVC, modularisation for both the application (modules) and the framework (packages) is built into the core.

    So what is it exactly that you want to achieve, and for which you think you need HMVC to solve that?
  • I want to avoid code repetition.
    Thanks for explaning this.

    Maybe I will avoid Codeigniter 3 in favor of FuelPHP.
    I will try and redo some CI stuff in Fuel.
  • Should be easy enough.

    If you need help, just shout, or pop into IRC. A lot of Fuel dev's came from CodeIgniter (including myself).
  • Ok, thank you Harro
  • Hello frocco,
    I used ci3 for 2 month, it is cool, i implement my own auth and template, it is ok, i love coding, but when i decide to use some modules and widget, CI3 unfortunately fails, there is some great HMVC third parties for CI3 but i decide play more with fuelphp, ( at the same time i am working my app using CI3 ), i like CI3 and also like fuelphp clear structure and its built-in hmvc, please let me know your result about CI and Fuelphp,
      
  • HMVC, and Wiredesignz bolt-on solution, was one of the many reasons for the original FuelPHP team to leave CI (one of them being an Ellislab employee, one was the "Reactor" team leader) and start a new framework.

    If you want to know what a disaster it is to write a large and modular application in CI, have a look at https://github.com/clearos/framework and all it's app-* repositories. Check the code to see how they have to hack their way around to get it to work.

    While that all works out of the box in Fuel...

Howdy, Stranger!

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

In this Discussion