1. phpWebApp and SEEGRID Resoures
phpWebApp and SEEGRID Resoures
Dashamir Hoxha dhoxha@inima.al
Dashamir Hoxha
Elda Nallbani enal@inima.al
Elda Nallbani
Institute for Informatics and Applied Mathematics
INIMA
http://www.inima.al
The phpWebApp Framework
http://phpwebapp.sourceforge.net/
The SEEGRID Resources Web Application
http://seegrid.inima.al/gridrc/
5. Why Not Use Plain PHP
Mixing HTML, CSS, JS, PHP, SQL codes
✗ Editing becomes difficult (code colorization, etc.)
✗ The maintenance of the application becomes difficult.
✗ Makes difficult the team work.
✗ Increases the complexity of web applications.
There are no persistent variables.
Lack of modularity.
6. Choosing a Framework
Possible Tools:
✗ Any template system or web application framework
(look at http://sourceforge.net/search/?type=soft)
✗ ColdFusion, Smarty, etc.
Why phpWebApp?
✗ It is free (GNU GPL).
✗ Better than the others (more flexible, powerful, etc.).
✗ We know it better than the others.
13. phpWebApp: Template Variables
Slots in template files, denoted like this:
{{var_name}}
Get their value in the php code, like this:
WebApp::addVar(var_name, var_value);
The framework gets its value from a state
variable, from a global php variable or from a
php constant that has the same name as the
template variable.
14. phpWebApp: State Variables
Persistent variables (don'
t loose their value from
one page to another); similar to session variables.
Keep the state of the application and its webbox
es (which are considered as a state machine).
Stored inside the webpage itself.
Example:
$user_id =
WebApp::getSVar('user_list>selected_user');
15. phpWebApp: Transitions and Events
A transition is the move of the application from
one state to another.
It is done by the function: GoTo('page.html')
An event is usually sent as well.
An event can be sent like this as well:
SendEvent('targetBox', 'eventName', 'arg1=val1;arg2=val2');
It is handled by the php function:
targetBox::on_eventName($event_args)
19. phpWebApp: WebClasses
An attempt to use the concept of '
Class'
for the
templates of the framework.
Several WebObjects of the same class can be
used in the same page.
<WebObject class=”listbox” name=”books” rs=”books” />
Some predefined webclasses are:
✗ listbox: a list of values from a recordset
✗ datebox: select the date from a calendar
✗ tabs: horizontal tablike menu
23. phpWebApp and SEEGRID Resoures
phpWebApp and SEEGRID Resoures
Dashamir Hoxha dhoxha@inima.al
Dashamir Hoxha
Elda Nallbani enal@inima.al
Elda Nallbani
Institute for Informatics and Applied Mathematics
INIMA
http://www.inima.al
The phpWebApp Framework
http://phpwebapp.sourceforge.net/
The SEEGRID Resources Web Application
http://seegrid.inima.al/gridrc/