Oedipus Decision Maker: Documentation for Developers
ODM Overview
ODM is written mostly in PHP. It uses the Haddock framework. MySQL backend for the Database. Javascript only for extra gui functions (site must be fully functional without JS).
All the code is up on Google Code, so there are links to the latest revisions throughout.
Views in Oedipus
Oedipus_DramaPage
The main page view of a Drama is:
This page:
Fetches the Oedipus_Drama model according to the $_GET.
- Fetches the User (Either the user has permission to view the drama, or its public)
- Possibly makes the Oedipus_Drama editable
Displays the Oedipus_DramaDiv
Oedipus_DramaDiv
The main Drama view is:
This view extends HTMLTags_Div from Haddock.
It shows Toolbars for the Drama and Act:
Then it displays the scene defaulting to Oedipus_TreeViewSceneDiv
But this can be changed (through the links in the Act Toolbar) to Oedipus_FrameViewSceneDiv
Oedipus_FrameViewSceneDiv shows a Oedipus_FrameDiv
Redirect Scripts for editing values
The various Divs provide links to Redirect Scripts (if the Drama model is editable).
An example Redirect Script is:
Oedipus_EditFrameRedirectScript
These take in $_GET and $_POST values set in the Divs and use the helper classes to edit the Drama model.
Helper Classes
Helper classes such as:
Provide functions for creating models:
1 Oedipus_DramaHelper::get_drama_by_id($drama_id)
2 Oedipus_FrameHelper::get_frame_by_id($drama_id)
3
Functions for updating the Database:
1 Oedipus_DramaHelper::set_drama_name($drama_id, $drama_name)
2
Also, functions for displaying HTML, although these are being moved out into HTMLTags classes:
1 Oedipus_DramaHelper::get_scene_notes_div($scene_id)
2
Useful Files
A dump of the ODM MySQL db used on the beta site:
