Three layer Stage understanding

Source: Internet
Author: User

I. Overview.

The three-tier architecture typically has a three-tier architecture that divides the entire business application into: Presentation layer (UI), Business Logic Layer (BLL), data access Layer (DAL). The purpose of distinguishing hierarchy is to think of "high cohesion, low coupling". Second, understand the various layers

UI layer: This is the primary purpose of the presentation layer to interact with the user. For example, the computer room charge system in the recharge this form, to enter the card number, the UI layer is the purpose of the input card number information to the BLL layer. The goal is to pass data to the BLL layer, and the UI layer does nothing to determine any action.

BLL layer: Business logic layer, this is the data from the UI layer, to judge, simply to do a series of logic on the operation. or the recharge form to example, card number passed to the BLL is not the card number in the DAL layer to make judgments, but using the BLL layer to call the DAL layer to the database of the card number information to the BLL layer. On the BLL layer, the card information from the UI layer and the card number information of the DAL layer are gathered, which is a comparison of the two information. If the card number exists then the BLL layer invokes the DAL layer on the database operation. The DAL then passes the results of the database operation to the BLL layer. The BLL layer on the temporary deposit of the recharge card number information. This information is called directly from the BLL layer when the UI layer needs this data. Show up.

Another example: The combination of queries, the BLL layer has the SQL statements in the combination of parameter statements and then directly to the DAL layer.

DAL layer: Data access layer. is a layer of operation with the database, if the database is SQL sever then this layer has a lot of purpose SQL statements. is the direct operation of the database.

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.