YouTip LogoYouTip

Appml Architecture

AppML Architecture

AppML Architecture


MVC Architecture

<AppML> uses an MVC architecture.

MVC stands for Model View Controller, which is a software design pattern representing a model–view–controller architectural pattern.

  • Model: Describes your application.
  • View: Displays your data.
  • Controller: Controls your application.

Wikipedia: Model, View, Controller

MVC Image

Model (MODEL) - Just a Simple XML File

The model describes your application and can be reused on different hardware and software platforms (PC, iPhone, Tablets, etc.). It does not care about user interface (UI) or presentation form.

The model is written in XML and stored on a web server.

<appml>

<datasource>
    <database>
        <connection>Northwind</connection>
        <sql>SELECT CustomerName, ContactName, City, Country FROM Customers</sql>
    </database>
</datasource>

<filters>
    <query>
        <field label="Customer">CustomerName</field>
        <field>City</field>
        <field>Country</field>
    </query>
    <order>
        <field label="Customer">CustomerName</field>
        <field>City</field>
        <field>Country</field>
    </order>
</filters>

</appml>

This example defines that the data source comes from the Northwind database.

The model allows using predefined SQL to get data. It also allows querying and sorting data through Customer, City, and Country.


View (VIEW) - Just a Regular HTML File

The view is the UI (User Interface). It usually is an HTML page displaying and inputting data (optional):

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="appml.css" />
</head>
<body>
    <h1>My First Web Application</h1>
    <div id="Place01"></div>
    <script src="appml.js"></script>
    <script>
        customers = new AppML("appml.html", "Customers.xml");
        customers.run("Place01");
    </script>
</body>
</html>

The above HTML page creates an AppML object by executing script language and displays the data in the div with id="Place01".

The "appml.js" script file is used.


CONTROLLER (Controller) - Just a Browser-side Script

Server-side scripts control the application in the following ways:

  • Receives request data from the browser.
  • Returns the model and data to the browser.
  • Receives updated data from the browser.
  • Updates data on the server.
  • Data communication process, please perform data security verification.

Browser scripts control the application in the following ways:

  • You can load the <AppML> controller to the page when the page loads.
  • Using the controller, you can create an <AppML> object on the page.
  • When executing the <AppML> object, it requests data from the server.
  • The <AppML> object receives data from the server (using the data model).
  • The <AppML> object (or your code) displays your data on the page.
  • (Optional) Web users modify data.
  • (Optional) The <AppML> can send update requests to the server.

Typical Web Files and Folders

Folders Image
  • Web folder: **Demo**
  • Data folder: **Data**
  • Image folder: **Images**
  • Model folder: **Models**
  • Application: **Demo.htm**
  • Style: **Demo.css**
  • <AppML> configuration file: **appml_config.php** (or .htmlx)
  • <AppML> style file: **appml.css**
  • <AppML> browser controller: **appml.js**
  • <AppML> server controller: **appml.php** (or .htmlx)

Quick, Flexible Application Development

Quick Application Development (RAD) is not only a method of requirements extraction but also a unified method of software development. The goal of RAD is to quickly release system solutions, while technical elegance is secondary compared to the speed of release.

<AppML> provides ultra-fast prototyping, up to 100 times faster than traditional software development methods.

Application prototypes can run directly from the application model without any coding.

Wikipedia: Rapid Application Development

Agile software development is a step-by-step method based on collaboration between users and developers.

<AppML> applications can be developed incrementally from prototype to complete application.

Wikipedia: Agile Software Development


Declarative Programming

Software development often cannot be completed within the expected time and budget. Frequent coding errors also occur. This is because computer code is difficult to develop, test, and maintain.

Coding is already outdated. You should describe what to do more instead of how to implement it.

With <AppML>, you need to declare your application in the model.

Using <AppML> allows writing less or no code at all.

Wikipedia: Declarative Programming


Code First

Web application development can be done in two different ways:

  1. Code First: Use pre-programmed, pre-tested code, adding only new application descriptions.
  2. Contract First: Start from scratch by writing the application from full application description requirements.

<AppML> adopts the most reasonable concept: **Code First**.


Service-Oriented Architecture (SOA)

A **Web Service** is a data interface specified by a URL, like a webpage. But it differs from a webpage; it's just a way to communicate information.

A typical **Web Service** provides data to a page.

Using <AppML>, HTML is displayed as the user interface, and <AppML> provides the data.

Original Web Services designed used XML markers like SOAP, WSDL, and UDDI.

Modern Web Services like <AppML> are simpler.

  • Easier to understand - readable by us
  • Lightweight - no unnecessary code or markup
  • Easy to implement - no required development tools

Service-Oriented Architecture (SOA) is a component model that links different functional units of an application (called services) through well-defined interfaces and contracts. Interfaces are defined in a neutral way, independent of the hardware platform, operating system, and programming language that implements the service. This makes services built on various such systems interact uniformly and generically.


Advantages of Web Services

  • Web services require minimal code.
  • Web services are designed to handle a limited set of tasks.
  • Web services use HTTP-based communication protocols.
  • Web services are independent of the operating system.
  • Web services are independent of the programming language.
  • Web services can connect different applications, systems, and devices.
  • Web Services can easily publish information.
  • Web Services facilitate quick application development.

For example, a Web service could design a small program to provide other applications with the latest stock trading prices.

Web services use the HTTP protocol to communicate with other systems. Web services are independent of the operating system and programming language.

The application calling Web services will always use the HTTP protocol to send requests. The calling application will never care about the operating system or programming language running on another computer.

Web services can create new possibilities for more enterprises because they provide a simple way to distribute large amounts of information.

Examples: flight schedules and ticket booking systems.


Cloud Computing

Cloud computing (Cloud Computing) is an extension of SOA: Application-as-a-service, Storage-as-a-service, Data-as-a-service.

To most people, cloud computing means storing data on the web:

  • Email calendars
  • Documents and spreadsheets
  • Books, notes, to-do lists
  • Music, pictures, and movies
  • Databases and applications

The reason is clear:

  • Access data from anywhere in the world
  • Share my data with others
  • Hardware upgrades or crashes

<AppML> can easily place databases and applications in the cloud.

← Appml ReferenceAppml Howto β†’