O'Reilly logo

.NET Domain-Driven Design with C#: Problem – Design – Solution by Tim McCarthy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Designing the Layered Architecture

Since I have decided that the application architecture will use a layered approach, it is time to create the Visual Studio solution to host these layers.

The Problem

In order to implement the layered approach correctly, there are some steps that I will need to follow:

  1. The Visual Studio solution must be organized make it very obvious where the layers have been implemented in the code modules.

  2. Each individual layer needs to be designed as well, and needs to include the design patterns and technologies for each layer.

  3. I need to decide what functionality belongs in each of the layers.

  4. An application framework needs to be built that will simplify coding the application.

The Design

In this chapter, there are two main items that need to be designed, and those items are the Visual Studio solution and the actual architectural layers of the SmartCA application.

Designing the Visual Studio Solution

As stated earlier, the first step in implementing the layered architecture is to create a Visual Studio solution that will support the approach.

The initial skeleton for the solution will hold four projects, one for each layer of the application. Figure 2.1 below shows this initial design.

Initial code skeleton design.

Figure 2.1. Initial code skeleton design.

The first three projects in the solution are basic C# Class Library projects, and the last project, SmartCA.Presentation, is actually a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required