面向构件化软件(演化)技术的研究和应用
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着企业信息化程度的不断提高,对软件的需求也越来越高。主要表现在两个方面:一方面,企业要求提高软件的开发效率,能够将企业已有的各种资源重新利用。软件复用是在软件开发中避免重复劳动的解决方案,通过软件复用,可以提高软件开发的效率和质量。近十几年来,面向对象技术出现并逐步成为主流技术为软件复用提供了基本的技术支持。软件复用研究重新成为热点,被视为解决软件危机,提高软件生产效率和质量的现实可行的途径。同时在分布对象研究领域,软件构件技术也是一个重要的研究内容,当前软件构件技术被视为实现成功复用的关键因素之一。
     软件构件技术是一种利用构件组装应用系统的技术,它完全改变了传统的“从无到有”的软件开发方式,开发过程中所使用的每一个构件之间通过事先确定的接口进行信息交互,整个应用系统通过构件的替换或更新满足不同的需求,通过添加新的构件或进行构件组装以增加新的功能。
     另一方面,软件系统在长期运行过程中经常会遭遇到种种变化的情况,如用户对软件需求发生了改变、功能陈旧不能适应现实的需要、企业业务流程更新对软件能力提出新要求等等。过去,按照传统的方式,大部分软件应用系统处理变化的方式是根据需要,重新开发新的功能模块并将原始的模块进行更新,然后重新编译链接整个系统或更改部分的系统生成新的软件系统,之后部署更新后的软件系统。这就是传统的软件静态演化升级的过程。然而,在某些特殊环境或者说特殊领域内要求系统运行不间断性的环境中,如空中交通管制系统、全球性的金融交易系统、工业控制系统、网络服务系统等,以传统停止整个系统运行来进行软件更新,将会带来巨大的损失,这就要求软件系统在不停止运行的情况下具备实现软件更新的能力,这就是我们通常说的软件动态演化的能力。
     本文在对软件构件技术理论进行深入探讨的基础上,结合PLM系统的开发实践,在项目中实现了构件技术的部分思想,这其中包括,软件复用及面向构件的开发方法、领域构件库的设计与实现、构件组装环境的设计与实现、软件系统的柔性与适应性理论、软件维护及演化方法等。在这些方面所取得的成果有以下几方面:
     (1)应用面向构件的软件开发方法于PLM系统实践中,并总结出从构架设计、构件选择、构件组装、系统维护与演化的一套开发方法。在PLM中架构的设计采用统一建模语言(UML)建模的方式,分析业务基本流程,并初步划分业务功能模块。反复这个过程,将功能模块中的业务进一步细化,就形成了以可复用构件为基础的小功能页面元素;
     (2)设计开发了面向企业的领域构件库,构件形式除了以数据库方式存储代码级构件外,还包含各种文件级构件,提高了复用的范围。对UML语言划分出的可复用构件,首先从已有的企业构件库中检索,构件采用刻面分类的方式提高检索精度。对于构件库中不存在的构件,采用手动开发的方式进行。开发过程采用基于WEB的可视化PLM构件组装环境,无需开发人员再从零开始开发,组装环境提供了大量可复用资源,提高了开发效率。通过代码视图接口,编辑修改以形成代码,完成新构件开发。最后将开发的新构件入库,以供将来复用;
     (3)完成了对页面层构件的开发,实现了PLM构件组装环境,将其分为WEB构件管理、表单建模器、业务组件管理三部分,并应用该环境实现了PLM构件组装过程。WEB构件管理环境管理大量可复用开发资源,避免了大量手工重复劳动。表单建模器是开发WEB页面构件的中心,采用可视化方式,以拖拽的形式,将已有构件元素进行装配合成。对于接口冲突问题,该建模器提供了代码视图模式,可以对组装后代码进行修改。业务组件管理模块管理组装完成的业务构件,存储了代码视图代码与原文件路径信息,可以方便查看与复用,也可以根据需求用建模器重新打开进行页面和功能的修改增删;
     (4)提出MIS适应性与柔性问题。将系统的开发分为一次和二次开发,系统的拓展性、适应性在系统二次开发中体现。系统柔性是要求系统具有应变外界变化的能力。这种变化主要来自三个方面,一是用户需求随时间而不断变化;二是企业业务流程及管理方式的改变;三是计算机技术、网络技术、自动化及管理技术的更新,引起软件开发模式改变;
     (5)研究EJB构件迁移及构件迁移约束问题,并在此基础上研究基于JAVA反射机制的分布式EJB构件演化系统,最后给出应用系统示例过程;EJB构件迁移存在引用迁移、状态迁移、客户请求丢失等问题,因此必须对构件迁移过程进行约束控制。之后分析了JAVA反射机制与JAVA类加载器性质,JAVA反射机制提供了反射API供外部方法来调用,反射实现了通过名称字符串得到所对应对象的能力。JAVA类加载器是JAVA系统核心类,幸运的是,JAVA提供了自定义JAVA类加载器,可以定义网络中任何位置作为类的装载来源。最后,设计了分布式构件演化系统方案,并示例了这种演化的过程,分析了系统存在的不足。
With the constantly improvement of the enterprise information, the demands of software are also more and more high. The main performances are in two aspects: On one hand, the development efficiency of software must be raised and all kinds of enterprise resources must be reused too. Software reuse offers a solution to eliminate repeated work and improve efficiency and quality in the software development .In the recent ten years, object-oriented technology has appeared and become a mainstream technology, thereby providing fundamental technology support for software reuse. Software reuse regains more attention in software engineering research and is considered a practical and feasible approach to solve the software crisis. At the same time, software component technology plays an important role in distributed object research.
     Software component technology is a method, which uses component composition technology to develop application system. It completely changes the traditional "from scratch" software development methods though the pre-established component interface. The whole application system meets different needs by component replacement or upgrade and adds new functions by adding new components or component composition.
     On the other hand, in a long run process, software system will encounter a variety of changes, such as changes in requirements, realization and business processes etc. In the past, most changes are based on the demands. It develops new functional or updates the old function modules, compiles to form a new application system, finally deploy the module into the software system. This is the upgrading process of the static evolution of software. But, for some of the systems which need continuous working such as air traffic control systems, global financial trading systems, industrial control systems, network services and so on, stopping the operation of the entire system software to update will result in unacceptable loss. It requires software system not to stop running to update in those cases. This method is called the dynamic evolution of the software.
     In this paper, on the basis of the software component technology, combining with PLM system development practices, the component technology ideology has been achieved in the project. It includes: the methods of software reuse and component-oriented development, the field component library design and implementation, the component composition environmental design and implementation, the theory of software flexibility and adaptability, the methods of software maintenance and evolution, and so on. In these fields, the results which are obtained are as follows:
     (1) The component-oriented software development methods are used in the practice of PLM system development, and a development method is summarized. It includes architecture design, component selection, component composition and system maintenance and evolution. In PLM, the construction design uses the unification modeling language (UML) to analysis the basic business flow, and it divides service functional module preliminarily. Then, the process is repeated and finally it makes the division more and more refinement. At last, a few of small and reusable components are divided successfully;
     (2) The business-oriented field component library is designed and developed. It not only includes code-level component, but also includes a variety of file-level components to enhance the scope of the reuse. Towards the reusable components which are divided by UML, first of all, it searches the existing enterprise component library, uses facet classification to improve the component searching precision. For the component which does not exist in the component library, it uses the way of manual development, adopts the visual composition environment which is based on the WEB. The developers do not need develop from zero again. The composition environment provides massive reusable resources, which improve the developing efficiency. By the code view interface, the codes can be edited to complete the new component's development. At last, the new component will be loaded into the component library and be prepared to reuse in the future.
     (3) The development of the page-level component is completed. And the PLM component composition environment is implemented. It is divided into WEB component management, form modeling tools, business component management, and realized the process of composition. WEB component management environment manages massive reusable developing resources. So, many hard works which did repeatedly can be avoided. Form modeling tool is the center of the development of WEB pages component which adopts visual development way to complete the composition. Regarding the problem of conflicted interface, this modeling tool provides the code view pattern, which can revise the completed component code. Business component management manages the completed business component. It saves the paths information of the original documents and the code which has produced by code view. Thus, it will be found and reused conveniently. The document also can be opened by form modeling tool to add, delete or revise the code and function.
     (4) The MIS issue of adaptability and flexibility are proposed. The system development is divided into first and second processes. The expansion and adaptability in the system are embodied in the second development. The system flexibility requests the system has the outside change ability. This change comes from three aspects: firstly, the user's needs changes continuously with time. Secondly, the enterprise business workflow and the method of management change. The third reason refers to the update of computer technology, network technology, automatic and management technology, which change the software development pattern.
     (5) This paper studies the problem of EJB component migration and component migration restraint. Then on the basis of it, a distributed EJB component evolution system based on JAVA reflective mechanism is discussed. Finally, the application system's demonstrated process is given. EJB component migration includes the question of the reference migration, the state migration and the lost of client's request etc. So, it has to restrain the process of component migration. Then, the feature of JAVA reflective mechanism and the JAVA class-loader are analyzed. The JAVA reflective mechanism provides reflective API to call for the outside methods. Moreover, it realizes the ability of gaining the object by its name string. The JAVA class loader is the core class of JAVA language. Fortunately, JAVA provides self-definition class-loader and it can define any position in the network as the source of loaded class. At last, the approach of distributed evolution system is designed. In addition, the process of evolution is demonstrated and the system's defects are proposed.
引文
[1]余萍,马晓星,吕建,陶先平.一种面向动态软件体系结构的在线演化方法[J].软件学报,2006,17(6):1360-1371.
    [2]赵娜.软件演化过程构件库研究[D].云南:云南大学,2006.
    [3]曹宝香,夏小娜.基于工作流技术柔性PLM系统的设计与实现[J].计算机工程2007.4.
    [4]Cay S.Horstmann,GaryCOrlle.Core JAVA2,VOlume2[M].Seventh Edition.机械工业出版社,2006,87-201.
    [5]马晓星,余萍,陶先平,吕建.一种面向服务的动态协同架构及其支撑平台[J].计算机学报,2005,4(28):467-477.
    [6]耿翠霞,傅铅生,姚雄.产品生命周期管理PLM技术研究[J].机械制造与自动化,2004.5:86-88.
    [7]黄罡,梅宏,杨芙清.基于反射式软件中间件的运行时软件系统构件[J].中国科学(E 辑),2004,34(2):121-138.
    [8]汪洋.基于软件构架和构件的软件演化研究[D].上海:复旦大学,2000.
    [9]Fischer B.Specification-based browsing of software component libraries [J].Automated Software Engineering,2000-07(2):179-200.
    [10]Wang Bin Research on Distributed Component Library Organization &Coordina tion for Program Mining[D].Central South Oniversity,2003-09.
    [11]Reuse Library Interoperability Group.RIG Uniform Data Model for Reuse Li braries(UDM):[RPS-0002],1994-01
    [12]潘颖,赵俊峰,谢冰.构件技术的研究与发展.计算机科学,2003.90-93
    [13]杨芙清,邵维忠,梅宏.面向对象CASE环境JBⅡ型系统的设计和实现[J].中国科学,1995(5)
    [14]杨芙清.软件复用及相关技术[J].计算机科学,1999(5)
    [15]杨芙清,梅宏,李克勤等.支持构件复用的青鸟Ⅲ型系统概述[J].计算机科学,1999;26(5)
    [16]张友生,等.软件体系结构[M].北京:清华大学出版社,2006.
    [17]张红梅.构件库与构件可视化组装环境的设计与实现[D].西安:西北大学计算机科学院,2003.
    [18]徐泽丰.一种构件组装工具研究与实现[D].南京:河海大学计算机与信息工程学院,2004
    [19]孔冰,软构件技术在PLM系统中的应用研究[D].曲阜:曲阜师范大学计算机科学学院,2007.
    [20]杨成伟,曹宝香,王秀娟.基于PLM的可视化构件组装环境的设计与实现,信息技术与信息化,2007.6.
    [21]杨成伟,李长英,曹宝香,基于MSC的构件组装描述研究,计算机与现代化,2006.11.
    [22]杨成伟,曹宝香,郑永猛,李长英,在J2EE平台下实现word报表的自动生成,计算机技术与发展,2007.3.
    [23]ITU-TS.Recommendation Z.120:Message Sequence Chart(NSC)ITU-TS,April 2004.
    [24]Reussner R.Dynamic types for software components.In ACM Conf.OOPSLA,1999.
    [25]Yellin,D.& Strom,R.Protocol specifications and component adaptors.AC M Transactions on Programming Languages and Systems,19(2):292-333,2006.
    [26]Burrows C,George GW,Dart S.Ovum evaluates:Configuration management[M].L ondon:Ovum Ltd,2005.
    [27]林正奎,杨德礼.软件构件复用技术综述[J].计算机工程与设计,2005,25(6):877-880.
    [28]WHITEHEADK.Component2basedDevelopment[M].London:AddisonWesle,2003.17-113.
    [29]郭钢,余成龙,刘飞.产品生命周期管理的内涵和技术架构[J].中国机械工程,2004,3(15):512-515.
    [30]张和明,熊光楞.制造企业的产品生命周期管理[M].清华大学出版社.2006,5:25-43.
    [31]王晓鹏,王千祥,梅宏.一种面向构件化软件的在线演化方法[J].计算机报,2005,28(11):1890-1897.
    [32]刘大听,王率,冯小宁.支持集成的软构件库设计与实现[J].计算机工程,2005,11:225-227.
    [33]和力,鱼滨,和燕,吴丽贤一种用UML开发组件式WEB应用系统的过程[J].计算机工程,2005,01:95-99.
    [34]Microsoft Crop,http://www,microsoft.com/com.Dcom Technical overview.
    [35]OMG,The Common Object Request Broker Architecture and Specification,htt p://www.omg.com,2001.
    [36]RahimAdatia,FaizArni等,EJB编程指南[M]。喻文山邱仲潘译,电子工业出版社,2002,132-133.

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

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

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