Extension Interface
来源:互联网 发布:sqlplus导入sql文件 编辑:程序博客网 时间:2024/05/21 10:29
All contents are extracted from POSA2.
The Extension Interface design pattern allows multiple interfaces to be exported by a component, to prevent bloating of interfaces and breaking of client code when developers extend or modify the functionality of the component.
The structure of the Extension interface pattern includes four participants:
Components: Components aggregate and implement various types of service-specific functionality. This functionality can often be partitioned into several independent roles, each of which defines a set of semantically-related operations.
Extension interfaces: Extension interfaces export selected facets of a component's implementation. There is one extension interface for each role that a component implements. In addition, an extension interface implicitly specifies a contract that describes how clients should use the component's functionality. This contract defines the protocol for invoking the methods of the extension interface, such as the acceptable parameter types and the order in which methods must be called.
Root interface: The root interface is a special extension interface that provides three types of functionality, 1. Core functionality that all extension interfaces must support, for example functionality that allows clients to retrieve the interfaces they request. This functionality defines the basic mechanisms a component must implement to allow clients to retrieve and navigate among its interfaces. 2. Domain-independent functionality, such as methods that manage component lifecycles. 3. Domain-specific functionality that should be provided by all components within a particular domain.
Clients: Clients access the functionality provided by components only via extension interfaces. After a client retrieves a reference to an initial extension interface, it can use this reference to retrieve any other extension interface supported by a component.
- Extension Interface
- c#: 使用extension method 给接口interface添加方法
- note : add COM interface To Shell Extension DLL
- extension
- Extension
- Extension
- Interface
- interface
- interface
- interface
- interface
- interface
- @interface
- Interface
- @interface
- Interface
- interface
- Interface
- Javascript中的checkbox和radio注意事项
- 两种方式实现TinyOS对MSP430F26&54系列的支持
- Top-down and bottom-up parser
- 单循环链表的实现(C语言版)
- 插入排序算法
- Extension Interface
- 关于Android 的两天总结
- intent解析为组件的规则
- 为iOS编译 大的含有很多SWFs的Flash/AIR项目
- 随笔
- 数据集市与数据仓库个人看法
- Sybase数据库备份方案
- Javascript 主要使用方法
- 计算机是很有意思的