扩展接口设计模式 (extension interface design pattern)

extension interface

The Extension Interface Design Pattern shows a way in which software design and software architecture can be used to structure applications so that they can be modified and extended. For this reason, this development pattern can be assigned to the structural or architectural patterns.

扩展接口

扩展接口设计模式展示了一种可以使用软件设计和软件架构来构建应用程序的方式,以便可以修改和扩展它们。因此,可以将此开发模式分配给结构或架构模式。

Structure of the Extension Interface Pattern 

扩展接口模式的结构

 The structure of the design pattern is as follows.

设计模式的结构如下。

RootInterface

Provides general functionality that each extension interface must provide. The "getExtension" method must be implemented by each component so that each extension interface is able to request another extension interface and thus switch roles.

根接口

提供每个扩展接口必须提供的通用功能。每个组件都必须实现“getExtension”方法,以便每个扩展接口能够请求另一个扩展接口,从而切换角色。

extension interface

The Extension Interface groups the semantic functionality and thus reduces dependencies. It inherits its general functionality from the RootInterface. Its task is to make the role of a context group available to the client. It is important that the services offered are encapsulated from the outside.

扩展接口

扩展接口对语义 功能进行分组,从而减少依赖性。它从 RootInterface 继承其一般功能。它的任务是使客户端可以使用上下文组的角色。提供的服务是从外部封装的,这一点很重要。

Factory

With the "Factory" class, you create the appropriate component for the requested interface . This is done with the "create" method.
 

工厂

使用“Factory”类,您可以为请求的接口创建适当的组件。这是通过“create”方法完成的

clients

This class implements the application functionality; this means that the client uses services that are provided by the extension interfaces. The client always accesses the component service via the appropriate extension interface, never directly to the component itself.
 

客户

此类实现应用程序功能;这意味着客户端使用扩展接口提供的服务。客户端总是通过适当的扩展接口访问组件服务,而不是直接访问组件本身。

component

The class implements the functionality of the associated extension interface or interfaces, since it can implement more than one extension interface. When calling the "getExtension" method, it returns the unique (appropriate) interface reference. It is created by an associated factory.

组件

该类实现相关扩展接口的功能,因为它可以实现多个扩展接口。当调用“getExtension”方法时,它返回唯一的(适当的)接口引用。它由关联的工厂创建。

Literature 

  • K. Eilebrecht, G. Starke: Patterns compact: design patterns for effective software development. 3rd edition, Spektrum Akademischer Verlag, 2010.

文学

  • K. Eilebrecht, G. Starke:紧凑模式:有效软件开发的设计模式。第 3 版,Spektrum Akademischer Verlag,2010 年。

Web Links 

网页链接

  • Kacper Bak:扩展接口设计模式(研讨会论文,计算机科学第 6 学期文凭,FH-Kempten,PDF;548 kB)。
  • Douglas C. Schmidt:扩展接口(PDF;87 kB)。1998


generation pattern

Abstract Factory  | builder  | factory method  | prototype  | singleton  | multitone  | object pool

texture pattern

Adapters  | bridge  | Decorators  | facade  | Flyweight  | compound  noun | deputy

behavior pattern

Observer  | Visitors  | interpreters  | iterators  | command  | memento  | template method  | Strategy  | Intermediary  | state  | chain of responsibility  | Interceptors  | null object  | log stack

Object-relational mapping pattern

data transfer object  | Table Data Gateway  | Row Data Gateway  | Active Record  | Unit of Work  | Identity Map  | Lazy Loading  | Identity Field  | Dependent Mapping  | Embedded value  | Serialized LOB  | Inheritance Mapper  | Metadata Mapping  | QueryObject  | Command-Query-Responsibility Segregation

messaging pattern

message  | command message  | Document message  | Event message  | Request-Reply  | ReturnAddress  | Correlation Identifier  | Message Sequence  | Message expiration  | Format indicator  | Message Channel  | Point to Point Channel  | Publisher Subscriber Channel  | Datatype Channel  | Invalid Message Channel  | Dead Letter Channel  | Guaranteed Delivery  | channel adapters  | messaging bridge | message bus  | Pipes and Filters  | message router  | Content based router  | Message Filters  | dynamic routers  | Recipient list  | splitter  | Aggregator  | Resequencer  | Composed Message Processor  | Scatter Gather  | routing slip  | Process Manager  | Message Brokers  | Message Translator  | envelope wrappers  | Content Enricher  | Content filters  |Claim check  | Normalizers  | Canonical Data Model  | message endpoint  | messaging gateway  | Messaging Mappers  | Transactional Client  | polling consumers  | Event driven consumer  | Competing Consumers  | Message Dispatcher  | Selective consumers  | Durable subscribers  | Idempotent Receivers  | Service Activator  | ControlBus  | Detour  | Wire Tap  | Message History  |Message Store  | Smart Proxy  | test message  | Channel Purger

Other

Application controllers  | Business Delegate  | Data Access Object  | Dependency Injection  | Extension Interface  | Fluent Interface  | Inversion of Control (IoC) | Lock  | Model View Controller (MVC) | Model View Presenter (MVP) | Model View Update (MVU) | Model View ViewModel (MVVM) | Page Controller  | Registry  | Remote Facade  | Repository  | Service Locator  | Session State  |table modules  | Template View  | thread pool  | Transaction Script  | TransformView  | Two Step View  | ValueObject

Category :

摘自:

https://de.wikipedia.org/wiki/Extension_Interface

猜你喜欢

转载自blog.csdn.net/asdcls/article/details/127548008