This section demonstrates how to create an application for < AppML > through the following four simple steps.

The next chapter will show you how to download < AppML > and start developing Web applications on your own computer.

4.2.1. 1.创建模型(Model)

Create a file using the following

<appml> <datasource> <database> <connection>Democonnection> <sql>SELECT CustomerName,ContactName,City,Country FROM Customerssql> <orderby>CustomerNameorderby> database> datasource> <filters> <query> <field>CustomerNamefield> query> filters> appml>    

Models (we recommend) save the file as Customers.xml in the subdirectory.

Model analysis

The < appml > tag defines the model.

The < datasource > tag defines the data source for the model.

The < database > tag defines the database.

The < connection > tag defines the link to the database.

< sql > tag definition data query

The < orderby > tag defines the default sort.

The < query > tag defines a legal query filter.

4.2.2. two。 Create a WEB page

In the first < AppML > app, create a HTML page:

Example

   

My First Web Application

Customer City Country
Alfreds Futterkiste Berlin Germany

尝试一下 »

4.2.3. 3. Add Styl

Add cascading styles to your web page when executing e < AppML > app:

Example

      

My First Web Application

Customer City Country
Alfreds Futterkiste Berlin Germany

尝试一下 »

4.2.4. 4. Add a script and then execute the application

Add a script to your web page to run < AppML > app:

Example

      

My First Web Application

Customer City Country
#CustomerName# #City# #Country#

尝试一下 »

4.2.5. Case analysis

The < AppML > library contains a large number of functions. These functions can be called from your web page.