Website Design and Development with HTML5 and CSS3. Hassen Ben Rebah
the need to open it, the refrigerator gives you a description of the missing ingredients as well as the nearest supermarkets that sell this product.
Figure 1.5. LCD screen of a Samsung smart refrigerator5
1.3. Web application architecture
1.3.1. The three levels of abstraction of an application
In general, we can divide a computer application into three different levels of abstraction:
– Presentation, also known as HMI, promotes interaction between the user and the application. This layer governs keyboard and mouse input, and presents information on the screen. It is strongly recommended that this aspect be ergonomic and pleasant.
– Processing represents the tasks to be performed by the application. They are divided into two categories:- local processing, assembling the checks performed on the conversation with the HMI (e.g. checking and input assistance);- global processing, essentially forming the application. This is what is known as the business logic layer.
– Data, more precisely access to data, which involves assembling the tools for managing data stored by the software.
Table 1.1. The three levels of abstraction of an application6
Presentation | Presentation management | ||
Presentation logic | Core of the application | ||
Processing | Local | Processing logic | |
Global | Processing management | ||
Data | Data logic | ||
Data management |
NOTE.– These three levels can be nested or distributed in several possible ways between multiple computers.
1.3.2. One-tier architecture
In the case of a one-tier application, the three layers are connected and run on the same device: it is a centralized architecture. In this situation, users access applications running on the primary server (the mainframe) through passive terminals, which are slaves. The primary server handles all processing, in addition to the presentation that is easily relayed back onto client devices.
Figure 1.6. Architecture of an application on a central server
Table 1.2. Benefits and disadvantages of one-tier architecture
Benefits | Disadvantages |
---|---|
Meets the needs of a single user Easy to deploy | Mainframe overload Maintenance is difficult |
1.3.3. Two-tier architecture
In the case of two-tier architecture, also known as a client-data server, or first-generation client-server, the client device is satisfied with assigning data management to another service. A specific example of this architecture is a management application that runs on a Windows or Linux operating system and accesses a central DataBase Management System (DBMS). This application makes it possible to benefit from the power of calculators deployed in a network in order to provide a user-friendly interface, while ensuring consistency of the data, which are always managed centrally.
A centralized DBMS handles data management and runs frequently on a dedicated server. This server is queried using a query language, usually Structured Query Language (SQL). The conversation between the client and the server can therefore be summarized as the sending of requests and, in response, data matching the requests.
Figure 1.7. Two-tier architecture (client-data server)
NOTE.– The exchange of messages between the client and the server is accomplished via a network by means of a middleware (the network layers and software services promoting conversation between the components of a distributed application).
Table 1.3. Benefits and disadvantages of two-tier architecture
Benefits | Disadvantages |
---|---|
User-friendly interface Centralized dataPowerful architecture for a reduced number of users (< 50) | Fat client: the client supports most application processingApplication updates must be deployed for all clientsLimited number of clients: changes in the number of clients cause a degradation in server performance |
1.3.4. Three-tier architecture
Three-tier architecture, also known as the client-distributed server, or the second-generation client-server, subdivides the application into three different service levels:
– first level: presentation and local processing (data formatting, input checks, etc.) are accomplished by the client device;
– second level: global processing of the application is accomplished by a web server equipped with application extensions;
– third level: the data are accomplished by a database server (centralized DBMS).
Figure 1.8. Three-tier architecture
Table 1.4. Benefits and disadvantages of three-tier architecture
Benefits | Disadvantages |
---|---|
Thin client Easier deployment Centralized DBMS | All of the complexity lies in the intermediate tier (the web server) |
1.3.5. n-tier architecture
n-tier architecture was created to address the limitations of three-party architectures and to create robust, easy-to-maintain applications. In reality, n-tier architecture confirms the distribution of the application layer between different services and not the reproduction of the layers. The application layer consists of “business” components that are independent and specialized. They communicate with each other