Your SlideShare is downloading. ×
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Adapter Pattern
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Adapter Pattern

312

Published on

1. Adapter PatternShahriar Iqbal Chowdhury & Monjurul Habib Code Name: Remington http://www.facebook.com/groups/netter/ …

1. Adapter PatternShahriar Iqbal Chowdhury & Monjurul Habib Code Name: Remington http://www.facebook.com/groups/netter/
2. What is Adapter• A device for connecting pieces of equipment that cannot be connected directly• An adapter allows classes to work together that normally could not because of incompatible interfaces
3. Missing something??
4. How does it work?
5. When we need?• Convert the interface of a class into another interface that client expects.• Allow classes to work together that couldn’t because of incompatible interfaces.• Future clients can be satisfied through the creation of additional concrete Adapter.• Adapter is meant to change the interface of an existing object.• A way to achieve OCP(Open/Closed Principle)
6. Client Component
7. Client AdapterComponent/ Adaptee
8. Adapters in the real world
9. UML Structure
10. Way to use (ref. DoFactory)
11. Client
12. Adapter
13. Adaptee
14. Another shocking example
15. Adapter @.NET Framework• From .NET-based code you can easily call legacy COM objects and vice versa.• Behind the scenes, Visual Studio® .NET create a Runtime Callable Wrapper (RCW) class. Inside the RCW, .NET specific format is converted into a format that the COM component expects and vise versa.• Data Adapters adapts data from different source (SQL Server, Oracle, ODBC, OLE DB) to dataset.• Different Data Adapter classes are usedSqlDataAdapterOdbcDataAdapterOleDbDataAdapter
16. Real World Scenario’s• Most of the applications using third party libraries use adapters as a middle layer between the application and the 3rd party library.• Memory card reader software.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
312
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Adapter PatternShahriar Iqbal Chowdhury & Monjurul Habib Code Name: Remington http://www.facebook.com/groups/netter/
  • 2. What is Adapter• A device for connecting pieces of equipment that cannot be connected directly• An adapter allows classes to work together that normally could not because of incompatible interfaces
  • 3. Missing something??
  • 4. How does it work?
  • 5. When we need?• Convert the interface of a class into another interface that client expects.• Allow classes to work together that couldn’t because of incompatible interfaces.• Future clients can be satisfied through the creation of additional concrete Adapter.• Adapter is meant to change the interface of an existing object.• A way to achieve OCP(Open/Closed Principle)
  • 6. Client Component
  • 7. Client AdapterComponent/ Adaptee
  • 8. Adapters in the real world
  • 9. UML Structure
  • 10. Way to use (ref. DoFactory)
  • 11. Client
  • 12. Adapter
  • 13. Adaptee
  • 14. Another shocking example
  • 15. Adapter @.NET Framework• From .NET-based code you can easily call legacy COM objects and vice versa.• Behind the scenes, Visual Studio® .NET create a Runtime Callable Wrapper (RCW) class. Inside the RCW, .NET specific format is converted into a format that the COM component expects and vise versa.• Data Adapters adapts data from different source (SQL Server, Oracle, ODBC, OLE DB) to dataset.• Different Data Adapter classes are usedSqlDataAdapterOdbcDataAdapterOleDbDataAdapter
  • 16. Real World Scenario’s• Most of the applications using third party libraries use adapters as a middle layer between the application and the 3rd party library.• Memory card reader software

×