当前位置: 首页 > 网络学院 > 客户端脚本教程 > APPML > AppML 案例
AppML applications are described with XML.
AppML 应用程序是由XML书写的。
When you want to change your application, just edit the XML file. The web service will take care of the rest.
当你希望改变你的应用程序时,你只要编辑XML文件就可以了。网络服务程序会自动处理剩余工作。
That's all...
这就是全部内容...
One of the nicest thing about AppML is that it is extensible. You can use AppML to describe existing applications, or only a small part of an application. You can also add your own elements to an AppML description and extend the capabilities of AppML to your own needs.
AppML的一个最大的两点就是它的扩展性。你可以使用AppML来描述现有的应用程序,或者是应用程序的一部分。你同样也可以向一个AppML描述中添加你自己的元素,并且扩大AppML的功能来满足自己的需要。
Since AppML is so flexible, and can be used to describe only small parts of an application, you can start using AppML today!
因为AppML的变通性极强,所以,它可以用来描述应用程序的其中一小部分。那么现在,你就可以开始使用AppML了。
Start using it against an already existing application. Rebuild a small part of the application. If you like the way AppML works, you can continue your project, until everything is converted to AppML.
通过一个现存的应用程序来使用它。再重新创建应用程序的其它部分。如果你喜欢AppML的工作方式,你就可以继续你的项目,直到每样东西都能够被转换成AppML为止。
This is a simple AppML description:
下面是一段简单的AppML描述:
<appml> <title>CUSTOMERS</title> <database> <filters> <htmlform /> </appml> |
The AppML description above describes a connection to a database and an SQL statement to extract some data from the database. (AppML can do a lot more than this, but we will keep this example as simple as possible).
上面的AppML语句描述了关于链接到数据库的方法,以及从数据库中释放数据的SQL语句。(AppML还有其他更多的功能,我们仅是为了列举更加容易读懂的案例)
Copy the example above into Notepad and save it on your Web server as "example.xml".
将上面的案例复制到记事本,并以“example.xml”文件保存到网络服务器上。
You have now created your first AppML application.
现在,你已经创建了第一个AppML 应用程序了。
To execute the example above, you will have to link to an AppML Web Service, like this:
如果你需要执行上述案例,你还需要链接到一个AppML的网络服务程序,具体如下:
Once again: AppML can do a lot more than this, but we will keep this example simple. Don't mind the color, style or layout of the HTML. With AppML you can easily change any part of the layout with your own templates and stylesheets.
再者:AppML还具备很多其它的功能。但是,我们希望让案例简单化,因此,不考虑具体的字体颜色、样式或HTML布局。通过AppML,你可以简单地改变末拌合样式表中布局的任意部分。
The example above is explained in the next chapter of this tutorial.
上述案例将在教程的下一章作出解释。