Determining the required layers

For most of the applications that you will write, they will have common functionality. It is advised to group this common functionality into different projects as layers. 

In the case of our TicTacToe demo application, we would have all the views grouped into one project as the presentation layer, services such as the UserService, EmailService, and others all grouped into the service layer, all the models such as UserModel grouped into a project as the domain layer, and a data access layer that will contain the database contexts. This will be explained in Chapter 9, Accessing Data Using Entity Framework Core 3

The hypothetical layered application for our demo application would look as follows:

It's nice to have a layered application, but don't go on a wanton spree of randomly creating layers. The key is to look for functionality that makes sense for it to be grouped together so that you can make your application more maintainable and more scalable.

We won't be using this layered architecture in this book. We are only mentioning it for the sake of awareness so that you understand that we can improve on the current design of the TicTacToe application in many ways.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.134.232