How to Use
This section will demonstrate how to create
The next chapter will introduce how to download
1. Create Model
Create a file with the following content
Save the file as Customers.xml in the Models subdirectory (recommended).
Model Parsing
2. Create a Web Page
In the first
Example
My First Web Application
| Customer | City | Country |
|---|---|---|
| Alfreds Futterkiste | Berlin | Germany |
Try it »
3. Add Styles
Add cascading styles to your web page
Example
My First Web Application
| Customer | City | Country |
|---|---|---|
| Alfreds Futterkiste | Berlin | Germany |
Try it »
4. Add a script, then run the application
Add a script to your web page to run
Example
My First Web Application
class="appmltable">
| Customer | City | Country |
|---|---|---|
|
#CustomerName# |
#City# |
#Country# |
Try it »
Example Parsing
Loaded the
JavaScript statement: app=new AppML("appml.htmlx","Models/Customers.xml"); Create the AppML application object, then execute the web server script "appml.htmlx" to load the data from the "Customers.xml" file.
JavaScript statement app.run("Place01","Template01"); Insert the data into the HTML element with id="Place01", using the element with id="Template01" as a template.
The attribute id="appml_row" defines where each piece of data is inserted into the HTML element.
The data in the markup is replaced using the model's data.
With all of the above, can you imagine a faster prototype?
How does it work?
- When the web page loads, you can load the
controller in the page. - Using the
controller, you can create the object in the page. - When you run the
object in the page, it will request the server data controller. The object receives data from the server (using the data model). The object (or your code) displays the data in the page. - (Optional) Web users can change the data.
- (Optional)
can send data to the server backend. - (Optional) The server controller can store data on the server.
Typical web files and folders:
|

Web folder: Demo
Data folder: Data
Images folder: Images
Models folder: Models
Application: Demo.htm
Style: Demo.css
<AppML> config file: appml_config.php (or .htmlx)
<AppML> style file: appml.css
<AppML> browser controller: appml.js
<AppML> server controller: appml.php (or .htmlx)
| | --- | --- | --- |There is no limit to where
you can place the
However,
- Write the HTML yourself and let AppML handle the data.
- Call the model and handle all the display.
- Use AppML's attributes and methods to create other combinations.
You will soon find that
- Define data security for users or user groups,
- Connect to all types of databases, such as Access, MySQL, SQL, and Oracle,
- Connect to XML files and Text files,
- Define data types, data formats, and data restrictions.
- Add any new element to the model.