Learn AppML

AppML is a lightweight JavaScript library that binds JSON data straight into HTML templates using declarative attributes, so a page can display and edit data without hand-written DOM or AJAX code.

What AppML Is

AppML (Application Modeling Language) is a small client-side library, appml.js, built around one idea: describe what data a page needs and how it should look, and let the library handle fetching, looping, and re-rendering. Instead of writing JavaScript that fetches JSON, loops over it, and stitches together DOM nodes, you write plain HTML with a handful of special attributes and placeholder markers, and AppML fills in the rest at load time.

A page becomes data-driven simply by pointing an element at a model file with the appml-data attribute. The model is a JSON configuration that describes where the underlying data lives (for example, a database table) and which operations, called actions, are allowed against it. AppML reads that model, requests data through it, and drops the results into the surrounding template.

  • Fetch data referenced by a model without writing fetch/XHR code
  • Repeat a block of markup once per row using appml-repeat
  • Show or hide markup based on data using appml-if
  • Fill in text and attributes from field names using {{fieldname}} placeholders
  • Submit forms that trigger insert, update, or delete actions on the same model

Example

<!DOCTYPE html>
<html>
<body>

<div appml-data="model.json">
  <h2>Employee List</h2>
  <div appml-repeat="employees">
    <p>{{firstname}} {{lastname}} - {{department}}</p>
  </div>
</div>

<script src="appml.js"></script>

</body>
</html>
Note: AppML originated as a W3Schools teaching project for building simple data-driven pages and small CRUD apps. It is a niche, largely legacy framework today with a much smaller ecosystem, community, and tooling than mainstream frameworks like React, Angular, or Vue - worth knowing for how declarative data binding can work, but not a common choice for new production applications.

The Three Building Blocks

PieceRole
Template (HTML page)Holds the layout and {{field}} placeholders plus appml-repeat/appml-if attributes
Model (JSON file)Describes the data source and lists the actions (list, insert, update, delete) available on it
appml.jsReads the template's appml-data attribute, talks to the model, and binds results back into the page

The next page, How It Works, walks through exactly what happens between the browser loading the page and the data appearing on screen.

Exercise: AppML Introduction

What does AppML primarily let developers do?

Frequently Asked Questions

What is AppML used for?
AppML is a small declarative approach for putting data onto a web page using HTML attributes rather than hand-written JavaScript. It suits simple data-driven pages, internal listings and prototypes where the goal is displaying records quickly rather than building a full application.
Do I need JavaScript before learning AppML?
Only a little. AppML is designed so that a page can bind to data with attributes alone, which is the point of it. Basic HTML matters most. JavaScript becomes useful once you want behaviour beyond displaying and filtering records.
Is AppML used in production work?
Rarely. It is a teaching and prototyping tool rather than an industry standard, and job listings almost never mention it. Learn it to understand declarative data binding as an idea, then apply that thinking in frameworks employers actually hire for.