<aside> <img src="/icons/map-pin_gray.svg" alt="/icons/map-pin_gray.svg" width="40px" /> For each pattern covered, make sure you properly understand that different software quality attributes of each one.
</aside>
An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. Architectural patterns are similar to software design pattern, but have a broader scope. It may help look at a quick recap of UML diagrams.
Client-server is a special case of a 2-layered architecture. It has several useful characteristics, such as synchronous request–reply communications from client to server.
Figure 5.1 Example of a client server system.
In a layered architecture, we have a client, presentation, business, and persistence, and data layers.
Figure 5.2 Layered architecture.
For example, let’s create a layered architecture for a library management system.
The presentation layer typically includes everything that is presented to end user — UI, such as buttons, menus, text fields, etc.
The business layer define how the application operates, such extending, borrowing, or holding a book.
The persistence layer is responsible for retrieving and searching data.
The database layer are essentially the tables you implement using a DBMS, such as MySQL.
In a layered architecture, each layer waits for a response from the other layer before proceeding.
Figure 5.3 A LMS layered architecture.
A request originating from the presentation layer must first go through the business layer, and then to the persistence layer before finally hitting the database layer.