Difference between revisions of "File and Directory Structure"
(→App Structure) |
(→App Structure) |
||
Line 25: | Line 25: | ||
**** view name - support multiple sets of views. | **** view name - support multiple sets of views. | ||
*** controllers | *** controllers | ||
− | *** rest - RESTful web service support need to find the best location for this | + | *** api |
+ | **** rest - RESTful web service support need to find the best location for this | ||
+ | ***** v1 - version number | ||
** images | ** images | ||
** xml | ** xml |
Revision as of 22:36, 12 October 2012
Current and proposed directory structure. Suggestions for improvements are welcome.
HMVC
Hierarchical model–view–controller
The concept of the directory and file structure is to create plug-able self contained applications. It is also designed as a move to refactor the project to use the HMVC design pattern. See the following links for additional information.
- http://techportal.inviqa.com/2010/02/22/scaling-web-applications-with-hmvc/
- http://net.tutsplus.com/tutorials/php/hvmc-an-introduction-and-application/
App Structure
Design goal for applications are self contained application that is designed to plug in a simple way.
location: fusionpx/app
- root.php
- app_config.php
- app_defaults.php
- app_languages.php
- resources
- classes
- models
- views
- view name - support multiple sets of views.
- controllers
- api
- rest - RESTful web service support need to find the best location for this
- v1 - version number
- rest - RESTful web service support need to find the best location for this
- images
- xml
- dialplan
- classes
Core Structure
Same as App Structure only the bare minimum applications belong in core such as menu, user managerment, groups, permissions, domains and default settings.
location: fusionpx/core
Future Improvements
- includes/lib_switch.php
Move the functions this file contains into classes in their respective directories.
- includes directory
Consider renaming this directory to resources.
- includes classes
Move the specific classes into their respective app/resources/classes directories.
- includes/classes/install.php
Move the rest of the install.php file into methods of the install class.