This case study demonstrates how to build a complete < AppML > Internet application with the ability to enumerate, edit, and search for information against several tables in the database. In this chapter, we will build a complete application model for the Customers table in the database. To allow filtering of < AppML > data, simply add a < filters > element to the model: For a comprehensive understanding, see < AppML > 参考手册 . To allow < AppML > data to be updated, simply add a < update > element to the model: And add a < maintable > and < keyfield > element to the < database > element: For a comprehensive understanding, see < AppML > 参考手册 . You can easily add security to the < AppML > model by adding a security attribute to the < AppML > tag. In the above example, the model can be accessed only if the user logs in to become a member of the user group “admin”. To set security for the < update > element, simply add a security attribute to the < update > element: In this chapter, we will set up an application model for each table in the database. Create a new folder called Models. In the Models folder, create a model for each application. Create a model view, save it as Demo_Model.html, and give it a try: Then, with a small amount of JavaScript coding, create a test page for all models:
In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress. 4.8.1. Application model ¶
4.8.2. < AppML > filter ¶
Example: ¶
<filters>
<query>
<field label="Customer">CustomerNamefield>
<field>Cityfield>
<field>Countryfield>
query>
<order>
<field label="Customer">CustomerNamefield>
<field>Cityfield>
<field>Countryfield>
order>
filters>
4.8.3. < AppML > Update ¶
Example: ¶
<update>
<item><name>LastNamename>item>
<item><name>FirstNamename>item>
<item><name>BirthDatename>item>
<item><name>Photoname>item>
<item><name>Notesname>item>
update>
Example: ¶
<maintable>Customersmaintable>
<keyfield>CustomerIDkeyfield>
4.8.4. < AppML > Security ¶
Example: ¶
<appml **security="admin"**>
Example: ¶
<update **security="admin"**>
<item><name>LastNamename>item>
<item><name>FirstNamename>item>
<item><name>BirthDatename>item>
<item><name>Photoname>item>
<item><name>Notesname>item>
update>
4.8.5. Complete Customers model ¶
模型:Customers.xml ¶
<appml security="">
<datasource>
<database>
<connection>Democonnection>
<maintable>Customersmaintable>
<keyfield>CustomerIDkeyfield>
<sql>SELECT \* FROM Customerssql>
<orderby>CustomerName,City,Countryorderby>
database>
datasource>
<filters>
<query>
<field label="Customer">CustomerNamefield>
<field>Cityfield>
<field>Countryfield>
query>
<order>
<field label="Customer">CustomerNamefield>
<field>Cityfield>
<field>Countryfield>
order>
filters>
<update security="admin">
<item><name>CustomerNamename>item>
<item><name>ContactNamename>item>
<item><name>Addressname>item>
<item><name>PostalCodename>item>
<item><name>Cityname>item>
<item><name>Countryname>item>
update>
appml>
4.8.6. Model view ¶
视图:Demo_Model.htm ¶
<h1>Customersh1>
<div id="List01">div>
<script src="appml.js">script>
<script>
customers=new AppML("appml.htmlx","Models/Customers");
customers.run("List01");
script>
4.8.7. Now put it all together. ¶
Demo_Model_Views.htm ¶
Demo Applications
Principles, Technologies, and Methods of Geographic Information Systems
102