Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter Six The Facade Pattern

Similar presentations


Presentation on theme: "Chapter Six The Facade Pattern"— Presentation transcript:

1 Chapter Six The Facade Pattern
Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University

2 The Object-Oriented Paradigm
Outline Overview Introducing the Facade Pattern Learning the Facade Pattern Field Notes: The Facade Pattern Summary Ku-Yaw Chang The Object-Oriented Paradigm

3 The Object-Oriented Paradigm
Overview The Facade Pattern You have probably implemented in the past But may not had a name for In this chapter What the Facade pattern is and where it is used The key features of the pattern Some variations on the Facade pattern Ku-Yaw Chang The Object-Oriented Paradigm

4 The Object-Oriented Paradigm
Outline Overview Introducing the Facade Pattern Learning the Facade Pattern Field Notes: The Facade Pattern Summary Ku-Yaw Chang The Object-Oriented Paradigm

5 Introducing the Facade Pattern
Intent by GoF Provide a unified interface to a set of interfaces in a sub-system. Facade defines a higher-level interface that makes the subsystem easier to use. Ku-Yaw Chang The Object-Oriented Paradigm

6 The Object-Oriented Paradigm
Outline Overview Introducing the Facade Pattern Learning the Facade Pattern Field Notes: The Facade Pattern Summary Ku-Yaw Chang The Object-Oriented Paradigm

7 Learning the Facade Pattern
Learn how to use a complex system 8 feet of manuals Ku-Yaw Chang The Object-Oriented Paradigm

8 Learning the Facade Pattern
4 or 5 people were on a project that needed to use this system Approach one All people have to learn the entire thing Waste everyone’s time Approach two Pick one to write routines that the rest of us would use to interface with the system Create a new class or classes that had interface we required The rest could use this new interface without having to learn the entire complicated system Ku-Yaw Chang The Object-Oriented Paradigm

9 Learning the Facade Pattern
Use a complex system more easily Use a subset of the system Use the system in a particular way Ku-Yaw Chang The Object-Oriented Paradigm

10 Learning the Facade Pattern
Ku-Yaw Chang The Object-Oriented Paradigm

11 Learning the Facade Pattern
Ku-Yaw Chang The Object-Oriented Paradigm

12 The Object-Oriented Paradigm
Outline Overview Introducing the Facade Pattern Learning the Facade Pattern Field Notes: The Facade Pattern Summary Ku-Yaw Chang The Object-Oriented Paradigm

13 The Object-Oriented Paradigm
Variation One Reduce the number of objects that a client object must deal with Ku-Yaw Chang The Object-Oriented Paradigm

14 Variations Two and Three
Supplement existing functions with new routines Expand with new functionality An “encapsulating layer” Hide or encapsulate the system Reasons Track system usage Swap out system Ku-Yaw Chang The Object-Oriented Paradigm

15 The Object-Oriented Paradigm
Outline Overview Introducing the Facade Pattern Learning the Facade Pattern Field Notes: The Facade Pattern Summary Ku-Yaw Chang The Object-Oriented Paradigm

16 The Object-Oriented Paradigm
Summary The Facade pattern Put up a new front in front of the original system Apply when Not use all the functionality of a complex system Encapsulate or hide the original system Add some new functionality as well Cost of writing this new class is less Ku-Yaw Chang The Object-Oriented Paradigm

17 The End


Download ppt "Chapter Six The Facade Pattern"

Similar presentations


Ads by Google