Getting Started with iPFaces Mobile Application Framework

Written by on February 10, 2010 in PHP - 3 Comments

iPFaces is a flexible solution for easy development of form-oriented network mobile applications. With the iPFaces solution, mobile devices are able to render content received from a server using their native UI components. It uses thin presentation client (must be installed on device) to render application content. Using iPFaces it is possible to build an application where users can use their device’s specific component behavior and additional device features, such as location service and additional graphic components of the device (lists, pickers etc.).

Architecture

The solution is based on the use of a thin presentation client installed on the device and an application/web server which generates the content for clients. The client and the server communicate with each other using the network.

The idea is similar to the web browser – web server model. The client sends HTTP(S) requests to the server and receives iPFaces specific HTTP(S) responses, where the content is an XML representation of the application’s form which is be rendered on client-side together with the form’s data.

image01.png

How to start?

Development of a complex iPFaces application is really simple because the simulation mode can be used. This mode is capable of transfering XML content to a HTML page, which can be displayed in a web browser. It is a helpful tool for developers who can see their iPFaces application in the browser window and they do not need a real iPhone device for main development.

Developers can build and deploy an application to the application server and the browser will show them the GUI which is almost the same as a screen in an iPhone application. There is a difference in the GPS elements. A GPS field is working in a browser only as text field that can be filled by user and GPS coordinates will be submitted. The GPS field is hidden on mobile devices, because the location of the device is detected without interaction with the user.

image02.png
image03.png
Figure 1: Form representation on the iPhone device and in a web browser

Hello World Example

To use PHP iPFaces library, just include “ipfaces-php-lib-1.1.php” file, construct the component tree and call “render()” method on the component form.


image04.png
image05.png
Figure 2: Hello World example

More complex example

The following example is not complete. It only illustrates how easy it is to define forms for iPhone using iPFaces. For complete examples please visit http://www.ipfaces.org

Example: Use of location service

To obtain a user location from a mobile device use the IPFGsm class. Upon submission of a form, the location data will be sent as a parameter with the selected name (gpsElement in this example).


image06.png

3 Comments on "Getting Started with iPFaces Mobile Application Framework"

  1. Jame_2d March 2, 2010 at 7:17 am · Reply

    hi,
    That’s good framework … Did any one know more about other mobile web framework based on PHP
    James

  2. Rozvaděč April 7, 2010 at 8:55 am · Reply

    Awesome, thank you for this article.
    I’ve developed my first app for iPhone! :-D

  3. MobileReflex May 5, 2010 at 10:28 am · Reply

    MobileReflex, a framework which can be installed in all smartphones for enterprise related applications

Leave a Comment