Currently existing data access object (DAO) patterns have several limitations. First, the interface of the patterns and business objects is tightly-coupled, which affects seriously the dynamic extensibility of softw...Currently existing data access object (DAO) patterns have several limitations. First, the interface of the patterns and business objects is tightly-coupled, which affects seriously the dynamic extensibility of software systems. Second, the patterns have duplicated implementation codes, which add to difficulties of system maintenance. To solve these problems, a new DAO pattern with stronger independency and dynamic extensibility is proposed in this paper. An example is given to illustrate the using process of the new DAO pattern. The greatest advantages of the new DAO pattern are as follows. If any business object is needed to add to the system, we do not have to modify any codes of the class DAO Factory. All we need to do is to modify the mapping file. Furthermore, because we have only one DAO implementation class to accomplish all the data access to business objects, if some SQL statements are needed to be modified, all we need to do is to modify the DAO implementation class but not need to modify any business objects.展开更多
为提高数据访问层的灵活性,避免重量级服务带来的问题,运用工厂模式和单例模式,采用ADO.NET(ADO:ActiveX Data Object)技术,构建.NET平台下的通用数据访问层,并给出核心代码。通过此项技术的研究和实现,可以减少系统服务器的负荷,使数...为提高数据访问层的灵活性,避免重量级服务带来的问题,运用工厂模式和单例模式,采用ADO.NET(ADO:ActiveX Data Object)技术,构建.NET平台下的通用数据访问层,并给出核心代码。通过此项技术的研究和实现,可以减少系统服务器的负荷,使数据访问层的设计更加灵活,从而提高系统的可移植性和可扩展性。在教务管理系统中的实际应用表明,基于设计模式的通用数据访问层有效地提升了系统的稳定性,充分利用了服务器的资源,提高了用户的满意度,为以后的程序开发提供了理论根据。展开更多
文摘Currently existing data access object (DAO) patterns have several limitations. First, the interface of the patterns and business objects is tightly-coupled, which affects seriously the dynamic extensibility of software systems. Second, the patterns have duplicated implementation codes, which add to difficulties of system maintenance. To solve these problems, a new DAO pattern with stronger independency and dynamic extensibility is proposed in this paper. An example is given to illustrate the using process of the new DAO pattern. The greatest advantages of the new DAO pattern are as follows. If any business object is needed to add to the system, we do not have to modify any codes of the class DAO Factory. All we need to do is to modify the mapping file. Furthermore, because we have only one DAO implementation class to accomplish all the data access to business objects, if some SQL statements are needed to be modified, all we need to do is to modify the DAO implementation class but not need to modify any business objects.
文摘为提高数据访问层的灵活性,避免重量级服务带来的问题,运用工厂模式和单例模式,采用ADO.NET(ADO:ActiveX Data Object)技术,构建.NET平台下的通用数据访问层,并给出核心代码。通过此项技术的研究和实现,可以减少系统服务器的负荷,使数据访问层的设计更加灵活,从而提高系统的可移植性和可扩展性。在教务管理系统中的实际应用表明,基于设计模式的通用数据访问层有效地提升了系统的稳定性,充分利用了服务器的资源,提高了用户的满意度,为以后的程序开发提供了理论根据。