pendently of their platform. Although created also for
web formatting, XSLT (Clark, 1999) have outgrown
its original role of transforming XML documents to
XSL-fo or XHTML, and is routinely used to convert
between any two XML languages. In our approach
all these XML technologies play a role in the config-
uration of automatically generated applications, and
indeed also in its generation.
Applications software and other programs with
graphical interaction are usually structured using
the Model-View-Controller (MVC) architectural pat-
tern (Gamma et al., 1994). This pattern was proposed
by Trygve Reenskaug in 1978 as a design solution for
Smalltalk (Reenskaug, 1979). In this architecture we
used the MVC pattern to structure a set of transforma-
tions that implement the distinct features of the gen-
erated applications.
Model data-to-data transformations implement data
management operations;
View data-to-XHTML transformations produce
forms based interfaces to interact with portions of
the database;
Controller data-to-state transformations manage a
set of parameters that controls all transformations.
Having identified a set of transformations that can
be used to configure a web application, we need to
produce these transformations for a given data man-
agement application. Assuming a fix set of data man-
agement operations, these transformations can be ob-
tained from the schema of the database.
An XML Schema Definition (XSD) is a standard
way to describe the structure and content of XML
documents. In a sense, an XSD is similar to the
schema of a database, although with some limitation
when describing relationships.
Our infrastructure to this transformation-based
RAD system works in two stages: first an XSD doc-
ument is processed and generated a set of transfor-
mations for a specific application; then these trans-
formations are used for running the generated appli-
cations. In the architecture we propose, each stage
corresponds to its own individual component: the ap-
plication generator and the application engine
The application generator is itself a web applica-
tion for generating web applications from XSD docu-
ments and managing applications configurations. The
generation of web applications results from applying
a set of second order transformations to the uploaded
XSD document, to the produce first order transfor-
mations that define the applications; then these first
order transformations are installed in the application
engine.
The application engine, with a set of first order
transformations, is the actual web application gener-
ated by this RAD system. In fact, the application en-
gine is common to a set of web applications generated
by the same application generator.
3 Transformations
The distinctive feature of this RAD architecture is the
use of XSLT transformations to generate and run web
applications. In the applications engine transforma-
tions act as participants of the Model-View-Controller
pattern and are generated from the XML Schema
Document modelling the data. This sections starts
with the database operations that are the model of the
generated application, proceeds with forms interfaces
that provide views to the generated applications an
concludes with the control of model and views.
To implement database operations on data-
oriented XML documents we need to identify a
database schema in its structure, given as an
XML Schema Document (XSD). To represent the
database schema we use the Entity-Relationship
Model (ERM) (Elmasri and Navathe, 2003). It is al-
most straightforward to map the XSD concepts of ele-
ment and attribute type definitions, into the ERM con-
cepts of entity, attribute and relationship. Only the last
- relationships - pose some difficulties since the XML
data model (infoset) is not completely equivalent to
the ERM.
In the ERM, entity types define sets of entities and
is only natural to relate them with elements types with
multiple occurrences. In an XSD, an occurrence in-
dicator specifies the minimum and maximum num-
ber of times an element of a given type can be re-
peated. Thus, we use the indicator
maxOccurs
with
value
‘‘unbound’’
to identify entities in an XSD.
Given a database schema extracted from a XSD,
each operation-entity pair can be implemented by a
simple XSLT transformation on the database instance,
and a few parameters.
Second order transformations are responsible gen-
erating these transformations from the XSD. For each
entity detected on the XSD (an element type defi-
nitions with unbound repetition) and each supported
operation (insertion, query, modification, deletion) an
XSLT with the appropriated transformation is gener-
ated.
We use a similar approach to create also a forms
based graphical users interface from the XSD, us-
ing also XSLT transformations. To accomplish this,
we started by analysing how RAD systems usually
map ERM concepts into forms based interfaces and
AN ARCHITECTURE FOR THE RAPID DEVELOPMENT OF XML-BASED WEB APPLICATIONS
275