简单工厂模式在数据访问层中的应用  被引量:13

Application of simple factory pattern in data access layer

在线阅读下载全文

作  者:秦澎涛[1] 王苏文[1] 

机构地区:[1]南昌大学计算中心,江西南昌330031

出  处:《计算机工程与设计》2009年第7期1799-1801,共3页Computer Engineering and Design

基  金:江西省教育厅2005年科技计划基金项目(赣教技字[2005]46号)

摘  要:在构建多层结构的Web应用系统时,建立一个稳定而灵活的数据访问层是系统设计时考虑的一个关键问题。简单工厂模式实际上是经典设计模式中创建型模式的一种。在阐述简单工厂模式、面向对象设计原则的基础上,详细的分析了简单工厂模式在数据访问层中的应用。并且为了构建一个更加高效的数据访问层,利用了.NET中的反射机制,消除了在工厂类中创建对象时所需要的判断逻辑,使得数据访问层的设计更加灵活。When designing a web application based on the multi-tie architecture, the key problem is to construct a data access layer with stabilization and flexibility. The simple factory pattern is one type of the creational patterns among classic design pattern. Based on the simple factory pattern and object-oriented principles, the application of simple factory pattern in data access layer is analyzed in detail. In order to build a more efficient data access layer, the reflection in .NET platform is applied to avoid the judge logic that is created in factory class when building object, which make the design of data access layer more flexible.

关 键 词:设计模式 简单工厂模式 数据访问 反射 开-闭原则 

分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象