Adaptor Pattern:
According to The Gang of Four (GoF) “Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.”
When we develop the coding with the help of object-oriented programming languages, it tends to happen that we end up using a class that is unavailable within the active classes within the system. In this case, it is advisable to create an adaptor (also known as wrapper). This adaptor should be capable to be wrapped around the external class which will enable it to communicate with the existing class.
Reference:
http://www.c-sharpcorner.com/UploadFile/rajeshvs/AdapterPatternInCS11142005005135AM/AdapterPatternInCS.aspx.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment