Good practices MVC

2

I'm now starting a somewhat large project, and I chose to use the MVC framework.

I created the whole backoffice base in a folder, but when I created it, I had the following doubt: Should I create another structure (or copy the current one) in the root to the front of the system? Or inside each folder (models, views, controllers) should I create a folder for the back and another for the front?

As the MVC serves to keep a system organized and profitable, I did not see any advantage in creating two structures, so I would like to know the best practice related to this.

    
asked by anonymous 14.05.2015 / 15:09

1 answer

2

Here's a hint of how you can organize your system:

  • Admin

    • resources
    • controllers
    • models
    • views
  • Portal (Front)

    • resources
    • controllers
    • models
    • views

I have worked on some projects that use this structure and it was very practical. For you to have a framework of what structure to adopt, it is worth giving a check on how the frameworks in the markets are doing this.

The above structure is similar to CakePHP. link

    
23.05.2015 / 23:26