Re: Design for Extension



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



.



Relevant Pages

  • Re: COMFAIRMED gone
    ... The name had everything to due with the aroma. ... No variance in the quality of one's peers could overcome it. ... I knew little of Olongopo (besides ...
    (rec.aviation.military.naval)
  • Estimate variance of rational function
    ... I am trying to asset the quality of function estimate, ... the coefficient of the rational function is obtained from a minimum ... variance estimate. ... If a, b, c, d, and e are the mimimum variance coeffient estimates ...
    (sci.math.num-analysis)
  • minimum variance of a rational function estimator
    ... I am trying to assess the quality of function estimate, ... if I can assume that the variance of a rational function is minimum ... If a, b, c, d, and e are the mimimum variance coeffient estimates ...
    (sci.stat.math)
  • Optimize sampling times
    ... I want to fit a nonlinear function fto set of data at time ... points tby varying the parameters x. ... Is there a clever solution to this problem? ... force simulations to minimize variance of xw.r.t the time-points. ...
    (sci.math.num-analysis)