SlideShare a Scribd company logo
04 Adapter and Façade PatternDesign Patterns© Prafulla Paraskar 2010
AdapterStructural Design Pattern© Prafulla Paraskar 2010
DefinitionThe adapter pattern (often referred to as the wrapper pattern or simply a wrapper) is a design pattern that translates one interface for a class into a compatible interface. (wikipedia)© Prafulla Paraskar 2010
Adapter Pattern – Explained (1/2)© Prafulla Paraskar 2010
Adapter Pattern – Explained (2/2) An adapter allows classes to work together that normally could not because of incompatible interfaces, by providing its interface to clients while using the original interface.The adapter translates calls to its interface into calls to the original interface, and the amount of code necessary to do this is typically small.The adapter is also responsible for transforming data into appropriate forms.© Prafulla Paraskar 2010
Adapter Pattern – Types of AdaptersClass adapterSimple and versatile, invisible to the client.Object adapterExtensible to subclasses of the adapter.Two-way adapterEnables different clients to view an object differently.Pluggable adapterPresence of adapter is transparent; it can be put in and taken out. Several adapter can be active.© Prafulla Paraskar 2010
Adapter Pattern – UML Diagram© Prafulla Paraskar 2010
Adapter Pattern – Real World SamplesAC adaptorsCar charger for mobile phonesCOM InterOp in .NETSQLAdapter in .NET© Prafulla Paraskar 2010
Adapter Pattern – GuidelinesYou have :A domain specific interface.A Class to connect to with a mismatching interface.You Want :Create a reusable class to cooperate with yet-to-be-built classes.Change the names of methods as called and as implemented.Support different sets of methods for different purposes.© Prafulla Paraskar 2010
FacadeStructural Design Pattern© Prafulla Paraskar 2010
DefinitionA facade is an object that provides a simplified interface to a larger body of code, such as a class library (wikipedia).© Prafulla Paraskar 2010
Façade Pattern – Explained (1/2)© Prafulla Paraskar 2010
Façade Pattern – Explained (2/2)The name is by analogy to an architectural facade.A facade can:make a software library easier to use and understand and test, since the facade has convenient methods for common tasks.make code that uses the library more readable, for the same reason.reduce dependencies of outside code on the inner workings of a library, since most code uses the facade, thus allowing more flexibility in developing the system.wrap a poorly-designed collection of APIs with a single well-designed API (as per task needs).© Prafulla Paraskar 2010
Façade Pattern – Types of AdaptersOpaqueSubsystem operations can only be called through the Façade.TransparentSubsystem operations can be called directly as well as through the Façade.SingletonOnly one instance of the Façade is meaningful.© Prafulla Paraskar 2010
Façade Pattern – UML Diagram© Prafulla Paraskar 2010
Façade Pattern – Real World SamplesWedding planners / Event management.DirectX / OpenGLOnline bill paymentMacros in MS Office© Prafulla Paraskar 2010
Façade Pattern – GuidelinesWhen:A system has several identifiable subsystems and:The abstractions and implementations of a subsystem are tightly coupled.The system evolves and gets more complex, but early adapters might want to retain their simple views.You want to provide alternative novice, intermediate and power user interfaces.There is a need for an entry point to each level of layered software. © Prafulla Paraskar 2010
Thank you!http://geekswithblogs.net/technomadPresentation by Prafulla Paraskar  prafulla.paraskar@s1.com© 2010 S1 India Pvt. Ltd.Presentation by Prafulla Paraskar  eprafulla@gmail.com© 2010  Prafulla Paraskar
Ad

More Related Content

What's hot (20)

Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
melbournepatterns
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design Pattern
ProdigyView
 
Bridge Design Pattern
Bridge Design PatternBridge Design Pattern
Bridge Design Pattern
sahilrk911
 
Structural Design pattern - Adapter
Structural Design pattern - AdapterStructural Design pattern - Adapter
Structural Design pattern - Adapter
Manoj Kumar
 
Facade Design Pattern
Facade Design PatternFacade Design Pattern
Facade Design Pattern
Livares Technologies Pvt Ltd
 
Adapter Pattern Abhijit Hiremagalur 200603
Adapter Pattern Abhijit Hiremagalur 200603Adapter Pattern Abhijit Hiremagalur 200603
Adapter Pattern Abhijit Hiremagalur 200603
melbournepatterns
 
Adapter design-pattern2015
Adapter design-pattern2015Adapter design-pattern2015
Adapter design-pattern2015
Vic Tarchenko
 
Bridge
BridgeBridge
Bridge
Iryney Baran
 
Builder pattern
Builder patternBuilder pattern
Builder pattern
Shakil Ahmed
 
Design pattern - Facade Pattern
Design pattern - Facade PatternDesign pattern - Facade Pattern
Design pattern - Facade Pattern
Mudasir Qazi
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
Irwansyah Irwansyah
 
Facade design pattern
Facade design patternFacade design pattern
Facade design pattern
Neelima Sanagavarapu
 
Creational pattern
Creational patternCreational pattern
Creational pattern
Himanshu
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
Jitendra Kumar
 
Design patterns
Design patternsDesign patterns
Design patterns
Selin Gungor
 
Knockout.js components&routing
Knockout.js components&routingKnockout.js components&routing
Knockout.js components&routing
Carlo Bernaschina
 
Composite design pattern
Composite design patternComposite design pattern
Composite design pattern
MUHAMMAD FARHAN ASLAM
 
Design Pattern - Introduction
Design Pattern - IntroductionDesign Pattern - Introduction
Design Pattern - Introduction
Mudasir Qazi
 
Modern Software Architectures: Building Solutions for Web, Cloud, and Mobile
Modern Software Architectures: Building Solutions for Web, Cloud, and MobileModern Software Architectures: Building Solutions for Web, Cloud, and Mobile
Modern Software Architectures: Building Solutions for Web, Cloud, and Mobile
Dan Mohl
 
Mule edifact module
Mule edifact moduleMule edifact module
Mule edifact module
Son Nguyen
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design Pattern
ProdigyView
 
Bridge Design Pattern
Bridge Design PatternBridge Design Pattern
Bridge Design Pattern
sahilrk911
 
Structural Design pattern - Adapter
Structural Design pattern - AdapterStructural Design pattern - Adapter
Structural Design pattern - Adapter
Manoj Kumar
 
Adapter Pattern Abhijit Hiremagalur 200603
Adapter Pattern Abhijit Hiremagalur 200603Adapter Pattern Abhijit Hiremagalur 200603
Adapter Pattern Abhijit Hiremagalur 200603
melbournepatterns
 
Adapter design-pattern2015
Adapter design-pattern2015Adapter design-pattern2015
Adapter design-pattern2015
Vic Tarchenko
 
Design pattern - Facade Pattern
Design pattern - Facade PatternDesign pattern - Facade Pattern
Design pattern - Facade Pattern
Mudasir Qazi
 
Solid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven DesignSolid principles, Design Patterns, and Domain Driven Design
Solid principles, Design Patterns, and Domain Driven Design
Irwansyah Irwansyah
 
Creational pattern
Creational patternCreational pattern
Creational pattern
Himanshu
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
Jitendra Kumar
 
Knockout.js components&routing
Knockout.js components&routingKnockout.js components&routing
Knockout.js components&routing
Carlo Bernaschina
 
Design Pattern - Introduction
Design Pattern - IntroductionDesign Pattern - Introduction
Design Pattern - Introduction
Mudasir Qazi
 
Modern Software Architectures: Building Solutions for Web, Cloud, and Mobile
Modern Software Architectures: Building Solutions for Web, Cloud, and MobileModern Software Architectures: Building Solutions for Web, Cloud, and Mobile
Modern Software Architectures: Building Solutions for Web, Cloud, and Mobile
Dan Mohl
 
Mule edifact module
Mule edifact moduleMule edifact module
Mule edifact module
Son Nguyen
 

Viewers also liked (20)

Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
guy_davis
 
Design pattern
Design patternDesign pattern
Design pattern
Jasdhir Singh
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
soms_1
 
Code Like a Ninja Session 8 - Structural Design Patterns
Code Like a Ninja Session 8 - Structural Design PatternsCode Like a Ninja Session 8 - Structural Design Patterns
Code Like a Ninja Session 8 - Structural Design Patterns
Deon Meyer
 
Android ui adapter
Android ui adapterAndroid ui adapter
Android ui adapter
Krazy Koder
 
Android sync adapter
Android sync adapterAndroid sync adapter
Android sync adapter
Alex Tumanoff
 
Design Patterns - 03 Composite and Flyweight Pattern
Design Patterns - 03 Composite and Flyweight PatternDesign Patterns - 03 Composite and Flyweight Pattern
Design Patterns - 03 Composite and Flyweight Pattern
eprafulla
 
Presentation on townplanning of irfhaa fathe (1)
Presentation on townplanning of irfhaa fathe (1)Presentation on townplanning of irfhaa fathe (1)
Presentation on townplanning of irfhaa fathe (1)
Shiek Fathe
 
Leads facade- Design Develope Deliver
Leads facade- Design Develope DeliverLeads facade- Design Develope Deliver
Leads facade- Design Develope Deliver
Leads Facade
 
Design pattern part 1
Design pattern   part 1Design pattern   part 1
Design pattern part 1
Suresh Kumar Rajendran
 
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
eprafulla
 
Proxy & adapter pattern
Proxy & adapter patternProxy & adapter pattern
Proxy & adapter pattern
babak danyal
 
Design Patterns Part1
Design Patterns  Part1Design Patterns  Part1
Design Patterns Part1
Tom Chen
 
Design patterns structuralpatterns(theadapterpattern)
Design patterns structuralpatterns(theadapterpattern)Design patterns structuralpatterns(theadapterpattern)
Design patterns structuralpatterns(theadapterpattern)
APU
 
Command and Adapter Pattern
Command and Adapter PatternCommand and Adapter Pattern
Command and Adapter Pattern
Jonathan Simon
 
Adapter & ListView & ExpandalbeListView
Adapter & ListView & ExpandalbeListViewAdapter & ListView & ExpandalbeListView
Adapter & ListView & ExpandalbeListView
Yuki Anzai
 
Chandigarh town planning final 24.12.16
Chandigarh town planning final 24.12.16Chandigarh town planning final 24.12.16
Chandigarh town planning final 24.12.16
parshwa shah
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summary
achraf_ing
 
Decorator Pattern
Decorator PatternDecorator Pattern
Decorator Pattern
Dimuthu Anuraj
 
Android adapters
Android adaptersAndroid adapters
Android adapters
baabtra.com - No. 1 supplier of quality freshers
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
guy_davis
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
soms_1
 
Code Like a Ninja Session 8 - Structural Design Patterns
Code Like a Ninja Session 8 - Structural Design PatternsCode Like a Ninja Session 8 - Structural Design Patterns
Code Like a Ninja Session 8 - Structural Design Patterns
Deon Meyer
 
Android ui adapter
Android ui adapterAndroid ui adapter
Android ui adapter
Krazy Koder
 
Android sync adapter
Android sync adapterAndroid sync adapter
Android sync adapter
Alex Tumanoff
 
Design Patterns - 03 Composite and Flyweight Pattern
Design Patterns - 03 Composite and Flyweight PatternDesign Patterns - 03 Composite and Flyweight Pattern
Design Patterns - 03 Composite and Flyweight Pattern
eprafulla
 
Presentation on townplanning of irfhaa fathe (1)
Presentation on townplanning of irfhaa fathe (1)Presentation on townplanning of irfhaa fathe (1)
Presentation on townplanning of irfhaa fathe (1)
Shiek Fathe
 
Leads facade- Design Develope Deliver
Leads facade- Design Develope DeliverLeads facade- Design Develope Deliver
Leads facade- Design Develope Deliver
Leads Facade
 
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
eprafulla
 
Proxy & adapter pattern
Proxy & adapter patternProxy & adapter pattern
Proxy & adapter pattern
babak danyal
 
Design Patterns Part1
Design Patterns  Part1Design Patterns  Part1
Design Patterns Part1
Tom Chen
 
Design patterns structuralpatterns(theadapterpattern)
Design patterns structuralpatterns(theadapterpattern)Design patterns structuralpatterns(theadapterpattern)
Design patterns structuralpatterns(theadapterpattern)
APU
 
Command and Adapter Pattern
Command and Adapter PatternCommand and Adapter Pattern
Command and Adapter Pattern
Jonathan Simon
 
Adapter & ListView & ExpandalbeListView
Adapter & ListView & ExpandalbeListViewAdapter & ListView & ExpandalbeListView
Adapter & ListView & ExpandalbeListView
Yuki Anzai
 
Chandigarh town planning final 24.12.16
Chandigarh town planning final 24.12.16Chandigarh town planning final 24.12.16
Chandigarh town planning final 24.12.16
parshwa shah
 
The 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summaryThe 23 gof design patterns in java ,the summary
The 23 gof design patterns in java ,the summary
achraf_ing
 
Ad

Similar to Design Patterns - 04 Adapter and Facade Pattern (20)

As 400
As 400As 400
As 400
EMSNEWS
 
Software and architecture design pattern
Software and architecture design patternSoftware and architecture design pattern
Software and architecture design pattern
sanjanakorawar
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
Srikanth R Vaka
 
Adapter Pattern
Adapter PatternAdapter Pattern
Adapter Pattern
Monjurul Habib
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesOracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best Practices
Chris Muir
 
Oracle ADF Overview for Beginners
Oracle ADF Overview for BeginnersOracle ADF Overview for Beginners
Oracle ADF Overview for Beginners
Jithin Kuriakose
 
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable ArtifactsOracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
Chris Muir
 
Systems Archticture
Systems ArchtictureSystems Archticture
Systems Archticture
Samer Abdalla
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
Naga Muruga
 
ContainerDayVietnam2016: Become a Cloud-native Developer
ContainerDayVietnam2016: Become a Cloud-native DeveloperContainerDayVietnam2016: Become a Cloud-native Developer
ContainerDayVietnam2016: Become a Cloud-native Developer
Docker-Hanoi
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
Gary Pedretti
 
6. The grid-COMPUTING OGSA and WSRF
6. The grid-COMPUTING OGSA and WSRF6. The grid-COMPUTING OGSA and WSRF
6. The grid-COMPUTING OGSA and WSRF
Dr Sandeep Kumar Poonia
 
ModelTalk - When Everything is a Domain Specific Language
ModelTalk - When Everything is a Domain Specific LanguageModelTalk - When Everything is a Domain Specific Language
ModelTalk - When Everything is a Domain Specific Language
Atzmon Hen-Tov
 
Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.
suranisaunak
 
Asp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech SoftwareAsp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech Software
Ritwik Das
 
Distributed system architecture
Distributed system architectureDistributed system architecture
Distributed system architecture
Yisal Khan
 
DDD
DDDDDD
DDD
Antonio Radesca
 
OpenFlow/SDN activities of NTT Communications
OpenFlow/SDN activities of NTT CommunicationsOpenFlow/SDN activities of NTT Communications
OpenFlow/SDN activities of NTT Communications
Open Networking Summits
 
Reducing External Risk
Reducing External RiskReducing External Risk
Reducing External Risk
Donald Belcham
 
C++ N Pv2
C++ N Pv2C++ N Pv2
C++ N Pv2
Denis Mishin
 
Software and architecture design pattern
Software and architecture design patternSoftware and architecture design pattern
Software and architecture design pattern
sanjanakorawar
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesOracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best Practices
Chris Muir
 
Oracle ADF Overview for Beginners
Oracle ADF Overview for BeginnersOracle ADF Overview for Beginners
Oracle ADF Overview for Beginners
Jithin Kuriakose
 
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable ArtifactsOracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
Chris Muir
 
ContainerDayVietnam2016: Become a Cloud-native Developer
ContainerDayVietnam2016: Become a Cloud-native DeveloperContainerDayVietnam2016: Become a Cloud-native Developer
ContainerDayVietnam2016: Become a Cloud-native Developer
Docker-Hanoi
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
Gary Pedretti
 
ModelTalk - When Everything is a Domain Specific Language
ModelTalk - When Everything is a Domain Specific LanguageModelTalk - When Everything is a Domain Specific Language
ModelTalk - When Everything is a Domain Specific Language
Atzmon Hen-Tov
 
Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.
suranisaunak
 
Asp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech SoftwareAsp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech Software
Ritwik Das
 
Distributed system architecture
Distributed system architectureDistributed system architecture
Distributed system architecture
Yisal Khan
 
OpenFlow/SDN activities of NTT Communications
OpenFlow/SDN activities of NTT CommunicationsOpenFlow/SDN activities of NTT Communications
OpenFlow/SDN activities of NTT Communications
Open Networking Summits
 
Reducing External Risk
Reducing External RiskReducing External Risk
Reducing External Risk
Donald Belcham
 
Ad

Recently uploaded (20)

Wondershare Filmora Crack Free Download 2025
Wondershare Filmora Crack Free Download 2025Wondershare Filmora Crack Free Download 2025
Wondershare Filmora Crack Free Download 2025
Designer
 
EEE178-PPT-Theme iasodhajsdkjashdlaskdjbaksdkashdlkasdlkja;dj;kdada.pptx.pdf
EEE178-PPT-Theme iasodhajsdkjashdlaskdjbaksdkashdlkasdlkja;dj;kdada.pptx.pdfEEE178-PPT-Theme iasodhajsdkjashdlaskdjbaksdkashdlkasdlkja;dj;kdada.pptx.pdf
EEE178-PPT-Theme iasodhajsdkjashdlaskdjbaksdkashdlkasdlkja;dj;kdada.pptx.pdf
CastroAngeloReoD
 
Lori Vanzant Portfolio. Please take a look !
Lori Vanzant  Portfolio. Please take a look !Lori Vanzant  Portfolio. Please take a look !
Lori Vanzant Portfolio. Please take a look !
vanzan01
 
Hi! I'm Lori Vanzant. Please take a look
Hi! I'm Lori Vanzant. Please take a lookHi! I'm Lori Vanzant. Please take a look
Hi! I'm Lori Vanzant. Please take a look
vanzan01
 
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdfOLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
DimejiFakorede
 
Presentation mockup using lots of animals
Presentation mockup using lots of animalsPresentation mockup using lots of animals
Presentation mockup using lots of animals
ChunChihChenPhD
 
Emirates Agriculture Prensentation Badges GOLD.pdf
Emirates Agriculture Prensentation Badges GOLD.pdfEmirates Agriculture Prensentation Badges GOLD.pdf
Emirates Agriculture Prensentation Badges GOLD.pdf
asfianoor1
 
Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?
Gregory Vigneaux
 
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptxPayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
rayyansiddiqui034
 
Lori Vanzant Online Presence. Take a look!
Lori Vanzant Online Presence. Take a look!Lori Vanzant Online Presence. Take a look!
Lori Vanzant Online Presence. Take a look!
vanzan01
 
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdfMOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
asfianoor1
 
mid-term all revisions g11 s1.pmdzs,zxptx
mid-term all revisions g11 s1.pmdzs,zxptxmid-term all revisions g11 s1.pmdzs,zxptx
mid-term all revisions g11 s1.pmdzs,zxptx
omar164646
 
Minimalist Business Slides XL by Slidesgo.pptx
Minimalist Business Slides XL by Slidesgo.pptxMinimalist Business Slides XL by Slidesgo.pptx
Minimalist Business Slides XL by Slidesgo.pptx
karenalavamoran
 
presentation on healing architecture .pptx
presentation on healing architecture .pptxpresentation on healing architecture .pptx
presentation on healing architecture .pptx
buildnpl
 
STOCK ANALYSYS.pptx manajemen keuangan s
STOCK ANALYSYS.pptx manajemen keuangan sSTOCK ANALYSYS.pptx manajemen keuangan s
STOCK ANALYSYS.pptx manajemen keuangan s
kfdpontianak2012
 
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngnReport Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
yousafmuzammil19
 
DOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptxDOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptx
laugolac31
 
Naan mudalvan assignment for students_064143.pptx
Naan mudalvan assignment for  students_064143.pptxNaan mudalvan assignment for  students_064143.pptx
Naan mudalvan assignment for students_064143.pptx
NaziaFarheen13
 
Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.
vanzan01
 
behiriskfactorsxyzkskeb210217133906 (1).pdf
behiriskfactorsxyzkskeb210217133906 (1).pdfbehiriskfactorsxyzkskeb210217133906 (1).pdf
behiriskfactorsxyzkskeb210217133906 (1).pdf
ShakibulHasan14
 
Wondershare Filmora Crack Free Download 2025
Wondershare Filmora Crack Free Download 2025Wondershare Filmora Crack Free Download 2025
Wondershare Filmora Crack Free Download 2025
Designer
 
EEE178-PPT-Theme iasodhajsdkjashdlaskdjbaksdkashdlkasdlkja;dj;kdada.pptx.pdf
EEE178-PPT-Theme iasodhajsdkjashdlaskdjbaksdkashdlkasdlkja;dj;kdada.pptx.pdfEEE178-PPT-Theme iasodhajsdkjashdlaskdjbaksdkashdlkasdlkja;dj;kdada.pptx.pdf
EEE178-PPT-Theme iasodhajsdkjashdlaskdjbaksdkashdlkasdlkja;dj;kdada.pptx.pdf
CastroAngeloReoD
 
Lori Vanzant Portfolio. Please take a look !
Lori Vanzant  Portfolio. Please take a look !Lori Vanzant  Portfolio. Please take a look !
Lori Vanzant Portfolio. Please take a look !
vanzan01
 
Hi! I'm Lori Vanzant. Please take a look
Hi! I'm Lori Vanzant. Please take a lookHi! I'm Lori Vanzant. Please take a look
Hi! I'm Lori Vanzant. Please take a look
vanzan01
 
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdfOLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
OLADIMEJI FAKOREDE ARCT 1073 BUILDING DESIGN PORTFOLIO_compressed.pdf
DimejiFakorede
 
Presentation mockup using lots of animals
Presentation mockup using lots of animalsPresentation mockup using lots of animals
Presentation mockup using lots of animals
ChunChihChenPhD
 
Emirates Agriculture Prensentation Badges GOLD.pdf
Emirates Agriculture Prensentation Badges GOLD.pdfEmirates Agriculture Prensentation Badges GOLD.pdf
Emirates Agriculture Prensentation Badges GOLD.pdf
asfianoor1
 
Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?Are you Transitioning or Refining Now..?
Are you Transitioning or Refining Now..?
Gregory Vigneaux
 
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptxPayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
PayPros-Journey-Overcoming-Challenges-Through-Governance.pptx
rayyansiddiqui034
 
Lori Vanzant Online Presence. Take a look!
Lori Vanzant Online Presence. Take a look!Lori Vanzant Online Presence. Take a look!
Lori Vanzant Online Presence. Take a look!
vanzan01
 
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdfMOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
MOCCAE SUSTAINABLE TROPHY 2025 Presentation.pdf
asfianoor1
 
mid-term all revisions g11 s1.pmdzs,zxptx
mid-term all revisions g11 s1.pmdzs,zxptxmid-term all revisions g11 s1.pmdzs,zxptx
mid-term all revisions g11 s1.pmdzs,zxptx
omar164646
 
Minimalist Business Slides XL by Slidesgo.pptx
Minimalist Business Slides XL by Slidesgo.pptxMinimalist Business Slides XL by Slidesgo.pptx
Minimalist Business Slides XL by Slidesgo.pptx
karenalavamoran
 
presentation on healing architecture .pptx
presentation on healing architecture .pptxpresentation on healing architecture .pptx
presentation on healing architecture .pptx
buildnpl
 
STOCK ANALYSYS.pptx manajemen keuangan s
STOCK ANALYSYS.pptx manajemen keuangan sSTOCK ANALYSYS.pptx manajemen keuangan s
STOCK ANALYSYS.pptx manajemen keuangan s
kfdpontianak2012
 
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngnReport Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
Report Writing PPT.pptxcvdbfbdbfvvdvfvfbfbgngn
yousafmuzammil19
 
DOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptxDOC-20250121-WA0008._20250121_105938_0000.pptx
DOC-20250121-WA0008._20250121_105938_0000.pptx
laugolac31
 
Naan mudalvan assignment for students_064143.pptx
Naan mudalvan assignment for  students_064143.pptxNaan mudalvan assignment for  students_064143.pptx
Naan mudalvan assignment for students_064143.pptx
NaziaFarheen13
 
Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.Lori Vanzant Portfolio. Take a look! ty.
Lori Vanzant Portfolio. Take a look! ty.
vanzan01
 
behiriskfactorsxyzkskeb210217133906 (1).pdf
behiriskfactorsxyzkskeb210217133906 (1).pdfbehiriskfactorsxyzkskeb210217133906 (1).pdf
behiriskfactorsxyzkskeb210217133906 (1).pdf
ShakibulHasan14
 

Design Patterns - 04 Adapter and Facade Pattern

  • 1. 04 Adapter and Façade PatternDesign Patterns© Prafulla Paraskar 2010
  • 2. AdapterStructural Design Pattern© Prafulla Paraskar 2010
  • 3. DefinitionThe adapter pattern (often referred to as the wrapper pattern or simply a wrapper) is a design pattern that translates one interface for a class into a compatible interface. (wikipedia)© Prafulla Paraskar 2010
  • 4. Adapter Pattern – Explained (1/2)© Prafulla Paraskar 2010
  • 5. Adapter Pattern – Explained (2/2) An adapter allows classes to work together that normally could not because of incompatible interfaces, by providing its interface to clients while using the original interface.The adapter translates calls to its interface into calls to the original interface, and the amount of code necessary to do this is typically small.The adapter is also responsible for transforming data into appropriate forms.© Prafulla Paraskar 2010
  • 6. Adapter Pattern – Types of AdaptersClass adapterSimple and versatile, invisible to the client.Object adapterExtensible to subclasses of the adapter.Two-way adapterEnables different clients to view an object differently.Pluggable adapterPresence of adapter is transparent; it can be put in and taken out. Several adapter can be active.© Prafulla Paraskar 2010
  • 7. Adapter Pattern – UML Diagram© Prafulla Paraskar 2010
  • 8. Adapter Pattern – Real World SamplesAC adaptorsCar charger for mobile phonesCOM InterOp in .NETSQLAdapter in .NET© Prafulla Paraskar 2010
  • 9. Adapter Pattern – GuidelinesYou have :A domain specific interface.A Class to connect to with a mismatching interface.You Want :Create a reusable class to cooperate with yet-to-be-built classes.Change the names of methods as called and as implemented.Support different sets of methods for different purposes.© Prafulla Paraskar 2010
  • 10. FacadeStructural Design Pattern© Prafulla Paraskar 2010
  • 11. DefinitionA facade is an object that provides a simplified interface to a larger body of code, such as a class library (wikipedia).© Prafulla Paraskar 2010
  • 12. Façade Pattern – Explained (1/2)© Prafulla Paraskar 2010
  • 13. Façade Pattern – Explained (2/2)The name is by analogy to an architectural facade.A facade can:make a software library easier to use and understand and test, since the facade has convenient methods for common tasks.make code that uses the library more readable, for the same reason.reduce dependencies of outside code on the inner workings of a library, since most code uses the facade, thus allowing more flexibility in developing the system.wrap a poorly-designed collection of APIs with a single well-designed API (as per task needs).© Prafulla Paraskar 2010
  • 14. Façade Pattern – Types of AdaptersOpaqueSubsystem operations can only be called through the Façade.TransparentSubsystem operations can be called directly as well as through the Façade.SingletonOnly one instance of the Façade is meaningful.© Prafulla Paraskar 2010
  • 15. Façade Pattern – UML Diagram© Prafulla Paraskar 2010
  • 16. Façade Pattern – Real World SamplesWedding planners / Event management.DirectX / OpenGLOnline bill paymentMacros in MS Office© Prafulla Paraskar 2010
  • 17. Façade Pattern – GuidelinesWhen:A system has several identifiable subsystems and:The abstractions and implementations of a subsystem are tightly coupled.The system evolves and gets more complex, but early adapters might want to retain their simple views.You want to provide alternative novice, intermediate and power user interfaces.There is a need for an entry point to each level of layered software. © Prafulla Paraskar 2010
  • 18. Thank you!http://geekswithblogs.net/technomadPresentation by Prafulla Paraskar [email protected]© 2010 S1 India Pvt. Ltd.Presentation by Prafulla Paraskar [email protected]© 2010 Prafulla Paraskar