ASP. NET Vnext Project Combat one: layered architecture

Source: Internet
Author: User

1. Preface

It seems that some people in the garden have specifically summed up some of the project hierarchical structure introduced, called him " brother ", do not know if he still in the lakes and waves? But the fame is gone. This is not, I have forgotten his surname name who, where to find?

When it comes to the classic three-tier architecture , it is also the basis for learning and mastering other layered architectures, and the domain-driven design architecture has been active for many years, not to mention more schema architectures .

Anyway, layered? Do not layered for layering, but to decide whether it is necessary to do so. When people see your things are not good, may leisurely say: you can do that, but you should not do that! you are not dizzy, in the heart easily hit a big question mark: In the end how to do? Yes, many practices do not have absolute good and bad points, such as looking at different angles of the problem, the ability to comprehend different ... Would have a different view. So the following describes my solution in the project hierarchy, one is not very complex, to start, and second, you have your own project structure of ideas, do not beg to disagree!

2. Catalogue Map

Create 5 items (all ASP. NET 5 templates with ASP. NET Core; one Web project, four class library projects):

3. Project description

Givecase.web: Webapi (MVC6 rest style) +razor (easy to use layout page);

Givecase.controllers: Isolate the controller of MVC;

Givecase.repositories: Encapsulating data and business operations;

Givecase.entities: entity class;

Givecase.commons: some general classes;

Note: Some projects may be added, such as business operations may add sericves layers, and some transport objects and view models may also add a Models layer!

4. Summary

The content of this chapter is less, why haven't you written the code yet? What else can you ask of me? Expect not too high, easy to meet, such people who have not happy!

ASP. NET Vnext Project Combat one: layered architecture

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.