AppML Application Modelling Language (Starter Guide for Beginners)

AppML is the abbreviation of Application Modelling Language. It can run in any HTML page to bring data for HTML Applications from the databases, files, and objects.

Introduction to AppML

Basically, HTML is designed to display static web content but when you want to display the dynamic content you use frameworks and other languages in addition to HTML, CSS, and JavaScript. AppML also does the same, it loads the data to extend HTML and controls the behavior of HTML with the help of Controllers. AppML is specifically designed to make Single Page Applications and it provides full control over HTML, CSS, and JavaScript, unlike many other frameworks.

Adding AppML to Your Web Application

To load AppML in your web pages, add the given code in the head of HTML application.

You might be thinking that How AppML displays dynamic data? AppML uses Curly Brackets {{ }} as placeholders for displaying data.

Binding Data With HTML Pages

AppML provides the data to the HTML pages, this data can be from the database or any other data sources i.e. JSON or simple JavaScript variables. To understand the concept let’s simply add JSON data to a JavaScript Variable and display the data using AppML. Use appml-data attribute to specify the data source, you can also add a separate JavaScript file containing JSON data or a separate PHP file for database interaction.

appml-data="record.js" or  appml-data="database-record.php"

If you want to specify the data within the HTML code then you can also do it.

Understanding Header and Footer Includes

Almost all the websites have specific includes, AppML also provides the include attribute so that you can add a single header and footer for all the web pages in order to get the consistency. Create a simple HTML file that contains the footer.

Now load the footer in the HTML page using appml-include-html attribute.


Note: If you are using Google Chrome then it will never allow you for Synchronous requests on the main thread because it is deprecated in Google Chrome. It will only work when the files are on the server.

 

Posted in: Web