软件设计模式研究与应用
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
软件规模和复杂度的不断增加,使得软件开发面临着前所未有的挑战。软件复用被视为解决软件危机,提高软件生产率和质量的有效途径。针对软件复用,我们采用设计模式来记录软件设计知识。比较而言,设计模式比构件技术和框架技术抽象层次更高,复用性和灵活性更强。
     在以Internet/Intranet技术为先导的网络技术的带动下,企业应用软件正朝向分布式、基于N层网络体系结构的客户/服务器模式发展。分布式企业应用软件结构复杂、涉及多种技术,对设计开发人员提出了很高的要求。在此情况下运用设计模式——可复用的设计方案,进行软件设计开发是十分必要的。本文结合目前主流的分层分布式J2EE框架,探讨了GoF模式和J2EE核心模式在开发电信综合业务管理平台中应用的场景和使用后达到的效果。
     本文的研究成果如下:
     1、探讨了设计模式对软件复用强有力的支持。
     2、ISMP管理中心采用MVC模式和分层架构。管理中心分为表现层、业务逻辑层、数据层。对于一个拥有大规模用户的大型系统,这样的分层结构不但更科学更稳定更完善,而且各个层次相对独立,任何一层的改动不会影响其它层。因此增强了管理中心的稳定性、灵活性、可扩展性和可复用性。
     3、研究了在基于J2EE分层分布式架构的ISMP中,设计模式应用的场景和使用后产生的效果。J2EE框架涉及到的企业开发的相关标准、技术太多。要使用J2EE开发本身就是一件不容易的事,仅仅学习技术还不足以设计出良好的应用系统。因此为了使系统封装性、灵活性、可复用性、可扩展性和可维护性得到提高、在开发中引入了设计模式。框架和设计模式互相取长补短,使得ISMP管理中心系统体现了最大程度的复用。
     4、在Web层,探讨了请求处理、访问控制和输入校验的解决方案。以拦截过滤器模式实现了访问页面请求的过滤;运用Servlet前端控制器模式对Web层进行结构设计,使实现更加规范,提高了效率和安全性,有利于重用和维护;讨论了运用视图助手模式实现客户端校验。
     5、在业务层,主要从优化结构和性能的角度,探讨了业务代表模式和服务定位器模式的应用场景和实现。采用业务代表模式降低表示层和业务层之间的藕合,缓冲结果和对远程业务服务进行引用,在一定程度上减少网络流量和代价昂贵的重复通信;运用服务定位器模式实现了向客户端提供统一的服务访问,通过缓冲对环境对象和工厂对象(EJBHome, JMS连接工厂)的引用,减少不必要的JNDI活动,提高客户端应用程序的性能。
Due to the degree in which computer software is constantly increasing, software development is facing an unprecedented challenge. Developing reusable software has been seen as a feasible solution to solving this software crisis, and as a way to improving both productivity and quality of software. We use design patterns to record design knowledge. When comparing the different technologies, design patterns are more abstract, more reusable and more flexible than component technology and framework technology.
     Set in motion by the Internet/Intranet technologies, enterprise applications software are based on the distributed N-tier network architecture of the client/server model. They have become very complex, involving a variety of technologies, and therefore demanding highly-experienced staff. Under these conditions, it is essential to use design patterns in the construction of software. This paper discusses the contexts and consequences of applying patterns in developing ISMP (Integrated Services Management Platform) by J2EE architecture for the telecommunication enterprise.
     This paper researches the following:
     1. Design patterns provide strong support to reusable software.
     2. Architecture for the ISMP (Integrated Service Management Platform) management centre is separate-layered, including: a presentation layer, a business logic layer and a database layer. This kind of architecture is low-maintenance, as changes in one layer don’t influence other layers. This results in the application system being more stable, flexible, extensible and reusable.
     3. The contexts and the consequences of applying design patterns in ISMP. J2EE architecture is very complex because it involves many differing standards and technologies. To develop feasible, reusable and extensible application software, design patterns are involved in the application of J2EE architecture.
     4. In Web Layers, it discusses suggestions for handling requests, controlling access, and verifying input. Firstly handling requests is designed and realized by the Intercepting Filter Pattern. Secondly, controlling access is designed and realized by the Front Controller Pattern. Thirdly, verifying input is realized by the View Helper Pattern.
     5. In business layers, it discusses the contexts of applying the Business View Pattern and the Service Locator Pattern for improving the construction and the performance. It designed by the Business View Pattern to reducing the coupling between the presentation layer and the business layer and to buffer the results. It is designed by the Service Locator Pattern to provide unified access services interface to the client.
引文
[1]. 王千祥,刘畅,赵鲁印,梅宏.《分布对象技术与软件复用》.《计算机科学》1999.
    [2]. 邵维忠,杨芙清.面向对象的系统分析.清华大学出版社,1998:180-180.
    [3]. 杨芙清,梅 宏,李克勤. 软件复用与软件构件技术[J] . 电子学报,1999 (2) :68 - 75.4
    [4]. 徐正权.软件复用方法与技术.华中理工大学出版社.1998.8
    [5]. Haynes, G., Carney, D., Foreman, J., "Component-Based Software Development/COTS Integration", 1997, Available WWW URL:http://wei.sei.cmu.edu/str/descriptions/cbsd.html 。
    [6]. Utrecht. Proceedings of the Software Re-use Workshop. the Netherlands. November, 1989.
    [7]. Sommerville I. 高级软件工程[M] , 第7版. 北京:机械工业出版社. 2004 :440 – 459
    [8]. Brow A W. 大规模基于构件的软件开发[M] . 赵文耘,张 志,等译. 北京:机械工业出版社,2003.
    [9]. 梅 宏,陈 锋,冯耀东,等. ABC:基于体系结构面向构件的软件开发方法[J] . 软件学报,2003 ,14 :721 - 732.
    [10]. Graham I. Requirement Engineering and Rapid Development[M]. Addison Wesley Reading,MA, 1998, 206
    [11]. Klaus Bergner, Andreas Rausch, Marc Sibling, etc. Componentware -Methodology and Process,19'h March 1999
    [12]. Santone, Antonelfa Vaglini, Gigliola. Reusing LOTOS specifications[J]. Microprocessors and Microsystems, Volume:25, Issue:6, September 10, 2001, pp. 309-314
    [13]. Thomas, William M., Delis, Alex, Basili, Victor R. An Analysis of Errors in a Reuse-Oriented Development Environment[J].Journal of Systems and Software, Volume:38, Issue: 3, September,1997, pp.211-224
    [14]. R3'. Sundarraj. An optimization approach to plan for reusable software[J]. European Journal of Operational Research, Volume:142, lssuea,October I, 2002, pp.128-137
    [15]. 刘东生等.可重用构件的合成技术[J].计算机应用研究,1999.7
    [16]. 曾广周,孙红梅.基于软构件的软件开发方法研究[J].计算机研究与发展,1998
    [17]. 刘海清等.基于构件的应用软件系统体系结构开发方法及其应用[J].武汉水利电力大学学报,2000.4
    [18]. 应时等.基于构件库及构件组合的软件重用[J].计算机工1998
    [19]. 赵俊峰.软件构件标准概述[J].信息技术与标准化,2006.6
    [20]. Brown W,Wallnau Kurt C, Engineering of component-bald systems(A).Component-Based Software Engineering: Selected Papers from the Software Engineering Institute(C). Los Alamitos,CA: IEEE Computer, Society Press, 1996: 7-15.
    [21]. Kent Beck, Ward Cunningham. Using Pattern Languages for Object-Oriented Program [J]. The OOPSLA-87 workshop on the Specification and Design for Object-Oriented Programming, Portland: Cunningham & Cunningham, Inc, September 17, 1987, Technical Report No. CR-87-43.
    [22]. Erich Gamma等著,李英军等译.设计模式—可复用面向对象软件的基础.北京:机械工业出版社,2000. 9
    [23]. 周轶刚,康建初.可重用软件模式.计算机工程与应用.2002年第17卷
    [24]. Deepak Alur等, 刘天北等译. J2EE核心模式. 北京:电子工业出版社,2005
    [25]. Many Hall, Larry brown. Servlet与JSP核心编程.清华大学出版社,2004:322-341
    [26]. Bruce Eckel著,侯捷译.Java编程思想.北京:机械工业出版社.2002
    [27]. J2EE v1.4 Specification from http://java.sun.com
    [28]. Christopher Alexander, Sara Ishikawa, Murray Silverstein, MaxJacobson, Ingrid Fiksdahl-King, and Shlomo Angel. A Pattern Language. Oxford University Press, New York, 1977
    [29]. James O.Coplien. 宛延闿 李石乔 苏文. Advanced C++ Programming Styles and Idioms. 北京:中国电力出版社,2005
    [30]. 杨莉萍, 面向对象的方法和设计模式。计算机应用与研究。2006:第23卷第三期36-91
    [31]. Alan Monnox著. 武欣,草怡然等译. J2EE快速开发。北京:机械工业出版社,2006
    [32]. Ricbard Monson-Haefel著。林琪,杨春生译。Enterprise JavaBeans(Fourth Edition)。北京:中国电力出版社,2005
    [33]. LauTerence C.,ChanYumman, Khuwaja Ramzan, LuJianguo. Re-engineering of e-commerce legacy applications for enterprise Java trademark environment. 2002 IEEE International Conference on Software Maintenance, Montreal Canada, 2002. Conference on Software Maintenance 2002. P573
    [34]. Lunney T. F.,McCaughey A. J..Component based distributed systems一CORBA and EJB in context. Computer Physics Communications v 127. 2000. P207-214.
    [35]. 吴轶婷,姚琳.基于MVC模式的WAP开发与设计.计算机应用,2005 25(8): 260-262
    [36]. 郭梅,江红等.Structs在实现MVC架构中的应用.计算机与现代化,2004(1):106一108
    [37]. 陆荣幸、郁洲等,J2EE平台上MVC设计模式的研究与实现、计算机应用研究,2003.
    [38]. 李署光.JSP开发实例完全剖析.中国电力出版社,2006 (3):370-372
    [39]. Subrahmanyam Allamaraju等著。J2EE服务器端高级编程。北京:机械土业出版社,2002: 135-163
    [40]. 许幼鸣,徐锦,赵文耕,钱乐秋(复旦大学计算机系),“基于设计模式的软件重用”计算机工程1999年03期

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700