AppMLケースプロトタイプ2024 年の最新の入門チュートリアル。このコースでは プロトタイプ,プロトタイプモデル,モデル:Proto_Customers.xml,モデル:Proto_Suppliers.xml,モデル:Proto_Products.xml,プロトタイプビュー,再生回数:Demo_Prototype.htm,これで、すべてのマージ,Demo_Prototype_Views.htm, について学習できます。
AppMLケースプロトタイプ
このケーススタディでは、データベース、編集、検索機能内のテーブルの数のために記載されている情報で、完全な<AppML>インターネットアプリケーションを構築する方法を示します。
プロトタイプ
この章では、各データベース・テーブル用のプロトタイプモデルを構築します。
プロトタイプは、アプリケーション開発を使用することは非常に簡単から開始されます。
プロトタイプモデル
まず、プロトタイプ用のフォルダを作成します。 フォルダはプロトタイプという名前です。
次に、データベースのテーブルごとに、プロトタイプモデルを作成します。
各テーブルからSELECT *を使用して、XMLファイルとしてモデルを保存します。
モデル: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>
プロトタイプビュー
プロトタイプのビューを作成し、Demo_Prototypeとして保存し、それを試してみます:
再生回数: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>
»をお試しください
これで、すべてのマージ
最後に、JavaScriptコードの小さな量は、すべてのページの簡単なプロトタイプモデルのプロトタイプを作成します。
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>
検索結果表示»