Latest web development tutorials

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.html로 저장하고 그것을 밖으로 시도 :

조회수 : 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>

»시도


이제 모두가 함께 병합

최종적으로, 자바 스크립트 코드 소량의 모든 페이지에 대한 간단한 원형 모델 프로토 타입을 생성 :

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>

결과보기»