w3pop.com :: ÍøÂçѧԺ :: 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.
ÉÏÊö°¸Àý½«Ôڽ̵̳ÄÏÂÒ»ÕÂ×÷³ö½âÊÍ¡£