Presentation is loading. Please wait.

Presentation is loading. Please wait.

I2CE Framework I2CE: Intrahealth Informatics Core Engine Base Web Framework on which iHRIS Manage and iHRIS Qualify are built on: Module Structure Magic.

Similar presentations


Presentation on theme: "I2CE Framework I2CE: Intrahealth Informatics Core Engine Base Web Framework on which iHRIS Manage and iHRIS Qualify are built on: Module Structure Magic."— Presentation transcript:

1 I2CE Framework I2CE: Intrahealth Informatics Core Engine Base Web Framework on which iHRIS Manage and iHRIS Qualify are built on: Module Structure Magic Data Pages and the Wrangler Templates HTTP Requests

2 I2CE Framework: Modules Basic functional unit for the I2CE Framework Defined by configuration.xml file Contain a collection CSS, HTML, Javascript, PHP, SQL, graphic files, etc. Can define configuration data (Magic Data) Modules have versions and can require or conflict with other modules Modules can optionally enable other modules

3 I2CE Framework: Modules Modules can also be associated with a subclass of I2CE_Module Allows for adding new fuzzy methods to a class Allows for hooks into various parts of the code Handles the updating process as the module's code changes

4 I2CE Framework: Modules Configuration File Structure Determined by: I2CE/lib/I2CE_Configuration.dtd I2CE/tools/check_validity.php Required: Version, name and displayName in the metadata sections Optional: Dependent modules Search paths for different file types (SQL, images, html templates) Configuration/Magic data

5 I2CE Framework: Magic Data Tree structure for dynamic definiton of iHRIS software: Enabled Modules Pages Forms Reports Defined in configuration xml files Stored in the database table config_alt Cached in APC or memcached for speed Values of a node are specified by a path: /some/path/to/a/magic/data/node

6 I2CE Framework: Magic Data Example from background process module: 3.2.2 Can view background processes Says we are we working with magic data value at: /I2CE/tasks/task_description/can_view_background_processes

7 I2CE Framework: Magic Data Example from background process module: 3.2.2 Can view background processes Sets magic data value at: /I2CE/tasks/task_description/can_view_background_processes to be: Can view background process

8 I2CE Framework: Magic Data Example from background process module: 3.2.2 Can view background processes Says magic data value at: /I2CE/tasks/task_description/can_view_background_processes can be translated

9 I2CE Framework: Pages Pages are used to handle user interaction A page subclasses I2CE_Page Pre-process GET and POST variables into nested arrays Loads main html template for the page Define web interaction by action() Define CLI interaction by actionCommandLine() After action processing page is display() ed

10 I2CE Framework: Pages The Wrangler determines which page is run Rules for turning a URL into a page: http://localhost/ihris-manage/A/B/C Check if A is registered as a ”top-level” page under the magic data node /I2CE/page/A Check if B is registed as a page for the module A under the magic data node /modules/A/page/B Go to the default page (usually home) for the module A Fail Any unused portion of URL is passed as the ”request remainder” to the page's constructor

11 I2CE Framework: Pages Need to registering a page and its class in magic data Example from list module: I2CE_PageFormLists.... Creates a top-level page called lists which is handled by class I2CE_PageFormLists

12 I2CE Framework: Pages Access restricted by tasks and roles set in the page's args which is passed to the constructor Example from lists page in list module:.... can_edit_database_lists.... User's role has to have task can_edit_database_lists to access the page

13 I2CE Framework: Pages A page style is a collection of characteristics shared by many pages: default html files,access control, etc. Passed in args array to page's constructor Example from lists page in list module:.... main.... Defines the lists page to have the main style

14 I2CE Framework: Templates An html template is a small bit of (almost) html A page loads various html template files as needed via I2CE_Template class. I2CE_Template is a helper class for the Document Object Module (DOM) Data can be associated to nodes in the DOM Special tags and attributes are processed showCurrentAccidents()"/>

15 I2CE Framework: HTTP Request Everything handled by index.php Ensure we connection to the database If the system is not up-to-date go to the Updater The system is initialized There has been no changes to an enabled module's configuration file There has been no change to an enabled module's class file Check to see if the request for a static file, and if so dump the file to the user and exit Otherwise pass off control to Wrangler


Download ppt "I2CE Framework I2CE: Intrahealth Informatics Core Engine Base Web Framework on which iHRIS Manage and iHRIS Qualify are built on: Module Structure Magic."

Similar presentations


Ads by Google