学习petshop 4.0 整理的资料

来源:互联网 发布:linux vim强制退出 编辑:程序博客网 时间:2024/05/22 13:57

1.整体架构:


数据库:(暂略)

项目列表:从整体可以看出,Pet Shop 4的项目体系已经很庞大,考虑的方面也较3.0更全面复杂。

 

2.petShop 4.0 的命名空间 以及各个项目模块的说明  

序号

项目名称

程序集名称Assembly Name 默认命名空间Default Namespace

描述

1

WEB

   

表示层

2

Model

PetShop.Model PetShop.Model

业务实体

3

BLL

PetShop.BLL PetShop.BLL

业务逻辑层

4

DALFactory

PetShop.DAL PetShop.DALFactory

数据层的抽象工厂

5

IDAL

PetShop.IDAL PetShop.IDAL

数据访问层接口定义

6

SQLServerDAL

PetShop.SQLServerDAL PetShop.SQLServerDAL

SQLServer数据访问层

7

OracleDAL

PetShop.OracleDAL PetShop.OracleDAL

Oracle数据访问层

8

DBUtility

PetShop.DBUtility PetShop.DBUtility

数据库访问组件基础类

9

CacheDependencyFactory

PetShop.CacheDependencyFactory PetShop.CacheDependencyFactory

缓存依赖类的工厂类

10

ICacheDependency

PetShop.ICacheDependency PetShop.ICacheDependency

缓存依赖类接口

11

TableCacheDependency

PetShop.TableCacheDependency PetShop.TableCacheDependency

缓存依赖实现类

12

IBLLStrategy

PetShop.IBLLStrategy PetShop.IBLLStrategy

同步/异步处理策略接口(实现在bll根据配置反射选择)

13

MessagingFactory

PetShop.MessagingFactory PetShop.MessagingFactory

异时处理消息队列的抽象工厂

14

IMessaging

PetShop.IMessaging PetShop.IMessaging

异时处理消息队列接口定义

15

MSMQMessaging

PetShop.MsmqMessaging PetShop.MsmqMessaging

异时处理消息队列的实现

16

Profile

PetShop.Profile PetShop.Profile

Profile的数据访问层

17

ProfileDALFactory

PetShop.ProfileDALFactory PetShop.ProfileDALFactory

ProfileDAL的工厂类(反射创建ProfileDAL)

18

IProfileDAL

PetShop.IProfileDAL PetShop.IProfileDAL

Profile的数据访问层接口定义

19

OracleProfileDAL

PetShop.OracleProfileDAL PetShop.OracleProfileDAL

OracleProfile Providers

做用户状态管理

20

SQLProfileDAL

PetShop.SQLProfileDAL PetShop.SQLProfileDAL

SQL Server Profile Providers

做用户状态管理

21

Membership

PetShop.Membership PetShop.Membership

Membership认证和授权管理

22

OrderProcessor

PetShop.OrderProcessor PetShop.OrderProcessor

后台处理进程,处理订单队列


拨丝抽茧的来看,先不去管 Profile 和 Membership 和消息队列以及缓存。
3层结构主要的结构如下,最值得注意的地方当然是类工厂的使用了,在我看来,类工厂是最有用的模式之一,因为只有它能让我们摆脱对具体类的依赖而转而依赖抽象,依赖我们只需要的逻辑,而不去管实现的逻辑。

原创粉丝点击