Multi-layered architecture is a software architecture where different product responsibilities are handled by separate layers. The most common layers used are: user interface and presentation layers, application and business layers, infrastructure layer. Each of them might have its own sub-layers.
User interface and presentation layers provide some multi-modal interfaces which allow users to communicate with the designed system using different methods e.g: keyboard and mouse, speech, gestures and others. Please find that this layer might be implemented as a part of a web-service, stand-alone application with or without graphical user interface. Furthermore, multi-layered architecture allows to create presentation layer before others. It might be interesting especially for the people who want to improve a usability, appearance so these parts of the product which often mostly affect customers.
Application and business layers are responsible for how our system works. These layers define objects and functional connections between them. The main responsibility of application and business layers is data processing. We shouldn’t be interest in obtaining the data because it is a separate problem (according to multi-layered architecture design pattern).
Infrastructure layer is responsible for obtaining the data which will be processed later. The source of the data is not defined. It may be files, databases, external services and many, many others. In that case the implementation of the infrastructure layer depends on the type of data but the main task of this layer is always the same.
Why we should use multi-layered architecture design pattern?
- each layer might be implemented separately by different people with different competence and skills, e.g graphic designer, software developer, enterprise developer, database engineers
- it is possible to verify each layer separately so much easier and faster, because of the relatively small size
- it is possible to divide each layer on sub-layers and use this design pattern frequently. We can always treat our module or even single function as a object which requires, processes and presents some data.
- architecture is much clearer, so it is easy to understand and describe implemented system on different levels: general view, technical details of each module
I encourage you to use multi-layered architecture in your commercial or non-commercial projects. The next posts will describe multi-layered architecture in practice, so I will provide some code.