SlideShare a Scribd company logo
phpWebApp and SEE­GRID Resoures 
phpWebApp and SEE­GRID 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 SEE­GRID Resources Web Application 
            http://see­grid.inima.al/gridrc/
phpWebApp presentation
phpWebApp presentation
SEE­GRID Resources Web App
Displays resources for each country and cluster.
Displays also summary tables (reports).
Admins can also edit/modify the data.
Modification of data is password protected.
Each country/cluster has an admin password.
The admins can also change their password, and 
country admins can set the cluster passwords.
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.
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.
What is the phpWebApp Framework
 A Web Application 
 Framework
 Built with  PHP and 
 used for PHP apps
 Easy interface to DB
 Can be used for 
 eContent, 
 eGovernment, 
 eCommerce, etc.
Features of phpWebApp
Separates layout from logic (template system)
Supports modularity.
Thinks of a web application like a state machine.
Supports an event­based programming model.
Supports web components and web objects.
Supports code re­usability.
Features of phpWebApp
Simplifies the interaction of the application with 
the database and makes it database independent.
Facilitates an iterative and incremental 
development approach for web applications.
Supports i18n and l10n (translation to other 
languages) using standard GNU gettext tools.
Has good debugging features.
phpWebApp Components
Templates            Database
Template variables   WebBox­es
State Variables      WebClass­es and 
Transitions          WebObjects

Events
phpWebApp: Templates
XHTML files with some additional tags and 
 variables: <include>, <if>, <repeat>, 
 <recordset>, <var>,  <!­­# comments ­­>, 
 <webbox>, etc.
 <include src="{{./}}edit/cluster_edit.html" />
 <if condition="!{{admin}}">
    <a class="button" href="javascript:edit()">
    Edit</a>
  </if>
phpWebApp: Templates
      <table>
      <repeat rs="clusters">
        <tr><td>{{cluster_name}}</td></tr>
      </repeat>

    </table>

      <recordset id="country">
      <query>
        SELECT country_name FROM countries
        WHERE country_id = '{{country­>id}}'
      </query>
    </recordset>
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.
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 web­page itself.
 Example: 
  $user_id = 
  WebApp::getSVar('user_list­>selected_user');
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)
phpWebApp: Database
Facilitates the connection and interaction of web 
applications with relational databases.
Is easy and convenient, but also flexible.
Is database independent.
Some of the classes are: Connection, Recordset, 
EditableRS, PagedRS, etc.
phpWebApp: WebBox­es
 A WebBox is a tpl which has its own php code.
 It can also have its own JS, CSS, DB code, etc.
 It can be self­contained and independent, and 
 can be included easily in other pages or in other 
 applications.
 <webbox id="box_id">
   <!­­ content of WebBox ­­>
  </webbox>
phpWebApp: WebBox­es
  The other files are: box_id.php, box_id.js, etc.
  box_id.php is like this:
    <?php
    class box_id extends WebObject
    { . . . }
    ?>

  It can have functions: onParse(), onRender()
  These override the functions of WebObject.
phpWebApp: WebClass­es
An attempt to use the concept of '
                                 Class'
                                       for the 
templates of the framework.
Several WebObject­s 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 tab­like menu
The Structure of a Web Page
Conventions of Web Applications
Web Apps should follow some conventions:
 Files index.php, webapp.php, browse.php, etc. 
 are the same for all the applications.
 The configuration of the application is placed in 
 the folder '
            config/'
                    (const.Options.php, 
 const.Paths.php, const.Debug.php, etc.) 
 Templates (webboxes etc.) are usually placed in 
 the folder '
            templates/'
                      .
Future Work
Improvement of the docs of the framework.
Improvements to the framework itself.
Tools for working with the framework:
✗   Emacs mode, Quanta plug­in, etc.
Building reusable WebBox­es and WebClass­es; 
they can be even organized in higher­level 
frameworks for apps of a certain kind.
Code generation and reverse enginnering from 
UML models.
phpWebApp and SEE­GRID Resoures 
phpWebApp and SEE­GRID 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 SEE­GRID Resources Web Application 
            http://see­grid.inima.al/gridrc/

More Related Content

PPT
Oaf development-guide
PPTX
Html Templating - DOT JS
PDF
Rest hello world_tutorial
PDF
Oracle adf performance tips
PPT
JSF (ADF) Case Studies Presentation
PDF
Introductionto asp net-ppt
PPTX
PDF
Workshop HTML5+PhoneGap by Ivano Malavolta
Oaf development-guide
Html Templating - DOT JS
Rest hello world_tutorial
Oracle adf performance tips
JSF (ADF) Case Studies Presentation
Introductionto asp net-ppt
Workshop HTML5+PhoneGap by Ivano Malavolta

What's hot (19)

PDF
Introduction to-web-application-development-with-vaadin7
PDF
Vaadin Introduction at OOP 2014
PDF
C sharp and asp.net interview questions
DOC
Creating xml publisher documents with people code
DOC
Oa Framework Tutorial
PPT
Xml Publisher
PPTX
Understanding JSP -Servlets
PPT
Web Application Introduction
PPTX
Classic asp , VB.net insert update delete crud
PPTX
Wildcard Filter
PPTX
Building Your First Store App with XAML and C#
PPTX
DOC
Asp.Net Database
PPTX
Java Server Pages
PPTX
Session 36 - JSP - Part 1
PDF
Introduction to CakePHP
PDF
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...
PDF
Overview Of JDBC
PPTX
Session 32 - Session Management using Cookies
Introduction to-web-application-development-with-vaadin7
Vaadin Introduction at OOP 2014
C sharp and asp.net interview questions
Creating xml publisher documents with people code
Oa Framework Tutorial
Xml Publisher
Understanding JSP -Servlets
Web Application Introduction
Classic asp , VB.net insert update delete crud
Wildcard Filter
Building Your First Store App with XAML and C#
Asp.Net Database
Java Server Pages
Session 36 - JSP - Part 1
Introduction to CakePHP
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...
Overview Of JDBC
Session 32 - Session Management using Cookies
Ad

Viewers also liked (11)

PDF
Using Drupal Features in B-Translator
PDF
Development Setup of B-Translator
PDF
B-Translator as a Software Engineering Project
PDF
An Algorithm for Incremental Multi-Resolution Modeling
PDF
The Digital Signature and the X.509/OpenPGP Authentication Models
PDF
Vodafone Webbox
PDF
phpWebApp article
PDF
ODT
Easy Blogging With Emacs
PDF
Building a Gateway Server
PDF
Udhëzuesi i Kturtle
Using Drupal Features in B-Translator
Development Setup of B-Translator
B-Translator as a Software Engineering Project
An Algorithm for Incremental Multi-Resolution Modeling
The Digital Signature and the X.509/OpenPGP Authentication Models
Vodafone Webbox
phpWebApp article
Easy Blogging With Emacs
Building a Gateway Server
Udhëzuesi i Kturtle
Ad

Similar to phpWebApp presentation (20)

ODP
Exploring Symfony's Code
PPT
Ruby On Rails Siddhesh
PDF
Zend Framework Quick Start Walkthrough
PPT
Asp.net architecture
PDF
Intro to mobile web application development
PPTX
Asp.net With mvc handson
PDF
Streamlining Your Applications with Web Frameworks
PPT
Asp.net
PPTX
Asp Net Advance Topics
ODP
Practical catalyst
PPT
TomatoCMS in A Nutshell
PPTX
Ch 04 asp.net application
PPS
Asp.Net 2.0 Presentation
PDF
Asp .net web form fundamentals
PPTX
MVC & SQL_In_1_Hour
PDF
AEM Sightly Deep Dive
PPT
Intro to-html-backbone
PPS
Introduction To Mvc
PDF
Intro To Mvc Development In Php
Exploring Symfony's Code
Ruby On Rails Siddhesh
Zend Framework Quick Start Walkthrough
Asp.net architecture
Intro to mobile web application development
Asp.net With mvc handson
Streamlining Your Applications with Web Frameworks
Asp.net
Asp Net Advance Topics
Practical catalyst
TomatoCMS in A Nutshell
Ch 04 asp.net application
Asp.Net 2.0 Presentation
Asp .net web form fundamentals
MVC & SQL_In_1_Hour
AEM Sightly Deep Dive
Intro to-html-backbone
Introduction To Mvc
Intro To Mvc Development In Php

More from Dashamir Hoxha (15)

PDF
Easy Blogging With Emacs -- Cheatsheet
PDF
Autobiography of Benjamin Franklin
PDF
Easy Blogging With Emacs
PDF
IT Strategy of Albanian Customs
PDF
Strategjia për IT-në e Doganës Shqiptare
PDF
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.1x Software as Service
PDF
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS188.1x Artificial Intelli...
PDF
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.2x Advanced Software ...
PDF
Certificate -- Dashamir Hoxha -- edX/MITx -- 6.00x Introduction to Computer S...
PDF
PPPoE With Mikrotik and Radius
PDF
PPPoE With Mikrotik and Radius
PDF
Using OpenFire With OpenLDAP
PDF
Managing HotSpot Clients With FreeRadius
PDF
SugarCE For Small And Medium Enterprises
ODP
B-Translator as a Software Engineering Project
Easy Blogging With Emacs -- Cheatsheet
Autobiography of Benjamin Franklin
Easy Blogging With Emacs
IT Strategy of Albanian Customs
Strategjia për IT-në e Doganës Shqiptare
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.1x Software as Service
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS188.1x Artificial Intelli...
Certificate -- Dashamir Hoxha -- edX/BerkeleyX -- CS169.2x Advanced Software ...
Certificate -- Dashamir Hoxha -- edX/MITx -- 6.00x Introduction to Computer S...
PPPoE With Mikrotik and Radius
PPPoE With Mikrotik and Radius
Using OpenFire With OpenLDAP
Managing HotSpot Clients With FreeRadius
SugarCE For Small And Medium Enterprises
B-Translator as a Software Engineering Project

phpWebApp presentation