From the course: Design Patterns in Go for Object Oriented Programming

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Facade pattern

Facade pattern

- [Instructor] Let's talk about the facade pattern. The facade pattern hides the complexities of a complex set of classes. For example, a library or a framework. It does so using one simple class that acts as the interface. This allows for more generic functionality within your system. The facade pattern is useful when you want a limited but straightforward interface to your complex system. So if you want to hide a lot of your business logic or any of the things that are so interdependent behind the scenes you can do so by having this one single interface as the client facing interface to make things simpler. Additionally, the facade pattern is helpful if you want to structure your system into layers. This can prevent any tight coupling that may have existed within different subsystems. Here's how the facade pattern is structured. The facade object provides access to a particular part of the subsystems functionality. It…

Contents