QxTransformer is an
XSLT-based
framework for rapid application development with the
qooxdoo toolkit.
It takes care of the most tedious parts of writing applications with
qooxdoo -
GUI
building can be done almost entirely without javascript, which is only
needed for event handling and business logic. QxTransformer also comes
with advanced databinding features including automatic form
serialization and update. This saves you from writing your own
transport code. With QxTransformer, you can write qooxdoo applications
in hours rather than days.
qooxdoo is a powerful and flexible toolkit, which lets you build fancy and interactive web-based GUIs. Compared to traditional HTML
interfaces, qooxdoo provides not only a much better look and provides
widgets known from desktop operating system, but also frees you from
the traditional and cumbersome “input, submit & page refresh”
model.
However, coding a GUI entirely in javascript has a number of disadvantages compared to the traditional HTML way:
Bulding a sophisticated
GUI
with javascript is error-prone. Even though javascript syntax check and
code completion exist in every good editor,
it is very easy to make
mistakes that will only be spotted when the application is run,
resulting in longer code & debug cycles.
It creates code that doesn’t read very well. Whereas a
HTML
page displays a clear structure and element hierarchy, qooxdoo
javascript needs
countless helper variables with no other use than to
nest widgets (
tb1 = new qx....; tb2 = new qx...; mb4.add(tb1,tb2);).
These variables also make it difficult to reuse code because of
potential name conflicts.
There is no equivalent for the
HTML
<form> element and mechanism. Many developers miss a simple way
to submit data to a server that doesn’t
involve the manual collection
of the values of various input widgets.
QxTransformer has been written to solve these problems. It reintroduces a number of advantages of the XHTML model while at the same time keeping all the goodies provided by qooxdoo.
Platform Independence: QxTransformer is
XML/
XSLT-based and thus platform-independent.
You can run it in any system than has a
XSLT-processor (Note that this processor must support the EXSLT/common extensions).
Clarity of Code: The QxTransformer
XML
syntax has been carefully crafted so that QxTransformer xml source code
models the widget hierarchy in a way that is logical and easy to
remember.
The source code can be modularized through includes and
extended through macros, which help to avoid repetitive code.
Self-Validation:
XML
is self-validating and keeps you from making typos that easily occur in
javascript code.
We plan on providing a XTD validation sheet so that
one can immediately see whether certain attributes and child elements
are legal or not.
Databinding: QxTransfomer comes
with a few classes and code templates that free you from writing your
transport code yourself. Databinding of form elements (and virtually of
any widget) is achieved through a few xml attributes and works with any
backend supported by the qooxdoo json-rpc feature.
There is also a
simple form submission feature which supports your plain old
PHP or
CGI script the same way your
HTML page did.
* Will be reworked in next major version.
Template constructs: QxTransformer
allows to implement often-used behaviour which requires verbose
javascript through simple xml attributes, such as Drag & Drop
support,
broadcasters and observers (known from
XUL), translation, etc.
Portability:
XML
code can also be more easily re-used because you don’t have to worry
about all those useless variable names that you need in javascript to
instantiate the widgets.
In fact, whole snippets of
XML
code can be copy & pasted from one application to the other without
any adaption and thus encourages code exchange among developers. Also QxTransformer
supports macros and includes.
Easy Upgrade: QxTransformer allows easy upgrade to newer versions of a qooxdoo
API without any or very little change of the application xml code.
Extensibility: The architecture of QxTransformer
XSLT code is such that developers can easily extend the framework with their own widget templates.
Compatibility: Although the QxTransformer
XML syntax is substantially different from other
XML GUI markup languages such as
XUL, XAML, QtDesignerML etc, it would be possible write
XSLT stylesheets which translate between these markup languages and in this way, open up the possibility to use Visual
GUI Designers such as QtDesigner or Glade to build qooxdoo interfaces.
There are many other advantages, but I think you got the point why
we are so excited about the possibilities of QxTransformer. QxTransformer dramatically increases the speed of
qooxdoo application development. With it, we have been able to create
whole applications in a few hours.