Graphic explanation of Asp.net three-layer architecture

Source: Internet
Author: User

What is a three-tier architecture?

Let's talk about the three-tier structure in the hotel.

Waiter: hospitality/submit menu

Chef: raw materials, cooking, and food delivery

Purchasers: Procurement

 

 

 

Layer-3 Structure Analysis

(1) The presentation layer provides users with an interactive operation interface.

(2) the business logic layer is responsible for key business processing and data transmission with the presentation layer and data access layer.

(3) data access layer stores and reads data.

The relationship between layers in a three-tier structure ----- the high-level dependency on the lower layer

Data transmission relationships between layers in a three-tier structure --- high-level request and low-level response

 

Three-layer structure construction method

 

1. Build a presentation layer (create a Windows Application)

2. Build a business logic layer (Class Library)

3. Build a data access layer (Class Library)

4. Add dependencies between layers

Use of entity classes in a three-tier structure

 

An entity class is a class that describes a business entity, namely:

Define each field in a data table as an attribute and encapsulate these attributes in a class. This class is called an object class.

Use of entity classes in a three-tier structure

Business entities can be considered to belong to the business logic layer. If you divide the layers into more details, you can separate the business entities as a layer called the business entity layer.

The presentation layer, business logic layer, and data access layer depend on business entities. Data transmission between layers is mainly an object.

You can use data as objects by using object classes.

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.