Layer models - also referred to as layer architectures - define principles for structuring software architectures. The hierarchical structuring of layers is a frequently used pattern of architecture. Each layer is assigned a specific aspect - this can be a partial functionality, a closed component or even a class. The goal of the layer models is it to be able to structure and finally also reduce the complexity of software systems better, from which then a maximization of the cohesion of individual layers results. Well-known layer models are the Three-Tier-Architecture or multi-layer architectures (Multi-Tier-Architecture).
In connection with layer models, one also speaks of multi-tier models. The goal of this modeling is to bundle similar points of view or approaches with regard to the problem and to assign them as cohesively as possible to a layer. Similar points of view - also called aspects - can be oriented to the planned functionality, to self-contained problems or, with regard to object-oriented programming, to more complex classes. The coupling between the layers should be kept among other things under the aspect of the maintainability of software small, in order to minimize so the dependencies among themselves. The access of the layers among themselves is hierarchically organized; thereby the aspects of a layer can always access only the aspects of underlying layers. Here also the term of the Dependency Inversion Principle - the dependence inversion principle - is used, which describes originally with the object-oriented draft of software the dependence of modules.
Further one differentiates so-called strict layer models and designates with it the case, which may be skipped within the model no layers. This has however a limited performance of the software system to the consequence; on the other hand advantages result regarding better maintainability, changeability and portability. Layer models are differentiated on the basis the number of the layers. The most different models are aligned to the specific use case in common use.
An early model for the design of software systems is the two-tier architecture. The relationship of the layers is shown in the figure. The upper application layer integrates the user interface and also the technical implementation of the task. Below this is the separate data management layer for storing the data. From the point of view of an application system, this concept is disadvantageous due to the integrity of the user interface and the business concept, because changes can be quite time-consuming. However, this model can very well be implemented on client- server architectures.
Today, three-tier architectures are frequently used in the creation of software architectures. The graphical user interface( GUI) and the actual business concept are separated. The data management layer then lies underneath this.
Since there are many other possibilities for defining layer models, one also speaks of multi-layer software architectures in this context; the type and number of layers is ultimately not limited. A possible example shows the adjacent illustration. Here the layers for show up:
- Presentation: GUI, input and output,
- Application: Coordination of workflows, transformation of data,
- Business concept: implementation of business requirements,
- Business infrastructure: basic, generally usable business functions,
- Technical services: higher technical services such as persistent storage and data security,
- Basic services: lower technical services such as thread management, database and network.
Reusability For this, each layer needs a clearly assigned task and related interfaces.
Maintainability Developed towards the unique interface. This means that the internal organization of a layer can change, only the interface must remain unchanged.
PortabilitySystem- or hardware-dependent functions must be grouped in a separate layer, so that changes in this regard only apply to this layer.
Layer models find an extended application in another context in the creation of the architecture of operating systems - here they are called shell models.
A layer model with a special background is the OSI reference model, according to which the design of communication protocols can take place.