Re: Disadvantages of Dependency Inversion?
- From: Patrick May <pjm@xxxxxxx>
- Date: Fri, 15 Jun 2007 09:14:34 -0400
Mark Nicholls <Nicholls.Mark@xxxxxxxxx> writes:
1) Is DIP is wrong?? I donot need to bother DIP if i am programming
to interface???
As I say it's not completely clear what DIP is.....so I would say
completely ignore it....the crux is (to paraphrase part of Steve
Perrymans post)....the uncontraversial bit is.....
1. Reference a component in terms of its public interface(s) not
it's classes.
2. If 1 is not currently possible, define interfaces that users of
can reference, and implement them within the component.
As far as where you put those interfaces....I would suggest if in
doubt put them in their own component....if you can't be bothered
doing that.....put them in the component that implements them.
It depends on how many implementations and how many clients there
are. If there is a single client but multiple implementations, it
makes sense to put the interface in the same set of components as the
client, so that the client package doesn't depend on the
implementation packages.
As a general rule I'd agree with you that the interfaces should
be packaged separately from both clients and implementations.
Regards,
Patrick
------------------------------------------------------------------------
S P Engineering, Inc. | Large scale, mission-critical, distributed OO
| systems design and implementation.
pjm@xxxxxxx | (C++, Java, Common Lisp, Jini, middleware, SOA)
.
- Follow-Ups:
- Re: Disadvantages of Dependency Inversion?
- From: Daniel T.
- Re: Disadvantages of Dependency Inversion?
- From: Mark Nicholls
- Re: Disadvantages of Dependency Inversion?
- References:
- Disadvantages of Dependency Inversion?
- From: sweetchuck74
- Re: Disadvantages of Dependency Inversion?
- From: topmind
- Re: Disadvantages of Dependency Inversion?
- From: Christian Brunschen
- Re: Disadvantages of Dependency Inversion?
- From: nas
- Re: Disadvantages of Dependency Inversion?
- From: Mark Nicholls
- Re: Disadvantages of Dependency Inversion?
- From: nas
- Re: Disadvantages of Dependency Inversion?
- From: Mark Nicholls
- Re: Disadvantages of Dependency Inversion?
- From: nas
- Re: Disadvantages of Dependency Inversion?
- From: Mark Nicholls
- Re: Disadvantages of Dependency Inversion?
- From: Mark Nicholls
- Re: Disadvantages of Dependency Inversion?
- From: nas
- Re: Disadvantages of Dependency Inversion?
- From: Mark Nicholls
- Disadvantages of Dependency Inversion?
- Prev by Date: Re: Disadvantages of Dependency Inversion?
- Next by Date: Re: Disadvantages of Dependency Inversion?
- Previous by thread: Re: Disadvantages of Dependency Inversion?
- Next by thread: Re: Disadvantages of Dependency Inversion?
- Index(es):
Relevant Pages
|
|