摘要
针对传统三层架构系统层与层之间的紧耦合问题,提出一种新的接口设计模式,将数据层对象抽象出接口,逻辑层调用接口方法访问数据层。数据层将数据实体和数据业务对象分离,减弱两者的依赖,并利用.NET的配置文件和反射功能,使工厂类能直接创建数据对象实例,方便逻辑层的访问。这种接口设计模式降低数据层与逻辑层的耦合度,保证了系统的通用性、标准化和数据库的可移植性。
To solve the problem of tight coupling between layers in traditional three layer architecture system, the paper puts forward a new interface design pattern that the data layer object is abstracted from interface and the logic layer transfers its method to access the data layer. The data layer separates data entity from data operation object so that the dependence dies down both. By making use of configuration file and reflection function in . NET, the factory class is able to create the data object instance directly, then the logic layer accesses conveniently. The interface design pattern reduces the degree of coupling between the data layer and the logic layer and ensures the system' s universality and standardization as well as database' s portability.
出处
《计算机应用与软件》
CSCD
2009年第6期133-135,共3页
Computer Applications and Software
关键词
教学平台
.NET
面向接口编程
三层架构
Teaching platform . NET Interface-oriented programming Three layer architecture