A multi-tier architecture is a multi-member layered architecture that defines the principles for structuring software architect ures. Hierarchical structuring by means of layers is a frequently used architecture pattern. TheOne-Tier-Architecture, the Two-Tier-Architecture and the Three-Tier-Architecture are to be classified in this context. These architectures are frequently used for client- server architectures.
The 3-tier architecture consists of three tiers. Tier 1 represents the presentation and input layer, Tier 2 represents the business process, and Tier 3 represents the data and other resources. As can be seen from the figure, the graphical user interface( GUI) and the actual business concept are separated. Below this is then the data storage layer where the data storage takes place. The three-tier architecture is a frequently used form of architecture pattern in the creation of software systems. Due to the strict logical separation of the layers, its use in distributed system architectures is also common.
Three-tier model as software architecture
The three-tier model is a software architecture that has three distinct layers - the presentation layer, the application layer, and the data layer. The layer model clarifies the fundamental connection. Here, the presentation layer represents the graphical user interface (GUI) through which the user can directly access a web page. This layer communicates with the other layers and sends the results to the browser or client layer. The middle layer is the application tier, on which the business requirements are realized. The application tier or logic tier supports the business process and data access. In addition, this layer includes corresponding interfaces for accessing the underlying data layer or data management layer, which is usually implemented in the form of a database and handles the storage and loading of data.
With regard to the characteristics of the three-layer architecture, there are two different possibilities; the strict and the flexible separation of the three layers. In the strict separation, each layer can only access the one directly below it. The advantage of this arrangement is the strict independence of the user interface from the data storage layer. A higher flexibility is achieved if the GUI layer can additionally access the data storage layer directly. A use of the respective style is to be weighed in view of the accompanying factors such as maintainability, changeability and portability in the concrete context.
The characteristic of the 3-tier architecture
A fundamental characteristic of the three-tier architecture is that neither the business concept layer nor the data management layer can access the GUI layer. Thus, neither of these two layers has explicit knowledge regarding the user interface. Thus also their development and modification is possible independently of each other, which corresponds to the today's understanding of a modern software engineering. Here one speaks also of the realization of the Model View architecture, whereby Model represents the specialized concept and View the user interface. Nevertheless, there must be a connection to the display and input of data of the business concept layer by the GUI layer. For this purpose, the layers exchange messages based on the following procedures:
Polling In this process, the GUI layer polls the domain layer at regular intervals for possible modifications and sends related messages to the domain layer. However, this procedure is not very performant.
Indirect communication In object-oriented programming, this can be done on the basis of a design pattern - the observer pattern. In this case, the business concept layer sends a corresponding message to the GUI layer when changes are made. This then independently retrieves the changed data.
Due to the logical separation of the individual layers, the three-layer architecture is easily scalable and can therefore be used in distributed software architectures. A structured use of the architecture is given for example in the assignment of the GUI layer to the workstations of the users, in the storage of the business concept layer on workgroup servers and the central integration of the data storage layer on a database server. The principle applies that the higher the layer, the better it can be assigned to a client. The reverse is also true; the lower the layer, the more centrally it is embedded in the software architecture.