<AppML>
Case Study - Application Model
This case study demonstrates how to build a complete <AppML> web application with functionality to list, edit, and search information from several tables in a database.
Application Model
In this chapter, we will create a complete application model for the Customers table in the database.
<AppML> Filters
To allow filtering <AppML> data, simply add a <filters> element to the model:
Example:
For a comprehensive understanding, refer to the <AppML>Reference Manual.
<AppML> Updates
To allow updating <AppML> data, simply add an <update> element to the model:
Example:
And add a <maintable> and <keyfield> element to the <database> element:
Example:
For a comprehensive understanding, refer to the <AppML>Reference Manual.
<AppML> Security
You can easily add security to the <AppML> model by adding a security attribute to the <AppML> tag.
Example: security="admin"
In the above example, only users logged in as members of the "admin" group can access the model.
To set security for the <update> element, simply add a security attribute to the <update> element:
Example: security="admin"
Complete Customers Model
In this chapter, we will create an application model for each table in the database.
Create a new folder named Models. Within the Models folder, create a model for each application.
Model: Customers.xml
Model View
Create a model view, save it as Demo_Model.html, and give it a try:
View: Demo_Model.htm
Now Combine Everything Together
Then, with a little JavaScript coding, create a test page for all models: