πŸš€ AppML Getting Started
Estimated reading: 4 minutes 390 views

AppML – First Application: Build Your First Dynamic Web App in Minutes

Introduction – Getting Started with Your First AppML Project

Creating a dynamic web application doesn’t have to be complicated. AppML (Application Modeling Language) empowers developers to build data-driven, interactive HTML applications without needing to write JavaScript. Whether you’re a student, educator, or beginner web developer, your first AppML application can be up and running in minutes.

In this article, you’ll learn:

  • How to build your first AppML-powered app
  • The basic structure of an AppML application
  • How to load and display data from a JSON file
  • Best practices for AppML app setup

Folder Setup – Structure Your Project

Before you begin, create a project folder like this:

/first-appml-project
β”œβ”€β”€ index.html
β”œβ”€β”€ data/
β”‚   └── users.json

Required File: appml.js

Include the AppML script in your HTML file by linking:

<script src="https://www.w3schools.com/appml/2.0.3/appml.js"></script>

This script powers all AppML functionality in your browser.


Step-by-Step: Create Your First AppML App

1️⃣ Create the JSON Data Model

Inside the /data/ folder, add users.json:

[
  { "name": "Alice", "email": "alice@example.com" },
  { "name": "Bob", "email": "bob@example.com" },
  { "name": "Charlie", "email": "charlie@example.com" }
]

This is your Modelβ€”the data source AppML will bind to your view.


2️⃣ Write the HTML (View + Data Binding)

Now, create index.html:

<!DOCTYPE html>
<html>
<head>
  <title>My First AppML App</title>
  <script src="https://www.w3schools.com/appml/2.0.3/appml.js"></script>
</head>
<body>

<h2>User Directory</h2>

<div appml-data="data/users.json">
  <h4>{{name}}</h4>
  <p>{{email}}</p>
</div>

</body>
</html>

Here’s what happens:

  • AppML fetches the users.json model.
  • It loops through each user.
  • It replaces {{name}} and {{email}} with actual values.
  • The output is dynamically rendered without JavaScript!

Expected Output in Browser

User Directory

Alice
alice@example.com

Bob
bob@example.com

Charlie
charlie@example.com

And you didn’t write a single JavaScript loop!


Understanding the AppML MVC Structure

Component Purpose
users.jsonModel: The source of structured data
HTML BlockView: Defines how data appears on screen
(Optional) ControllerLogic layer for filtering, validation, etc.

AppML handles the rendering engine internally. All you do is define data and layout.


Tips for Expanding Your First App

Once you’re comfortable, try:

  • Loading data from get-users.php (server-side)
  • Adding filters with a controller file
  • Displaying tables using <table> + {{fields}}
  • Styling with CSS

Summary – Recap & Key Takeaways

You’ve just built your first AppML app using only HTML and a JSON file. No JavaScript required, no frameworks to installβ€”just clean, structured code and instant output.

Key Takeaways:

  • AppML apps are built with a model (data), a view (HTML), and optional controller
  • Uses {{}} placeholders to bind data fields to the interface
  • Perfect for beginners and quick dashboard development
  • Just include appml.js and you’re ready to build!

Your first AppML project is now liveβ€”what will you build next?


FAQs – First AppML Application


Do I need a local server to use AppML?
Not for static JSON files. But if you’re working with PHP or databases, a local server like XAMPP or Live Server is required.


What types of data can AppML load?
JSON, XML, and server-side scripts like PHP/ASP that return JSON.


Can I use AppML without a controller?
Yes. Controllers are optional unless you need filtering, validation, or logic-based interaction.


What happens if my JSON path is wrong?
AppML will not display data. Always double-check the path in appml-data.


Can I use AppML for real-time data apps?
Yes, but it depends on how you update the JSON or server data source.


Share Now :
Share

AppML – First Application

Or Copy Link

CONTENTS
Scroll to Top