Declaring Web applications with AppML (2/2) - exploring XML
Declaring Web applications with AppML
Filters can be specified to modify a report's content, sort order and the like. The end-user can select the predefined filters through the Web interface in order to view the selected report under different conditions:
<filter> <where></where> <orderby>title</orderby> <query> <field>year</field> <operator>=</operator> <value>1997</value> <label>97's CDs</label> </query> </filter>
Lists, not to be confused with reports, are also tabular data, but display a set of records with the ability to select an individual record for viewing or editing. Lists support different sort orders, and chunking, i.e. displaying a fixed number of records with forward / backward navigation:
<htmllist> <sql>select * from cd_catalog</sql> <header new="false" delete="false"> <h1>Michael's CDs of 1997</h1> </header> <table border="0" class="app"> <thead><tr> <th class="cdheader">Artist Name</th> <th class="cdheader" align="left">CD Title</th> </tr> </thead> </table> </htmllist>
An AppML form augments a normal HTML form with the connection to a database record, as well as header and footer elements, and new and delete buttons.
<htmlform name="name" new="false" delete="false"> <sql>select artist,title,year from cd_catalog</sql> <form> <table class='input' width='100%'> <tr> <td valign='center'>Artist Name</td> <td><input size='42' id='artist' value='' /></td> </tr> <tr> <td valign='center'>title</td> <td><input size='42' id='title' value='' /></td> </tr> <tr> <td valign='center'>Year</td> <td><input size='4' id='year' value='' /></td> </tr> </table> </form> </htmlform>
Jan has published an online case study displaying the full potential of AppML. He is actively looking for partners to further refine and extend this conept in Web application development projects. The full schema for AppML is also available on his site. AppML is an interesting concept that deserves attention from anyone who is determined to slash development time for typical data entry Web applications. It can easily be mixed in with existing Web application architectures.
Produced by Michael Claßen
Created: Nov 25, 2002
Revised: Nov 25, 2002