Two-way or n-way adapters improve transparency by allowing clients to use the adapter in different ways but why not combine the Factory pattern with the Adapter pattern and let the client ask the AdapterFactory the concrete adaptation class they need?
I imagine the Factory would simplify the process and still achieve the same effect as a n-way adapter, right?
Aucun commentaire:
Enregistrer un commentaire