AppML Setting Up
Setting up AppML means putting three plain files in place - a page, appml.js, and a model - with no build step, bundler, or framework installation involved.
What You Need
- A copy of the appml.js library file, included the same way you'd include any script (a <script> tag, no build tools needed)
- One plain HTML page that will hold your template and an appml-data attribute
- A model file (JSON) describing the data source and the actions allowed on it
- A data source - anything from a static JSON array to a real database reached through server-side actions
Because appml.js is a single script include, there's no package manager, compiler step, or project scaffolding required to get a page running. You add the script tag, write plain HTML, and point one attribute at a model file.
Example
<!DOCTYPE html>
<html>
<body>
<div appml-data="model.json"></div>
<script src="appml.js"></script>
</body>
</html>A typical layout keeps the HTML page, the model file, and (for database-backed models) any server-side script the actions rely on in the same folder or a predictable relative path, since appml-data and the model's own action definitions are usually referenced by filename or relative URL rather than an absolute path.
Static Data vs. a Real Data Source
With the pieces in place, Your First Page walks through building and running a complete minimal example.