The facade design pattern

Whenever we are building libraries or big systems, we quite often depend on other libraries and functionality. Implementing methods sometimes requires the use of multiple classes at the same time. This requires knowledge. Whenever we build a library for someone, we usually try and make it simpler for the users by assuming they do not have (and do not need) as extensive knowledge as we do. Additionally, developers make sure that components are easy to use throughout their application. This is where the facade design pattern can become useful.

Note

Its purpose is to wrap a complex system with a simpler interface in order to hide the usage complexities and ease the client interaction.

We already looked at other design patterns ...

Get Scala Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.