An AppML model describes an application.
An AppML model is a JavaScript object (JSON) describing an application.
This small model describes a full application for retrieving data from a database:
{
"database" : {
"connection" : "localmysql",
"sql" : "SELECT * FROM Customers"}
}
With an AppML model you can:
To allow users to filter data (search ,sort), you can add filter information to the model:
"filteritems" : [
{"item" : "CustomerName", "label" : "Customer"},
{"item" : "City"},
{"item" : "Country"}
]
To allow users to update data, you can add update information to the model:
"updateItems" : [
{"item" : "CustomerName"},
{"item" : "Address"},
{"item" : "PostalCode"},
{"item" : "City"},
{"item" : "Country"}
]
The applications you have seen earlier in this tutorial, did not use any models.
In later chapters, we will connect to databases, read, filter, and update data, as specified in a model.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!