FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

DesignPatterns/DesignPatterns/DesignPatterns.Adapter at master · MainaGeorge/DesignPatterns · GitHub

Latest commit

 

History

History

DesignPatterns.Adapter

The adapter pattern helps in converting the interface of a class into another interface depending on the client's requirements. So, basically providing what is required by the client by using the service of a class with a different interface. Adapter pattern is also famously known as Wrapper.

When to use Adapter Pattern: *When you want to create a reusable class that can cooperate easily with other classes, which does not have any compatible interface. *When you want to use an object in a certain environment that is expecting an interface that is different from its object interface. *When you want to use an existing class, but its interface does not match the interface the class needs.

Basically, the adapter pattern acts as an intermediate state between two classes.


Back | FazBrowse Home | New Git URL