📜 ⬆️ ⬇️

Once again about Bridge (in pictures)

Once again, if the community allows, I will turn to the topic of the Bridge pattern, for the last articles, in my opinion, explain it not so simply as needed.

The basic idea: “We use the Bridge where we need to change not only the implementation, but also the abstraction” .

One picture is worth 1000 words ...
')




We separate abstraction (API) and implementation into two different hierarchies and get the opportunity to manage them separately . Now implementation is not bound to the interface, and we can create new abstractions (by extension), based on the methods of basic abstractions .

Everything. What are the posts kilometer dilute - I do not understand ...

PS Explanation and image taken from Head First Design Patterns

Source: https://habr.com/ru/post/138585/


All Articles