Difference between revisions of "File and Directory Structure"

From FusionPBX
Jump to: navigation, search
 
(9 intermediate revisions by one other user not shown)
Line 2: Line 2:
  
  
* HMVC - Hierarchical model–view–controller
+
=HMVC=
The concept of the directory and file structure is the goal of moving the project to the HMVC design pattern. See the following links for additional information.
+
Hierarchical model–view–controller
  
** http://techportal.inviqa.com/2010/02/22/scaling-web-applications-with-hmvc/
+
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://net.tutsplus.com/tutorials/php/hvmc-an-introduction-and-application/
+
 
 +
* 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=
 
=App Structure=
 
Design goal for applications are self contained application that is designed to plug in a simple way.
 
Design goal for applications are self contained application that is designed to plug in a simple way.
location fusionpx/app
+
 
 +
location: fusionpx/app
  
 
* root.php
 
* root.php
 
* app_config.php
 
* app_config.php
 
* app_defaults.php
 
* app_defaults.php
* app_languages.php
+
* [[app_languages.php]]
* models
 
* views
 
* controllers
 
 
* resources
 
* resources
 
** classes
 
** classes
** functions
+
** models
** images
+
** views
 +
*** images (global)
 +
*** view - support multiple sets of views.
 +
**** images - images specific to this view
 +
** controllers
 
** xml
 
** xml
 
*** dialplan
 
*** dialplan
Line 28: Line 32:
 
=Core Structure=
 
=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.
 
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=
 
=Future Improvements=
Line 35: Line 41:
  
 
* includes directory
 
* includes directory
Considering renaming this directory to resources.
+
Consider renaming this directory to resources.
  
 
* includes classes
 
* includes classes

Latest revision as of 01:07, 5 June 2013

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.

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
      • images (global)
      • view - support multiple sets of views.
        • images - images specific to this view
    • controllers
    • xml
      • dialplan

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.