C # three-tier architecture

Source: Internet
Author: User

recently newly learned, C # has a three-tier architecture

———— 2016-10-23

    • Presentation Layer
    • Business Logic Layer (BLL)
    • Data access Layer (DAL)

correlation: Generating dependencies

Description: The three-tier architecture is to add an intermediate layer between the client and the database, and typically the client cannot interact directly with the database, but through the middle tier and the data layer.

"Presentation layer"   

The main responsibility is to complete user and system interaction.

It receives the information entered by the user and represents the result of the processing from the superior to the user. The cover layer is sometimes compatible with a small portion of the business Logic layer (validating user input data and its legitimacy)

Typically as a Windows or Web application

"Business Logic Layer"   

Receives data from the presentation layer, passes it to the data access layer as a parameter, and then receives the processed data sent from the data layer to the presentation layer.

This layer of work is more complex, such as: to achieve business processes, business data validation

is a bridge between the presentation layer and the data layer, which needs to be done through the business logic layer to transmit and receive the information data.

"Data access Layer"   

The data access layer provides the system with the specification, unifies the data access portal, guarantees the business logic layer to the system data Access layer the specification and the efficiency, thus realizes the data to be effective, the safe access

This layer processes and interacts with the database according to the request of the business logic layer, and does not do any business processing of the data.

"My opinion"

The presentation layer accepts the user's request, according to the user's request to inform the business logic layer, the business logic layer receives the request, first approves the request, then sends the request to the data access layer or returns directly to the presentation layer, and the data access layer begins to access the database after receiving the request, and the data access layer obtains the requested result through the database And the result informs the business logic layer, the business logic layer receives the request result the request result notifies the presentation layer, the presentation layer receives the request result, then displays the result to the user;

PS: User Login system is an example of this application.

User input account password----> presentation layer to determine, in line with the-----> business Logic Layer to encapsulate---------> Data Access layer for further security, efficient judgment-------> results to the business logic layer-------> Presentation Layer Display Results

This kind of delivery is carried out step-by-step, step by step back, cannot cross pass.

    • Between the three tiers, the layers are interdependent relationships, the presentation layer relies on the business layer logic, the business layer relies on the data access layer, and the three tiers pass access through the external methods provided by themselves.
    • The loose coupling between the three layers does not interfere with each other, and the connection between them is accessed through the interface provided by themselves;
    • The data transfer method between the layers of the three-layer structure is divided into two methods of request and response.
    • Project Dependency direction: First pass from the presentation layer to the business layer to the data layer;
    • Numeric return: The data layer is returned to the business logic layer, which is returned to the presentation layer by the business logic layer and then displayed by the presentation layer;

Welcome to add!

*********************************

...... 2016-10-23 ...

...... Arvin......

... @ ^_^ @ .....

**********************************

  

C # three-tier 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.