SlideShare ist ein Scribd-Unternehmen logo
1 von 14
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
Client
classes
FACADE

Subsystem
classes
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 façade 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
Facadepattern

Weitere ähnliche Inhalte

Was ist angesagt? (6)

Enterprise Service Bus interview
Enterprise Service Bus interviewEnterprise Service Bus interview
Enterprise Service Bus interview
 
Pattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecturePattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecture
 
Functions creation in sql
Functions creation in sqlFunctions creation in sql
Functions creation in sql
 
Mvc devan
Mvc devanMvc devan
Mvc devan
 
3 tier architecture
3 tier architecture3 tier architecture
3 tier architecture
 
Design pattern
Design patternDesign pattern
Design pattern
 

Andere mochten auch

The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern PresentationJAINIK PATEL
 
Architecture of Mobile Computing
Architecture of Mobile ComputingArchitecture of Mobile Computing
Architecture of Mobile ComputingJAINIK PATEL
 

Andere mochten auch (6)

security issue
security issuesecurity issue
security issue
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern Presentation
 
Facade pattern
Facade patternFacade pattern
Facade pattern
 
Mobile Computing
Mobile ComputingMobile Computing
Mobile Computing
 
SMS
SMSSMS
SMS
 
Architecture of Mobile Computing
Architecture of Mobile ComputingArchitecture of Mobile Computing
Architecture of Mobile Computing
 

Ähnlich wie Facadepattern

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
 
Facade pattern presentation(.pptx)
Facade pattern presentation(.pptx)Facade pattern presentation(.pptx)
Facade pattern presentation(.pptx)VishalChavan83
 
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
 
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
 
P Training Presentation
P Training PresentationP Training Presentation
P Training PresentationGaurav Tyagi
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net coreSam Nasr, MCSA, MVP
 
Design pattern (week 2)
Design pattern (week 2)Design pattern (week 2)
Design pattern (week 2)stanbridge
 

Ähnlich wie Facadepattern (20)

L12-DP(SP-Facade).pptx
L12-DP(SP-Facade).pptxL12-DP(SP-Facade).pptx
L12-DP(SP-Facade).pptx
 
Facade pattern
Facade patternFacade pattern
Facade pattern
 
Facade design pattern
Facade design patternFacade design pattern
Facade design pattern
 
Gof design pattern
Gof design patternGof design pattern
Gof design pattern
 
Facade pattern presentation(.pptx)
Facade pattern presentation(.pptx)Facade pattern presentation(.pptx)
Facade pattern presentation(.pptx)
 
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
 
Facade Pattern
Facade PatternFacade Pattern
Facade Pattern
 
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
 
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
 
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
 
P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
 
Patterns
PatternsPatterns
Patterns
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
 
Design pattern (week 2)
Design pattern (week 2)Design pattern (week 2)
Design pattern (week 2)
 

Kürzlich hochgeladen

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 

Kürzlich hochgeladen (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 

Facadepattern

  • 1. 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 Client classes FACADE Subsystem classes
  • 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 façade 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