Adapter pattern yana ba da damar abubuwa waɗanda ke da interfaces marasa daidaituwa su aiki tare ta hanyar nannade ɗaya ta interface wanda ɗayan ke buƙata. Yana aiki azaman jami'i tsakanin interfaces biyu, yana ba da damar haɗawa ba tare da canja cod da ke akwai ba.
Abin da Adapter pattern ke yi
ADAPTER → convert one interface into another that a client expects (a "translator"):
→ wrap an object whose interface is INCOMPATIBLE, exposing the interface the client needs
→ the adapter translates calls/data between the two interfaces
→ makes incompatible things work together WITHOUT changing either's code
