Multi-Languages Adapter
不是正式的 Pattern Documentation, 只是隨手記記, 這種情況其實還蠻常遇到的. 但需要進一步討論的是, 如果我們說 Programming Languages 的選擇決定通常是在 Design Phase 末期或是 Implementation Phase 初期, 那麼這個情況是否 應該出現 呢 ? 而如果出現了, 是否下面的 能夠使用 呢 ?
Context
Used when components developed in different programming languages, which with low interoperability between each other, have to communicate and collaborate together.
Solution
Use a common infrastructure as a language-independent third party media, and develop a common protocol as communication standard.
The ProtocolAdapter is responsible for maintaining the Protocol, translating language-specific message into message under Protocol, and vice versa.
Example
An example using socket and TCP/IP network is illustrated bellow.
Consequences
- Increase the reuse of components implemented in different programming languages.
- The language-independent third party media usually contributes to constraints on usage of the applied application. Usability may be somewhat sacrificed.
- There will definitely be performance issues.
- Mediator Pattern
- Adapter Pattern
下午5:35
|
標籤:
research,
software design
|
This entry was posted on 下午5:35
and is filed under
research
,
software design
.
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
0 意見:
張貼留言