Declaring Web applications with AppML (1/2) - exploring XML | WebReference

Declaring Web applications with AppML (1/2) - exploring XML

Declaring Web applications with AppML

Writing Web applications is a lot of work: Creating forms, programming business logic, developing database access. As part of the Mozilla project, the Extensible User Interface Language (XUL) created a lot of buzz around the concept of declaring -- rather than programming -- user interfaces. Instead of writing code in a particular programming language, an XML document contains a description of all the used GUI elements and their connections.

Along these lines, fellow XML site author Jan Egil Refsnes has developed an XML vocabulary for defining whole Web applications: Application Markup Language (AppML). While XUL is still awaiting its first use in a major application, Jan has implemented a complete Web application for the Norwegian Handball Federation in a fraction of the time it would take with conventional tools.

AppML is built around a handful of concepts that should be familiar to every Web application developer:


The <database> element defines a record set in a database, by specifying a main table and optionally a SQL select statement for the subset of data to be worked on, as well as the primary key fields for that table. An example for a CD collection could look like this:

  <sql>select * from cd_catalog</sql>


Reports are read-only representations of data in table format, specified by a database element like above. Various elements can be used for specifying the layout of the report table, defining headers and footers. Defaults are provided for all options in order to achieve results quickly:

select artist, title from cd_catalog where year=1997;
<h1>Michael's CDs of 1997</h1>
courtesy of AppML
<table border="0" class="app">
  <th class="cdheader">Artist Name</th>
  <th class="cdheader" align="left">CD Title</th>

the other concepts...

Produced by Michael Claßen

Created: Nov 25, 2002
Revised: Nov 25, 2002