Showing posts with label documentation. Show all posts
Showing posts with label documentation. Show all posts

Friday, July 20, 2007

phpFramewerk Control Flows

In phpFramewerk we handle control flows as follows:


  1. The user triggered events with the user interface such as clicks or presses a button.

  2. A controller handles the request from the user interface by evaluate

    the $_GET[cmd] or $_POST[cmd] variable.

  3. The controller processes the event in a way appropriate to the user's action
    (this is where controller accesses the model such as Add,Read,Edit and Delete).

  4. The controller accesses the view to render an appropriate response
    (this is where the data from the model displayed within the HTML).

  5. The user interface waits for further events triggered by the users.

phpFramewerk Architecture

We are using our own architectural pattern similar to
Model-View-Controller (MVC).
MVC is the most used architecture in web applications.

In phpFramewerk we encapsulate data and functions (model) in classes.
The data is stored in variables on the config file or
in the future use of phpFramewerk it will be stored in MySQL and the classes files
are stored in library folder.
The presentation (view) is in
CSS, javascript and HTML files.

phpFramewerk is designed to keep the code in controller files as simple as possible
so that the control flows between user interface,
data handling and the display responds to the user will remain ease.

phpFramewerk ver 0.0.1 Documentation

We have been trying to make the programming style ideal to standard.


  • Valid XHTML 1.0

  • Valid CSS 2

  • MVC approach

  • register_globals = off ready

  • Layout by CSS

  • Basic HTML Class

  • Formage Class

  • Error message system



The layout component has its own method to control them.

  • Three section: top-section, content and footer

  • The content section consists of two fixed column: left-column and content

  • Navigation bar on the left column

  • Main menu on the top section

  • Page title on the top section





After you extract the package in a folder . then you will find the directory structure as follows:

We put all configuration files in folder ./conf
We put all view files in folder ./view
We put all classes in folder ./library
We put all images in folder ./images
And all controller files in root ./
You can move the conf, view and library folder to non-accessible
folder on your server to reduce security risk.