Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wrapper Facade Pattern

I'm working on an issue of design patterns - I have used facade and adapter pattern in some systems in the past.

Now I've found the wrapper facade pattern. If I understand it correct (I only have a vague idea) the wrapper facade is a combination of facade and adapter pattern.

Now I have some questions:

  • When do I typically use the wrapper facade pattern?
  • Does anyone know a book which discribes the wrapper facade pattern (ideally with an example in java)?
  • Can anyone give me an example?
like image 564
moony Avatar asked Feb 21 '13 10:02

moony


1 Answers

The key summarizing sentence in that paper is this:

Facades hide complex class relationships behind a simpler API, whereas Wrapper Facades hide complex function and data structure relationships behind a richer class API.

Interpretation: Wrapper Facade pertains to an OOP layer above native, non-OOP API and code. This pattern is not very relevant to general Java development; examples of it are classes with a lot of native methods, like java.io stream implementations or the Abstract Windowing Toolkit (AWT).

like image 63
Marko Topolnik Avatar answered Oct 23 '22 17:10

Marko Topolnik