AppML Reference Manual



<AppML> Data model:

<appml security="security">

<datasource> ;
Datasource definition goes here
</datasource>

<filters>
Filter definitions goes here (if any)
</filters>

<update>
Update definitions goes here (if any)
</update>

< anything>
Anything you want to add to the model
</anything>

</appml>


<AppML>Security

<AppML> Security is set via the security attribute in the <AppML> tag.

<appml security="artists">

The above application contains security definition attributes at the beginning, and only artists users are allowed to log in.

In this case, the user logged in with a user name must be a member of the "artists" group.


<datasource> Element

<AppML>The <datasource> element of the application defines 4 different data types:

Sub-elements ( Only one may apply)

ElementDescription
<database> Define data type
<xmlfile>Define XML source file
<csvfile>Define a comma-separated text file


##<database> element

<database> element defines the database

Sub-element

ElementDescription<connection>Link database name<execute>SQL statement executed before data retrieval (optional)##< ;sql><maintable><keyfield>

Data stored in SQL database

This is the most common solution for data-oriented applications.

<datasource>
<database>
<connection>CDDataBase</connection>
<sql>SELECT Artist, Title, Country FROM CD_Catalog</sql> ;
</database>
</datasource>

The above model can select three data options (Artist, Title) from the "CD_Catalog" table of the "CDDataBase" database , Country).

The number of rows returned as a result is unknown.


Data stored in XML files

<AppML> Data can be read from XML files:

Example

<appml>

<datasource>
<xmlfile src="cd_catalog.xml">

<record>CD</record>

<item>
<name>Title</name>
<nodename>TITLE</nodename>
</item>

<item>
<name>Artist</name>
<nodename>ARTIST</nodename>
</item>
<item>

<name>Country</name>
<nodename>COUNTRY</nodename>
</item>

</xmlfile>
</datasource>

</appml>

Run Instance»

Click the "Run Instance" button to view the online instance

This method can store data in an XML file on the server .


Data is stored in text (Text) files

<AppML> Data can be read from text files:

Example

<appml>

<datasource>
<csvfile src="cd_catalog.txt">

<item>
<name>Title</name>
<index>1</index>
</item>

<item>
<name>Artist</name>
<index>2</index>
</item>

<item>
<name>Price</name>
<index>5</index>
</item>

</csvfile>
</datasource>

</appml>

Run instance»

Click the "Run instance" button to view the online instance

This method can store data on the server in a text file.


You can create a database if necessary

<AppML> If necessary you can create a database:

<database>
<connection>CDDataBase</connection>

<execute>
CREATE TABLE CD_catalog (
CD_Id INT IDENTITY,
Title NVARCHAR(255),
Artist NVARCHAR(255),
Country NVARCHAR(255),
Company NVARCHAR(255),
Price NUMBER, Published INT)
</execute>

</database>

Improve the rapid prototyping model!

SQL statement used to retrieve data
The main table of the application (optional)
Key field of the main table (optional)