Petshop4.0 Learning (asp.net beginner)

Source: Internet
Author: User
Petshop4.0 design description asp.net beginner petshop4.0 Design Description
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

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, reads the set assembly in web. config, loads the class instance, and returns 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.

Article Source: http://www.cnblogs.com/jackyrong/archive/2007/06/07/775516.html

 

After PetShop4.0 is installed, double-click PetShop. sln and use VS2008 for debugging,

1. The project with the "Class Library output type" cannot be started directly.

D:/Program Files/Microsoft/. NET Pet Shop 4.0/Web/

Right-click "set as startup project", right-click "Default. aspx", and set it to "start page" to run the program again.

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.