Chapter 1. Getting started

1.1. Introduction

1.1.1. What is ippfp

ippfp is an object-oriented environment aimed at building user interfaces in different output formats quickly and simply. It supports the most importand input-/output elements and provides those as objects. That means that characteristics of every single element are available in a data structure. This data structure is defined by the class "elements". All elements derive from this class and extend it if necessary by specific characteristics.

The library is pointed at beeing able to construct interfaces quickly and efficiently. If one wants to realize for instance a special eleborated website or GTK-program interface, it is surely the best way to use this technique directly. Whereas ippfp is qualified for automatic generation of user interfaces by software, for rapid prototyping, for input masks of databases, program interfaces, etc. Because of its orientation by objects and its clear seperation of the actual code and output technology it qualifies also for bigger projects.

1.1.2. How it works

The library puts the elements together in a frame. For HTML a HTML page will be created which contains the elements, GTK and ncurses have appropriate windows. The data of elements will be stored in session variables. One does not need to care for details of formats like HTML-tags or GTK-classes. For navigating within a program the button element should be used. To arrange elements the elements "grid" or rather "table" are the right choices.

Elements are created with the "create"-functions which are members of the ippfp main instance and returns objects respective to the goal. To make them visible they will be grouped in a "view" which will be given to the ippfp main instance for processing. This is a flexible way because an existing element can be used in several views. Thus, elements will be included by reference, not by copy. The advantages are: if an element is in a state, it is independent from the current view and related informations are available globally.

For example: create a text element:

	    $myText = $ippfp->createText("default", 20, "my_text");
	    ...
	    echo $myText->getValue();
	    

Your code should be organised into php functions. For example if a button is used, it calls the function given as attribute. It is expedient to integrate your views into this functions.