From the course: Python: Advanced Design Patterns
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Facade - Python Tutorial
From the course: Python: Advanced Design Patterns
Facade
- [Instructor] How many of you know all the inner workings of a car when you drive one? Do you start a car by interacting directly and individually with your starter motor, fuel pump, ignition, battery, and finally your engine? As we all know very well, there is no need to do this, and all that's required is a push of a button or turn up your car key. The more you hide the unnecessary details, the better. The same principle applies to the concept of facade. The pattern hides the non-essential details of the individual interfaces of subsystems that comprise a complex system, such as a compiler. Facade is a structural pattern and consists of a facade class and a set of subsystems it represents through its own simple and unified interface. This way, the users of the facade interface don't have to know all the details of the subsystem interfaces to use their functionality. The before and after diagram shown here demonstrates the difference facade makes intuitively. In addition to the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.