Adapter pattern:[Structural]

  • A class that would be useful to your application does not implement the interface that requires.
  • Does not support multiple inheritances.
  • Match interfaces of different classes. It is also known as “Wrapper”.
  • Adapter is a wrapper that helps one object integrates with any other object's interface.
  • Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.
Adapter

Types:

  1. Class Adapter pattern
  2. Object Adapter pattern
NOTE: Normally adapter pattern used in DataAccess layer to adapt the ADO.Net adapter classes like SQLAdapter.

Comments

Popular posts from this blog

BDD - Acceptance Test Driven Development

Angular JS – Part 2

.Net Collections