4.7. < AppML > case study-prototype

发布时间 :2025-10-25 12:24:25 UTC      

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.

4.7.1. Prototype

In this chapter, we will build a prototype model for each table in the database.

Prototypes are the starting point for developing applications that are very easy to use.

4.7.2. Prototype model

First, create a folder for the prototype. The folder is named Prototypes.

Then, create a prototype model for each table in the database.

Use SELECT* from each table and save the model as a XML file:

模型:Proto_Customers.xml

<appml>
<datasource>
<database>
<connection>Demo</connection>
<sql>SELECT \* FROM Customers</sql>
</database>
</datasource>
</appml>

模型:Proto_Suppliers.xml

<appml>
<datasource>
<database>
<connection>Demo</connection>
<sql>SELECT \* FROM Suppliers</sql>
</database>
</datasource>
</appml>

模型:Proto_Products.xml

<appml>
<datasource>
<database>
<connection>Demo</connection>
<sql>SELECT \* FROM Products</sql>
</database>
</datasource>
</appml>

4.7.3. Prototype view

Create a prototype view, save it as Demo_Prototype.html, and give it a try:

视图:Demo_Prototype.htm

<h1>Customers</h1>
<div id="List01"></div>
<script src="appml.js"></script>
<script>
customers=new AppML("appml.php","Prototypes/Customers");
customers.run("List01");
</script>

尝试一下 »

4.7.4. Now put it all together.

Finally, create a simple prototype page for all prototype models with a small amount of JavaScript coding:

Demo_Prototype_Views.htm

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="appml.css" />
</head>
<body>
<h1>Demo Applications</h1>
<button onclick='myOpen("Customers")'>Customers</button>
<button onclick='myOpen("Products")'>Products</button>
<button onclick='myOpen("Suppliers")'>Suppliers</button>
<button onclick='myOpen("Shippers")'>Shippers</button>
<button onclick='myOpen("Categories")'>Categories</button>
<button onclick='myOpen("Employees")'>Employees</button>
<button onclick='myOpen("Orders")'>Orders</button>
<button onclick='myOpen("OrderDetails")'>OrderDetails</button>
<br><br>
<div id="Place01"></div>
<script src="appml.js"></script>
<script>
function myOpen(pname)
{
var app_obj
app_obj=new AppML("appml.php","Prototypes/" + pname);
app_obj.run("Place01");
}
</script>
</body>
</html>

显示结果 »

Principles, Technologies, and Methods of Geographic Information Systems  102

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.