Re: Separation of API and implementation
- From: "Daniel T." <daniel_t@xxxxxxxxxxxxx>
- Date: Thu, 16 Aug 2007 07:27:59 -0400
"Gabriel Claramunt" <gabclar@xxxxxxxxxxxxxxx> wrote:
I'm missing something or an Abstract Factory could help?
As long as you use the factory, you can ensure that your implementation of X
will use your implementation of Y.
An abstract factory can help, as long as it keeps track of which Xs are
from package A and which ones are from package B so it knows how to
distribute the Ys.
The basic problem is with the OPs interface:
interface X {
void foo(Y y);
}
The interface above is a lie, because it says that every X can handle
any Y, but that just isn't true.
.
- References:
- Separation of API and implementation
- From: hforco2
- Re: Separation of API and implementation
- From: Gabriel Claramunt
- Separation of API and implementation
- Prev by Date: Re: Separation of API and implementation
- Next by Date: OOPS 2008 Call for Papers
- Previous by thread: Re: Separation of API and implementation
- Next by thread: Confused betwen user cases and user stories
- Index(es):
Relevant Pages
|