SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Design Patterns
Facade Pattern
(A Structural Pattern)
Prsented By:
Jainik Patel(112332)
Darshan Darji(112333)
Dhiraj Rajput(112338)
Prashant Goswami(112344)
Facade
A structural design pattern
 Decouples interface from implementation
 Intent
 To provide a unified interface to a set of interfaces in a
subsystem
 To simplify an existing interface
 Defines a higher-level interface that makes the subsystem
easier to use
Facade Problem & Solution
Subsystem
classes
Client
classes
FACADE
Motivation
• Structuring a system into subsystems helps reduce complexity.
• A common design goal is to minimize the communication and
dependencies between subsystems.
• One way to achieve this goal is to introduce a facade object that
provides a single, simplified interface to the more general
facilities of a subsystem.
Applicability
Use the Facade pattern when
Facade to decouple the subsystem for clients and other
subsystems
To layer your subsystem. Use facade to define an entry point to
each subsystem level. If subsystems are dependent, then you
can simplify the dependencies between them by making them
communicate with each other through their facades.
Facade Structure
Participants
Facade
knows which subsystem classes are responsible for a
request.
delegates client requests to appropriate subsystem objects.
subsystem classes
implement subsystem functionality.
handle work assigned by the Facade object.
Collaborations
Clients communicate with the subsystem by sending
requests to Facade, which forwards them to the appropriate
subsystem object(s). Although the subsystem objects
perform the actual work, the facade may have to do work of
its own to translate its interface to subsystem interfaces.
Consequences
The Facade pattern offers the following benefits:
It shields clients from subsystem components, thereby
reducing the number of objects that clients deal with and
making the subsystem easier to use.
It promotes weak coupling between the subsystem and its
clients.
Help in layering the systems helps elements circular
dependency.
Implementation
 Sub System easier to use
 Strongly Coupled.
 We're going to create a MobileShope interface and concrete
classes implementing the MobileShope interface. A facade class
ShopeKeeperFacade is defined as a next step.
 ShopeKeeperFacade class uses the concrete classes to delegates
user calls to these classes FacadeClient, our Client class will use
ShopeKeeperFacade class to show the results.
Example Class Diagram
Example Class Diagram
Facade Pattern
 Related Pattern
 Abstract Factory Pattern
 Common Variations
 Key: Don’t add new behavior, just simplify interface to existing
behavior
 Java API Usage
 java.net.URL
 client can use it without being aware of classes that allow it to
work
 client can use classes like URLConnection directly if they
choose
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt?

Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns pptAman Jain
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design PatternSanae BEKKAR
 
Creational pattern
Creational patternCreational pattern
Creational patternHimanshu
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern PresentationJAINIK PATEL
 
Design pattern (Abstract Factory & Singleton)
Design pattern (Abstract Factory & Singleton)Design pattern (Abstract Factory & Singleton)
Design pattern (Abstract Factory & Singleton)paramisoft
 
Design Pattern - Singleton Pattern
Design Pattern - Singleton PatternDesign Pattern - Singleton Pattern
Design Pattern - Singleton PatternMudasir Qazi
 
Java Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaJava Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaEdureka!
 
Design Pattern - Factory Method Pattern
Design Pattern - Factory Method PatternDesign Pattern - Factory Method Pattern
Design Pattern - Factory Method PatternMudasir Qazi
 

Was ist angesagt? (20)

Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Design pattern
Design patternDesign pattern
Design pattern
 
Builder pattern
Builder patternBuilder pattern
Builder pattern
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns ppt
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Design pattern-presentation
Design pattern-presentationDesign pattern-presentation
Design pattern-presentation
 
Factory Method Pattern
Factory Method PatternFactory Method Pattern
Factory Method Pattern
 
Creational pattern
Creational patternCreational pattern
Creational pattern
 
Adapter pattern
Adapter patternAdapter pattern
Adapter pattern
 
Composite pattern
Composite patternComposite pattern
Composite pattern
 
Composite Design Pattern
Composite Design PatternComposite Design Pattern
Composite Design Pattern
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern Presentation
 
Design pattern (Abstract Factory & Singleton)
Design pattern (Abstract Factory & Singleton)Design pattern (Abstract Factory & Singleton)
Design pattern (Abstract Factory & Singleton)
 
Design Pattern - Singleton Pattern
Design Pattern - Singleton PatternDesign Pattern - Singleton Pattern
Design Pattern - Singleton Pattern
 
Java Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | EdurekaJava Design Patterns Tutorial | Edureka
Java Design Patterns Tutorial | Edureka
 
Design Pattern - Factory Method Pattern
Design Pattern - Factory Method PatternDesign Pattern - Factory Method Pattern
Design Pattern - Factory Method Pattern
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 

Ähnlich wie Facade pattern

L12-DP(SP-Facade).pptx
L12-DP(SP-Facade).pptxL12-DP(SP-Facade).pptx
L12-DP(SP-Facade).pptxasimaBashir3
 
Gof design pattern
Gof design patternGof design pattern
Gof design patternnaveen kumar
 
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design PatternsNina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design Patternsiasaglobal
 
Design Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldDesign Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldSaurabh Moody
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patternssukumarraju6
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)stanbridge
 
Software Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISESoftware Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISEsreeja_rajesh
 
Software Patterns
Software PatternsSoftware Patterns
Software Patternsbonej010
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1Shahzad
 
Design Pattern in Software Engineering
Design Pattern in Software Engineering Design Pattern in Software Engineering
Design Pattern in Software Engineering Bilal Hassan
 

Ähnlich wie Facade pattern (20)

Facadepattern
FacadepatternFacadepattern
Facadepattern
 
L12-DP(SP-Facade).pptx
L12-DP(SP-Facade).pptxL12-DP(SP-Facade).pptx
L12-DP(SP-Facade).pptx
 
Gof design pattern
Gof design patternGof design pattern
Gof design pattern
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Facade Design Pattern
Facade Design PatternFacade Design Pattern
Facade Design Pattern
 
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design PatternsNina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
 
Facade design pattern
Facade design patternFacade design pattern
Facade design pattern
 
Design Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The WorldDesign Patterns For 70% Of Programmers In The World
Design Patterns For 70% Of Programmers In The World
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Sda 9
Sda   9Sda   9
Sda 9
 
Unit i
Unit iUnit i
Unit i
 
Software Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISESoftware Architecture and Project Management module III : PATTERN OF ENTERPRISE
Software Architecture and Project Management module III : PATTERN OF ENTERPRISE
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
 
Systems Archticture
Systems ArchtictureSystems Archticture
Systems Archticture
 
Design Pattern in Software Engineering
Design Pattern in Software Engineering Design Pattern in Software Engineering
Design Pattern in Software Engineering
 

Kürzlich hochgeladen

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 

Kürzlich hochgeladen (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

Facade pattern

  • 1. Design Patterns Facade Pattern (A Structural Pattern) Prsented By: Jainik Patel(112332) Darshan Darji(112333) Dhiraj Rajput(112338) Prashant Goswami(112344)
  • 2. Facade A structural design pattern  Decouples interface from implementation  Intent  To provide a unified interface to a set of interfaces in a subsystem  To simplify an existing interface  Defines a higher-level interface that makes the subsystem easier to use
  • 3. Facade Problem & Solution Subsystem classes Client classes FACADE
  • 4. Motivation • Structuring a system into subsystems helps reduce complexity. • A common design goal is to minimize the communication and dependencies between subsystems. • One way to achieve this goal is to introduce a facade object that provides a single, simplified interface to the more general facilities of a subsystem.
  • 5. Applicability Use the Facade pattern when Facade to decouple the subsystem for clients and other subsystems To layer your subsystem. Use facade to define an entry point to each subsystem level. If subsystems are dependent, then you can simplify the dependencies between them by making them communicate with each other through their facades.
  • 7. Participants Facade knows which subsystem classes are responsible for a request. delegates client requests to appropriate subsystem objects. subsystem classes implement subsystem functionality. handle work assigned by the Facade object.
  • 8. Collaborations Clients communicate with the subsystem by sending requests to Facade, which forwards them to the appropriate subsystem object(s). Although the subsystem objects perform the actual work, the facade may have to do work of its own to translate its interface to subsystem interfaces.
  • 9. Consequences The Facade pattern offers the following benefits: It shields clients from subsystem components, thereby reducing the number of objects that clients deal with and making the subsystem easier to use. It promotes weak coupling between the subsystem and its clients. Help in layering the systems helps elements circular dependency.
  • 10. Implementation  Sub System easier to use  Strongly Coupled.  We're going to create a MobileShope interface and concrete classes implementing the MobileShope interface. A facade class ShopeKeeperFacade is defined as a next step.  ShopeKeeperFacade class uses the concrete classes to delegates user calls to these classes FacadeClient, our Client class will use ShopeKeeperFacade class to show the results.
  • 13. Facade Pattern  Related Pattern  Abstract Factory Pattern  Common Variations  Key: Don’t add new behavior, just simplify interface to existing behavior  Java API Usage  java.net.URL  client can use it without being aware of classes that allow it to work  client can use classes like URLConnection directly if they choose