470,811 Members | 1,154 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,811 developers. It's quick & easy.

Designing issue

Hi

I am trying to make a adapter program.
-There can be different kind of adapters, which each can take data from
one source.
-It should be possible to plugin the new adapter for a new source of
data.
-The adapters all make a common structure to give it to the connected
clients. (I have implemented this part).
-Each adapter uses a specific API to collect data from data source.

How the design of the adapter class should look like? Which design
pattern?

Thanks.

Regards
mojtaba

Jun 30 '06 #1
4 975
Hi again
Just wanted to add:

There should probably be a superclass for all adapters, right? But they
use different APIs, as I said before, and one of the adapters inherits
already from couple of data source API classes.

Thanks.

Regards
mojtaba

Hi

I am trying to make a adapter program.
-There can be different kind of adapters, which each can take data from
one source.
-It should be possible to plugin the new adapter for a new source of
data.
-The adapters all make a common structure to give it to the connected
clients. (I have implemented this part).
-Each adapter uses a specific API to collect data from data source.

How the design of the adapter class should look like? Which design
pattern?

Thanks.

Regards
mojtaba


Jun 30 '06 #2
mojtaba_danai wrote:
There should probably be a superclass for all adapters, right?


Why? Will anything ever use a reference to this superclass, not knowing
which derived type it wields?

Design is not about abstracting everything, it's about defining minimal and
useful interfaces.

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Jun 30 '06 #3
Hi

Thanks for the answer. Then, what is the good approach to this problem?

Making plugable adapters?

Regards
mojtaba

Phlip wrote:
mojtaba_danai wrote:
There should probably be a superclass for all adapters, right?


Why? Will anything ever use a reference to this superclass, not knowing
which derived type it wields?

Design is not about abstracting everything, it's about defining minimal and
useful interfaces.

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!


Jun 30 '06 #4
Hi

The original message was this:

I am trying to make a adapter program.
-There can be different kind of adapters, which each can take data from
one source.
-It should be possible to plugin the new adapter for a new source of
data.
-The adapters all make a common structure to give it to the connected
clients. (I have implemented this part).
-Each adapter uses a specific API to collect data from data source.

How the design of the adapter class should look like? Which design
pattern?
There should probably be a superclass for all adapters, right? But they
use different APIs, as I said before, and one of the adapters inherits
already from couple of data source API classes.

Thanks.

Regards
mojtaba

mo***********@yahoo.com wrote:
Hi

Thanks for the answer. Then, what is the good approach to this problem?

Making plugable adapters?

Regards
mojtaba

Phlip wrote:
mojtaba_danai wrote:
There should probably be a superclass for all adapters, right?


Why? Will anything ever use a reference to this superclass, not knowing
which derived type it wields?

Design is not about abstracting everything, it's about defining minimal and
useful interfaces.

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!


Jun 30 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by James Brown | last post: by
3 posts views Thread by mystilleef | last post: by
10 posts views Thread by Sruli | last post: by
8 posts views Thread by pransri2006 | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.