in reply to RE: RE: RE: Object Heirarchy / Design
in thread Object Heirarchy / Design
While I agree with this in principle, I'm not sure I agree with the execution.
I think that you'd really want Obj to return an instance of a subclass (e.g. Obj::DB or Obj::FlatFile).
Then you maintain the consistency of the interface -- so that your objects all share the same methods and simply overload them as necessary, but the implementation specific to each type of object occurs in seperate classes/objects.
I thought I remembered seeing something in Fastolfe's node, but I a quick look didn't come up with anything.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE (a lot) tilly: Object Heirarchy / Design
by tilly (Archbishop) on Nov 15, 2000 at 23:23 UTC |