本文介绍了什么时候使用Bridge Pattern?如何与适配器模式不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

有没有人曾经在现实世界的应用中使用过?如果是这样,你是怎么使用的?是我,还是只是适配器图案,一点点依赖注入投入混合?它真的值得自己的模式吗?

Has anyone ever used the Bridge Pattern in a real world application? If so, how did you use it? Is it me, or is it just the Adaptor Pattern with a little dependancy injection thrown into the mix? Does it really deserve its own pattern?

推荐答案

Bridge模式的一个典型例子用于UI中形状定义环境(参见)。 Bridge模式是的模板和模式。

A classic example of the Bridge pattern is used in the definition of shapes in an UI environment (see the Bridge pattern Wikipedia entry). The Bridge pattern is a composite of the Template and Strategy patterns.

这是Bridge模式中适配器模式的一些常见视图。但是,要引用:

It is a common view some aspects of the Adapter pattern in the Bridge pattern. However, to quote from this article:

这篇关于什么时候使用Bridge Pattern?如何与适配器模式不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 14:54