SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns ppt
Aman Jain
 
Singleton design pattern
Singleton design patternSingleton design pattern
Singleton design pattern
11prasoon
 

Mais procurados (20)

Bridge pattern
Bridge patternBridge pattern
Bridge pattern
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns ppt
 
Design Pattern - Factory Method Pattern
Design Pattern - Factory Method PatternDesign Pattern - Factory Method Pattern
Design Pattern - Factory Method Pattern
 
Factory Method Pattern
Factory Method PatternFactory Method Pattern
Factory Method Pattern
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patterns
 
Singleton design pattern
Singleton design patternSingleton design pattern
Singleton design pattern
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Design Pattern - Singleton Pattern
Design Pattern - Singleton PatternDesign Pattern - Singleton Pattern
Design Pattern - Singleton Pattern
 
Facade design pattern
Facade design patternFacade design pattern
Facade design pattern
 
Design pattern-presentation
Design pattern-presentationDesign pattern-presentation
Design pattern-presentation
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
 
Design Patterns - Abstract Factory Pattern
Design Patterns - Abstract Factory PatternDesign Patterns - Abstract Factory Pattern
Design Patterns - Abstract Factory Pattern
 
What is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | EdurekaWhat is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | Edureka
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software Engineering
 
Decorator Pattern
Decorator PatternDecorator Pattern
Decorator Pattern
 
Design Patterns - 01 Introduction and Decorator Pattern
Design Patterns - 01 Introduction and Decorator PatternDesign Patterns - 01 Introduction and Decorator Pattern
Design Patterns - 01 Introduction and Decorator Pattern
 
PATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design PatternsPATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design Patterns
 

Semelhante a Facade pattern

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 ENTERPRISE
sreeja_rajesh
 
Design pattern (week 2)
Design pattern (week 2)Design pattern (week 2)
Design pattern (week 2)
stanbridge
 

Semelhante a 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
 
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
 
Design pattern (week 2)
Design pattern (week 2)Design pattern (week 2)
Design pattern (week 2)
 

Mais de JAINIK PATEL (6)

The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern Presentation
 
SMS
SMSSMS
SMS
 
Architecture of Mobile Computing
Architecture of Mobile ComputingArchitecture of Mobile Computing
Architecture of Mobile Computing
 
security issue
security issuesecurity issue
security issue
 
Mobile Computing
Mobile ComputingMobile Computing
Mobile Computing
 
112321 112333 wirless application protocol
112321 112333 wirless application protocol112321 112333 wirless application protocol
112321 112333 wirless application protocol
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
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
heathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
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)
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
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
 
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Ữ Â...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
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
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 

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