Easy Tutorial
❮ Appml Reference Appml Case Intro ❯

How to Use <AppML>


This chapter will demonstrate how to create an <AppML> application through the following 4 simple steps.

The next chapter will introduce how to download <AppML> and start developing web applications on your own computer.


1. Create a Model

Create a file with the following content.

Save the file as Customers.xml in the Models subdirectory (we recommend).


Model Parsing

The <appml> tag defines the model.

The <datasource> tag defines the model's data source.

The <database> tag defines the database.

The <connection> tag defines the database connection.

The <sql> tag defines the data query.

The <orderby> tag defines the default sorting.

The <query> tag defines valid query filters.


2. Create a Web Page

In your first <AppML> app, create an HTML page:

Example


3. Add Styles

Add cascading styles to your web page when executing the <AppML> app:

Example


4. Add Scripts, Then Run the Application

Add scripts to your web page to run the <AppML> app:

Example


Example Parsing

The <AppML> library contains a multitude of functions. These functions can be called in your web page.

<script src="appml.js"> loads the <AppML> library.

JavaScript statement: app=new AppML("appml.htmlx","Models/Customers.xml"); creates an AppML application object, then executes the server-side script "appml.htmlx" to load data from the "Customers.xml" file.

JavaScript statement app.run("Place01","Template01"); inserts data into the HTML element with id="Place01", using the element with id="Template01" as the template.

The attribute id="appml_row" defines where each data entry is inserted into the HTML element.

Data in the markup will be replaced with data from the model.

Can you imagine a faster prototyping process?


How It Works


Typical Web Files and Folders

| | | Web Folder: Demo Data Folder: Data Image Folder: Images Model Folder: Models Application: Demo.htm Styles: Demo.css <AppML> Configuration File: appml_config.php (or .htmlx) <AppML> Style File: appml.css <AppML> Browser Controller: appml.js <AppML> Server Controller: appml.php (or .htmlx) |


No Restrictions

You can place <AppML> objects in an HTML page. <AppML> does not affect other parts of the page.

<AppML> defaults to a standard display page when no specific layout is present. This is perfect for rapid prototyping.

However, the primary function of <AppML> is not for page display. <AppML> is mainly for reading application data. The data it brings can be freely styled using HTML, CSS, and JavaScript. You can:

You will quickly discover that <AppML> has powerful capabilities, providing data and data models for your web applications. You can:

Read the <AppML> Reference Manual

❮ Appml Reference Appml Case Intro ❯