摘要
构件对象模型(COM)所支持的构件包容和聚合两种复用模式都是基于构件消费者的立场,不利于构件自身的演化和关注点分离。提出了一种新的构件复用方法:为了便于构件自身的演化,派生类直接复用基类中的接口和事件,重载基类虚接口中的方法,在此基础上定义新的接口和事件;将终端用户可见的领域特征分离出来封装为良定义的构件,以便编译或运行时被绑定到其他的构件对象中。给出了在中间件平台上的设计和实现方法。手机软件项目实践表明新方法提高了软件产品质量和开发效率。
Component Object Model (COM) defines two approaches: Containment and aggregation concentrating on the consumer perspectives for component reuse, which is not favorable to the self-evolution of component and separation of concerns. A new method for component reuse was proposed. First, a new component class was derived directly from an old component. The derived class reused base class's interfaces and events, overloaded virtual interface methods, and defined new interfaces and events. Second, identifiable features were as taken the well defined semantic entities, so that they could be bound to other component at compile or run time. The design and implementation methods on middleware platform were presented. The mobile telephone projects experiments show that the new method contributes to improving software development efficiency and increasing the quality of software systems.
出处
《计算机应用》
CSCD
北大核心
2009年第12期3394-3397,共4页
journal of Computer Applications
关键词
构件复用
构件对象模型
构件类继承
特征合成
component reuse
Component Object Model (COM)
component class-level inheritance
feature composition