Re: Designing issue



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



mojtaba_danai@xxxxxxxxx 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!!!

.



Relevant Pages

  • Re: Designing issue, help wanted
    ... I do not answer questions on behalf of my employer. ... -There can be different kind of adapters, which each can take data from ... One of the adapters inherits already from couple of data source API ...
    (comp.software.patterns)
  • APi to SetAdapter Setting
    ... Is there any API to setAdapterSettings. ... I want to set Gateway, DNS, ... DomainName and WINS Server on the adapters. ... GetAdapterSettings to Set the Adapter Settings. ...
    (microsoft.public.win2000.networking)
  • API for SetAdapterSetting?
    ... Is there any API to setAdapterSettings. ... I want to set Gateway, DNS, ... DomainName and WINS Server on the adapters. ... GetAdapterSettings to Set the Adapter Settings. ...
    (microsoft.public.windows.server.networking)
  • switchmode AC adapters
    ... higher power output than older AC adapters. ... Do the switchmode AC adapters implement ... this type of design or are they using a simpler/different design? ...
    (sci.electronics.design)
  • Designing issue, help wanted
    ... -There can be different kind of adapters, which each can take data from ... How the design of the adapter class should look like? ... One of the adapters inherits already from couple of data source API ... adapter, using completely third API to collect data, easily to the ...
    (comp.software.patterns)