WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AppML API


The AppML API characterizes the strategies and properties of AppML


What Can Methods and Properties Do?

With strategies and properties you can:

  • Create AppML applications
  • Feed applications with data
  • Fetch application information for use in your web page

Example

new AppML() makes another AppML object.
dataSource
sets the information wellspring of the AppML object.
getData()
gets the data.
data.records
contains the information records.

You can circle the records and show the substance in a HTML element:

Example

/Create an AppML article and get the data
myObj = new AppML();
myObj.dataSource = "http://www.welookups.com/appml/customers.php";
myObj.getData();

/Locate the information records
myArr = myObj.data.records;
len = myArr.length;

/Display the records
for (I = 0; I < len; i++) {
    txt += myArr[i].CustomerName + "<br>";
}
document.getElementById("demo").innerHTML = txt;

Result

Alfreds Futterkiste
Berglunds snabbköp
Centro comercial Moctezuma
Ernst Handel
FISSA Fabrica Inter. Salchichas S.A.
Galería del gastrónomo
Island Trading
Königlich Essen
Laughing Bacchus Wine Cellars
Magazzini Alimentari Riuniti
North/South
Paris spécialités
Diamondback Canyon Grocery
Simons bistro
The Big Cheese
Vaffeljernet
Wolski Zajazd

Some AppML Methods

Method Description
new AppML() Creates another AppML object
run() Runs an application object
appml("name") Returns the appml object with the predetermined name
displayMessage(text) Displays a predefined message.
setError(no, description) Sets a predefined blunder and mistake description.

Some AppML Properties

Property Description
appName The application name (the holder id)
container The application holder element
controller The application controller
data The application information object
dataSource The application information source
message The application message

Some Data Object Properties

Property Description
data.model The application information model
data.records The application information records