Architectural Styles
Architectural styles are fundamental design principles that guide the structure and organization of systems. This isn’t really a new topic, as we previously covered them way back in COE692 - Notes.
Layered Architecture
A layered architecture, as the name suggests, is a sequence of layers and each layer can communicate to the layer above or below.

Figure 2.1 Layered design.
In simplifying the development of layered architecture, it is commonly preferred to categorize the architecture into three logical levels:

Figure 2.2 Logical layering.
- The application-interface level handles interaction with a user or some external application.
- The processing level contains the core functionality of the application.
- The data level operates on a database or file system.
For example, consider a simple Google search.

Figure 2.3 Search engine example.
- When you type something into the search box, you are interacting with the UI level of Google search.
- Then, the UI will send your input to a query generator at the processing level.
- The query generator translates your query expression into database queries and accesses the database located at the data level.
- A ranking algorithm in the processing level takes the query results, ranks them, and passes the result to the HTML generator at the same level.
- The generated page is then sent back to the UI layer and will be rendered by the browser as a webpage.
Client-Server Architecture