Originally posted by Max Habibi:
A proxy object recieves methods calls on hehalf of another object: a Adapter provides an interface to a client, thus allowing the client to speak to an unknown implementation of that interface.
Thanks for your explanation, Max.
But I still have a question on Adapter pattern.
Let's say I don't have my database class now.
I have a class called Data, which implemented DB interface. Since I think DB doesn't provide good enough functionalities for clients, I decide to create a class called DataAccess.
DataAccess will have same methods that DB has, but just their signature may have some differences (for example, instead of returning
String[], it returns Record).
DataAccess will directly be used by clients, so the clients will not know the actual implementation.
Does the DataAccess consider as an Adaptor class?
I just want to know whether I'm getting the idea correct. Pattern design is very new to me and I'm trying to learn it right.
Thanks again, Max.
Cheers,
Michael