Re: Design for Extension
- From: "Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 17 Jan 2006 13:19:39 -0000
iamfractal@xxxxxxxxxxx wrote:
> Object-orientation is based on variance-encapsulation (see GoF), so to
> practice object-orientation you must know:
>
> A) What quality of a system is varying, and
> B) How to encapsulate that quality.
A sensible post, but I want to raise a couple of quibbles.
> Varying necessarily means, "Varying with time," so unless you're
> planning to design a system that's moving into the past, then there is
> some aspect of the future that you'll find yourself contending with.
I don't think that's true. The variance can occur across several axes. For
instance, we might want to have AB+C at one site, and AB+D at another. Or one
product line might include AB+C while another includes AB+D. Such variances
also supply your "natural fracture lines".
Secondly, and in a way generalising that point, while variance does suggest
object boundaries, I think it's an exaggeration to claim that it's the source
of OO. If that were true, then in my own (personal) software, written with no
thought to the future ('cos I have no idea what it is) nor consideration of
other possible variance (since it's only used by me, typically for only one
purpose), I would have no idea where to put object boundaries. Indeed I could
/only/ structure my applications as one big object. Obviously that's absurd.
Variance is only one of the inputs to OO design, and managing variance over
time is only one of the benefits of OO code.
I don't suggest that you really hold the views I'm disagreeing with above, but
your words could certainly be taken that way.
(None of this has anything to do with the OP's question, of course ;-)
-- chris
.
- Follow-Ups:
- Re: Design for Extension
- From: iamfractal
- Re: Design for Extension
- References:
- Design for Extension
- From: Martin Ankerl
- Re: Design for Extension
- From: Thomas Weidenfeller
- Re: Design for Extension
- From: iamfractal
- Design for Extension
- Prev by Date: Re: Design for Extension
- Next by Date: Re: What is the best way to achieve this? (seperate Thread for listeningto events)
- Previous by thread: Re: Design for Extension
- Next by thread: Re: Design for Extension
- Index(es):
Relevant Pages
|