...

/

Layered Architectures

Layered Architectures

In this lesson, we will learn the basics of layered architectures.

Before understanding the reasons behind the creation and adoption of the MVC pattern, we need to understand how and why a well-structured application is organized in layers. The next section is dedicated to a short summary of layered architectures. Next, we will analyze the MVC pattern and its ASP.NET Core implementation in detail.

The different activities of a web application

All business applications, and, in general, all non-trivial web applications, perform three kinds of activities:

  1. Interacting with the user to take their inputs and to return results. This activity is called Presentation.

  2. Performing business-specific processing on data. For instance, a personnel management application computes salaries taxes, etc., while an E-Commerce application computes prices, discounts, and delivery plans. This activity is called Business.

  3. Storing and retrieving information from long-term storage. This activity is assigned the Data label.

Since the above three activities involve different technologies, tools, and libraries it is strategic to make the code-base of each of them independent from the others. This goal can be achieved only by organizing the three code-bases into separate modules that communicate through well-defined ...