I've only just read the first page of the article, and already I'm starting to wonder if he isn't overdoing it a little in the 'object purity' department.

Not that I don't see what he's getting at, but it doesn't really apply to the real world (and that of programming). For example, he says that get and set methods are evil. That would mean to me that objects aren't reusable in his world.

Take for example a coffee machine object (this is how a former colleague explained OO to a PHB, worked quite well :) - The coffee machine needs data input, I need to set the value of its water container to full (ie fill it), the coffee, the type I want, etc. pp. If I can do this only once, when I create the object, then I can only create coffee until it's empty, and then I need a new machine.. (!?)

I also have a separate object, a cup/mug/glass/whatever, into which I wish to put my coffee. What does the machine know about cups? Nothing! I should merely tell it to output the coffee, and let me deal with where it lands. A coffee machine shouldn't have to also produce cups, or whatever. (And theres another case in point, we have here coffee machines which output a plastic cup filled with coffee. Most people take a real cup, and tip the coffee into it, throwing away the plastic one. Thus creating unnecessary waste.)

An object should do the job it was designed to do (manipulate data, whatever), and not 57 other vaguely related ones..

(My Opinion)

C.

*Wondering how the article writer populates his objects, should go back and read the rest...*


In reply to Re: (OT) OOUI: multiple views in an object. by castaway
in thread (OT) OOUI: multiple views in an object. by BUU

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.