Analysis of layer-7 architecture in. net

Source: Internet
Author: User
Analysis of layer-7 architecture in. net

Model entity layer, dbutility Data Access abstract class, idal data access interface layer, sqlserverdal data access layer, dalfactory Data Access factory class, BLL business logic layer, UI Interface Layer

I. Project Name and description: (implementation steps: 4-3-6-5-2-1)
1. Web = Presentation Layer
2. BLL = business logic layer
3. idal = data access layer interface definition
4. Model = Business Entity
5. dalfactory = Abstract Factory of the data layer (create reflection)
6. sqlserverdal = sqlserver data access layer/oracledal = ORACLE data access layer
Dbutility database access component basic class chinaz.com
2. Project Reference relationship
1. The web references BLL.
2. BLL references idal and model and uses dalfactory to create an instance.
3. The idal references the model.
4. The model is not referenced.
5. dalfactory references idal and readsProgramSet to load the class instance and return it to BLL for use.
6. sqlserverdal references model and idal, and is loaded by dalfactory to implement the methods in the interface.
3. Implementation steps
1. Create a model to implement business entities.
2. Create an idal to implement the interface.
3. Create sqlserverdal to implement the methods in the interface.
4. Add the configuration information in Web. config as the sqlserverdal assembly.
5. Create dalfactory and return the instance of the specified class of the Assembly.
6. Create BLL and call dalfactory to obtain the instance of the specified class of the assembly and complete the data operation method.
7. Create a web and call the data operation method in BLL.
Note:
1. The Assembly name in Web. config must be consistent with the output Assembly name in sqlserverdal.
2. Only one dataaccess class is required in dalfactory to create all Assembly instances.
3. After the project is created, modify the default namespace and Assembly name for each project.
4. Pay attention to modifying project dependencies in the solution.
5. Add project references in the solution.

For your security, please only open the URL with reliable source

Open websiteCancel

From:Http://hi.baidu.com/%D0%C4%C1%E9%C9%EE%B4%A6%B5%C4%C6%B7%CE%B6/blog/item/761e1f7a784749fc0ad18780.html

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.