Facade By Christopher Aska Toda What is Façade Hides complexities of the system and provides a simpler interface for ease of use and easier understanding Defines a higherlevel interface that makes the subsystem easier to use ID: 477544
Download Presentation The PPT/PDF document "Design Pattern:" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Design Pattern:Facade
By Christopher
Aska
TodaSlide2
What is Façade?Hides complexities of the system, and provides a simpler interface for ease of use and easier understandingDefines a higher-level interface that makes the subsystem easier to useWrapper class containing set of required members for complicated subsystem with simpler interface
Decouples code that uses the system, easy modificationSlide3
ProblemOperations made in sequence, where same action is required in multiple places within applicationModification will be a pain by changing code in different places Slide4
SolutionCreate a lead controller that handles all of the repeating codes.Call the lead controller, based on the parameters provided, to perform actionsJust change the lead controller, to make changes of the code in the process Slide5
ExampleSlide6
Example (cont’d)Slide7
Example 2Slide8
Example 2 (cont’d)Slide9
Keypoint(s)Façade: Makes complex interface easier to use, using a Façade class.Complex system: Large number of interacting components, and code that is hard to understand
Interface
: Shared boundary across which two separate components of a computer system exchange information
Decouple
: Relationship in which one module interacts has less interdependency with another module