Document Information

Last modified:
2007/07/29 00:34 by badams

Concepts & Facilities

This document provides an overview over qooxdoo’s concepts and facilities, from an application developer’s point of view. Pointers to more detailed information are given in the appropriate places.

Classes

qooxdoo implements an advanced class system on top of JavaScript’s built-in OO facilities. This is mainly used for the internal workings of qooxdoo itself, and instantiating and using qooxdoo objects is straightforward in JavaScript code:

var myButton = new qx.ui.form.Button;

But in order to construct a complete qooxdoo application, you have to create at least one application object that conforms to qooxdoo’s class model. The next section will talk about minimal requirements to construct an application. For more information about the class model see here

Anatomy of a qooxdoo Application

A typical qooxdoo application - like you would build up from the application skeleton, which is included in the qooxdoo SDK - has two major components which you need to work on:

  • the application’s main HTML file (”index.html”)
  • the application’s main JavaScript file (”Application.js”)

See The directory structure for more information about the location of these files and qooxdoo’s directory structure.

index.html

In order to run a qooxdoo application the central HTML file has to do two things:

  • include the qooxdoo library and the application code (e.g. in the form of a combined custom.js)
  • start the application by initialising qooxdoo with the application class

For a typical application index.html refers to the qooxdoo skeleton’s index.html.

Application.js

The application has to announce itself to qooxdoo’s runtime environment. It does so by providing a main application class that conforms to qooxdoo’s class model. The application class is created using qooxdoo’s class constructor method. Various features of the application class can be set (resources, properties, methods, asf.). As a minimum, the class has to provide a main() method that creates the application objects, defines essential event-handlers asf, and will be called by qooxdoo’s runtime. Additional methods may include dedicated initialize() and finalize() methods, among others.

The Build Process

The qooxdoo SDK comes with an assortment of boilerplate Makefiles. There are only a few settings within the top-level Makefiles you have to provide, in order to build the framework, the applications or the skeleton.

If you start your application off the standard skeleton, after an initial make you can simply go ahead developing your application file and see the changes immediately hitting your browser’s “Reload” button on the main index.html. This is all it takes to develop and test your application.

But once you are satisfied you can generate a deployment version from your development environment. This is where a special feature of qooxdoo kicks in - a generator process that does a lot of optimizing and packaging while creating a self-contained build version of your application.

Working with the qooxdoo API

In the course of extending and refining your application you will frequently make use of qooxdoo’s API. qooxdoo provides a broad range of classes to work with and to build up your application, classes for GUI creation and network communication, to name just a few. Since qooxdoo is entirely class-based, making use of the API usually means instantiating objects from qooxdoo classes, setting their properties and invoking their methods. Providing call-back functions to qooxdoo objects is a common pattern across many application domains, most prominently when creating GUIs. Which qooxdoo class is most appropriate for any given application problem, its particular usage protocol, and how it interacts with other qooxdoo classes is not always entirely obvious. The API reference is here an indispensable source of information (although the current documentation of individual classes may still leave a fair bit to ask for). Therefore, the samples and demos contained in the application part of the distribution should provide you with insights how to build qooxdoo applications and solve particular issues, and are a recommended study if you want to build qooxdoo applications. (For an overview of the application section of qooxdoo see here.

Information

Last modified:
2007/07/29 00:34 by badams

Account

Not logged in

 
 

Job Offers

To further improve qooxdoo we are seeking javascript developers. Read more...

Rich Ajax Platform (RAP)

RAP uses qooxdoo, Java and the Eclipse development model to build rich web applications. Read more...

qooxdoo Web Toolkit (QWT)

Similar to GWT this framework allows to create impressive qooxdoo applications just using Java. Read more...

Pustefix

Pustefix is a MVC-based web application framework using Java and XML/XSLT. Read more...

 
SourceForge.net Logo

Bad Behavior has blocked 0 potential spam attempts in the last 7 days.