1
. Project Overview and Architecture Analysis Microsoft has just launched the Pet Shop 4, based on ASP.net 2.0, which has a new user interface. It's a good example of the study of ASP.net 2.0, and we all know that there has always been a debate between. NET and Java, which platform is the best enterprise-class application, optimal structure and highest productivity. In order to speak with the facts, the performance evaluation of various aspects of the project is then compared. NET and Java. The project that the user compares is PetShop. Because PetShop shoulder the above mentioned responsibility, all aspects must be optimal, architecture design should be carefully considered. So once it is launched, it becomes a model for developers, architects and others to study and research. Recently, Microsoft has launched the PetShop 4 based on the. NET Framework 2.0 development. The new PETSHOP4 implements the same and even more features as PetShop 3, with Master pages,membership and profile,sqlcachedependency, but the code volume is reduced by One-fourth. At the same time, the use of. NET 2.0 features in transactions, data caching, and security has built a flexible best practices application. They used project Conversion Wizard to migrate projects from ASP.net 1.1 to ASP.net 2.0, and then made the following changes: 1. System.Transactions replaces the original serviced components provided by the transaction function code implementation: PetShop.BLL.OrderSynchronous public void Insert ( PetShop.Model.OrderInfo order). 2. Replaces the original weakly-typed set public ilist<productinfo> with a strongly typed set of paradigms getProductsByCategory (String category) { //return new If the string is empty & nbsp; if (string. IsNullOrEmpty (category)) return new list<productinfo> (); //Run A search against the data store & nbsp Return DAL. getProductsByCategory (category); } 3. Use ASP.net 2.0 membership to do authentication and authorization 4. Custom asp.net 2.0 Membership Provider 5 was created for Oracle 10g. Use asp.net 2.0 's custom Oracle and SQL Server profile Providers to do user state management, including shopping carts, etc. 6. Using master Pages, replaced the original user control, to achieve a unified interface effect of 7. Check-out 8 is implemented using the ASP.net 2.0 Wizard control. SqlCacheDependency is used to implement cache update (cached invalidation) feature 9 of the database hierarchy. Message Queuing is used to implement a different-time order processing.
2.
Overall Architecture:
Database: (tentatively)
Project List: From the whole can be seen, Pet Shop 4 of the project system has been very large, considering the aspect is more comprehensive and complex than 3.0.
Serial Number |
Project Name |
Description |
1 |
Bll |
Business Logic Layer |
2 |
Cachedependencyfactory |
Factory class for caching dependency classes |
3 |
Web |
Presentation Layer |
4 |
Dalfactory |
Abstract Factory of data layer |
5 |
Dbutility |
Data Access Class component |
6 |
Ibllstrategy |
Synchronous/Asynchronous Policy interface |
7 |
Icachedependency |
Cache Dependency Class Interface |
8 |
Idal |
Data Access Layer Interface definition |
9 |
Imessaging |
Different-time processing Message Queuing interface definition |
10 |
Iprofiledal |
Data access layer interface definition for profile |
11 |
Membership |
Membership Authentication and Authorization management |
12 |
Messagingfactory |
Abstract factory for processing message queues at different times |
13 |
Model |
Business Entities |
14 |
Msmqmessaging |
Implementation of different-time processing message queues |
15 |
Oracledal |
Oracle Data Access Layer |
16 |
Oracleprofiledal |
Oracle Profile Providers user status management, including shopping carts, etc. |
17 |
Orderprocessor |
Background processing processes, processing order queues |
18 |
Profile |
Profile's data access layer |
19 |
Profiledalfactory |
Profiledal Factory Class (reflection creation Profiledal) |
20 |
Sqlprofiledal |
SQL Server profile Providers do user state management, including shopping carts, etc. |
21st |
Sqlserverdal |
SQL Server data Access layer |
22 |
Tablecachedependency |
Cache dependency Implementation Class |
Project Decomposition: As a whole already has 22 projects, so, for beginners to see dizzy, so, I did the decomposition, can be roughly divided into several pieces to understand.
Serial Number |
Project Name |
Description |
1 |
Web |