Re: How to invert dependency?
- From: "Ilja Preuß" <it@xxxxxxxxxxxxx>
- Date: Sat, 25 Feb 2006 22:29:35 +0100
Stefan Ram wrote:
I do not like it that the lion and the tigers now are aware of
another layer residing on top of them and prefer the first
implementation using »implementedby«. I prefer it, because
the lower levels should not depend on higher layers build
on top of them.
Does this requirement for layering make sense?
That really depends on what you mean by "on top of".
Possibly Ed is right that you are mislead by the way you draw the graph.
If Lion and Tiger really shouldn't know about Animal, one way to not have
them do that is using the Adapter pattern. But whether that really is a good
idea depends on details you didn't yet tell us, for example why you did
choose this kind of layering, what the responsibility of the layers is etc.
Cheers, Ilja
.
- Prev by Date: Re: Can use of singletons denote poor project design?
- Next by Date: Re: Can use of singletons denote poor project design?
- Previous by thread: Re: How to invert dependency?
- Next by thread: Re: How to invert dependency?
- Index(es):
Relevant Pages
|