The best AppML Reference Manual Tutorial In 2024, In this tutorial you can learn
<AppML> Data Model:,<AppML> Security,<Datasource> element,<Database> element,Data stored in SQL databases,Data stored in the XML file,Examples,Data stored in text (Text) file,Examples,If you need to create a database,
AppML Reference Manual
<AppML> Data Model:
<appml security=" security ">
<datasource>
Datasource definition goes here
</datasource>
<filters>
Filter definitions goes here (if any)
</filters>
<update>
Update definitions goes here (if any)
</update>
<anything>
Anything you want to add to the model
</anything>
</appml>
<AppML> Security
<AppML> Security by <AppML> tag set of security attributes.
<appml security="artists">
Application contains more than the beginning of the definition of security attributes only allow artists user login.
In this case, the user name of the logged-on user must be a member of the "artists" group.
<Datasource> element
<AppML> Application of the <datasource> element defines four different data types:
Subelement (only one applicable)
元素 |
描述 |
<database> |
定义数据类型 |
<xmlfile> |
定义 XML 源文件 |
<csvfile> |
定义一个逗号分隔的文本文件 |
<Database> element
<Database> element defines the database
Sub-elements
元素 |
描述 |
<connection> |
链接数据库名 |
<execute> |
数据检索前执行的SQL语句(可选) |
<sql> |
用于检索数据的SQL语句 |
<maintable> |
应用程序的主表(可选) |
<keyfield> |
主表的键字段(可选) |
Data stored in SQL databases
This is the data for the application of the most common solutions.
<datasource>
<database>
<connection>CDDataBase</connection>
<sql>SELECT Artist, Title, Country FROM CD_Catalog</sql>
</database>
</datasource>
The above data model can choose from three options (Artist, Title, Country) from "CD_Catalog" table "CDDataBase" database.
The number of rows returned is unknown.
Data stored in the XML file
<AppML> you can read data from an XML file:
Examples
<appml>
<datasource>
<xmlfile src="cd_catalog.xml">
<record>CD</record>
<item>
<name>Title</name>
<nodename>TITLE</nodename>
</item>
<item>
<name>Artist</name>
<nodename>ARTIST</nodename>
</item>
<item>
<name>Country</name>
<nodename>COUNTRY</nodename>
</item>
</xmlfile>
</datasource>
</appml>
This method can store data on the server XML files.
Data stored in text (Text) file
<AppML> you can read data from a text file:
Examples
<appml>
<datasource>
<csvfile src="cd_catalog.txt">
<item>
<name>Title</name>
<index>1</index>
</item>
<item>
<name>Artist</name>
<index>2</index>
</item>
<item>
<name>Price</name>
<index>5</index>
</item>
</csvfile>
</datasource>
</appml>
This method of data can be stored in a text file on the server.
If you need to create a database
<AppML> If you need to create a database:
<database>
<connection>CDDataBase</connection>
<execute>
CREATE TABLE CD_catalog
(
CD_Id INT IDENTITY,
Title NVARCHAR(255),
Artist NVARCHAR(255),
Country NVARCHAR(255),
Company NVARCHAR(255),
Price NUMBER,Published INT)
</execute>
</database>
Perfect rapid prototyping model!