Differing implementations for a function in two interfaces
BCS
BCS_member at pathlink.com
Mon Apr 17 14:52:58 PDT 2006
Ryan Steen wrote:
> In article <e1vci0$1luu$1 at digitaldaemon.com>, Lionello Lunesu says...
>
>>They are completely unrelated.
>>Now what? Redesign the whole app and make multiple classes?
>
>
> Yes. Such design is flawed: to implement two completely unrelated interfaces in
> one single class.
>
>
// ABC inc.'s DB lib (closed source lib)
interface DatabaseItemInterface
{
...
int get(); // load the data from the DB into the object, return something
...
}
// XYZ corp.'s finance framework (closed source lib)
interface PerchaseRequest
{
...
int get(); // return the PO number for this item
...
}
// now, implement a finance database
More information about the Digitalmars-d-learn
mailing list