Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

AppML Case Model

Case Study - Application Model


This case study demonstrates how to build a complete web application with the ability to list, edit, and search information in several tables of a database.


Application Model

In this chapter, we will build a complete application model for the Customers table in the database.


Filter

To allow filtering data, simply add a element:

Example:

CustomerName

City

Country

CustomerName

City

Country

For full details, please refer to Reference manual.


update

To allow updates data, simply add a element:

Example:

LastName

FirstName

BirthDate

Photo

Notes

and add to the element a and element:

Example:

Customers

CustomerID

For full details, please refer to Reference manual.


Safe

You can add to the tag a security attribute to easily add security to the model.

Example:

security="admin"

In the example above, only users who log in as members of the "admin" user group can access the model.

To set security for the element, simply add to the element a security attribute:

Example:

security="admin"

LastName

FirstName

BirthDate

Photo

Notes


Complete Customers Model

In this chapter, we will create an application model for each table in the database.

Create a new folder named Models. In the Models folder, create a model for each application.

Model: Customers.xml

Demo

Customers

CustomerID

SELECT * FROM Customers

CustomerName,City,Country

CustomerName

City

Country

CustomerName

City

Country

CustomerName

ContactName

Address

PostalCode

City

Country


Model View

Create a model view, save it as Demo_Model.html, and try it out:

View: Demo_Model.htm

Customers

Try it »


Now put it all together

Then, with a little JavaScript coding, create a test page for all the models:

Demo_Model_Views.htm

Demo Applications



Show Result »