Re: Best way to access methods of Objects and its sub-Objects
On 4/26/2013 8:44 PM, dotnetbuddha@googlemail.com wrote:
[..]
From what I understand reading your comments, there is no *one* way,
but rather both ways can/should be used simultaneously, given the
wide range of interfaces we offer to the User ?
You misunderstand, or so it seems. The way is not dictated by *you*,
the implementor of the class/interface, but by the user of it. Provide
the interface that will be used. If both are needed, provide both. If
you provide both, they *can* be used simultaneously (that's the user's
prerogative), but AFA design is concerned, the word "should" has no
place, IMHO.
Now, how do you figure out which interface is *likely* to be used? You
need to put yourself in the shoes of the user and imagine the likely
application of your types. The rest of the story is to be written by
the market, so to speak. If you have unlimited resources, provide all
the interfaces you can think of. If your resources are of the real
world, then you will need to pick the most likely to be used, and
concentrate on making them convenient and robust.
V
--
I do not respond to top-posted replies, please don't ask