The facade allows you to hide the details of the module from clients. It ensures compliance with Law Demeter
. Using the generic interface and various implementations greatly simplifies testing. It blends well with other patterns like Strategy
, Template Method
, or construction patterns, allowing configuration of the object available for the clients. The facade is a good entry point for libraries, giving customers access to high-level functionality and hiding all internal logic and classes.
Facade Pattern in Kotlin
