Re: Real world musings

From: Cristiano Sadun (TAKEcristianoTHISsadunOUT_at_hotmail.com)
Date: 12/16/03


Date: Tue, 16 Dec 2003 14:07:02 +0000 (UTC)

Richard MacDonald <macdonaldrj@worldnet.att.net> wrote in
news:Xns945167F94DCF0macdonaldrjworldneta@204.127.36.1:

> But I still believe that the best OO model is one that closely models
> the "real world".

Well, there are aspects for which this is definitely true. Names are my
favouite here, as I think of them as extremely important. Calling a class
"Dog" makes clear what's supposed to model - calling it "D" less. That's
why I quite dislike interface or class names starting with "I" and "C".
There are some dangers - if u do expose some service in "Dog" which hasn't
anything to do with dogs, it'll make things even more confusing for the guy
reading your design. On the other side, knowing that helps a lot to keep
classes focused and simple.

Also, the relationships. "business" objects (by which I mean: any type -
properly named - which model a concept that would be recognizable to
someone knowing the problem domain) in my designs, tend to have
relationships miming the "real" counterparts; at least as a starting point.
After all, you have to start somewhere.

What I call "system" objects (stuff like lists, stacks, queues, actions,
alghoritms, factories, etc) are there only because we're attempting to
solve a problem with a computer and with a certain paradigm. An equivalent
solution thought by, say, Babbage, would have "wheel" and "carriage"
instead. They have little to do with the "real world" - unless the real
world in question is the computing world itself (or every domain where a
"list" is a business object :).

Apart from that, a set of passive objects hosted in a address space has
little to do with "real" objects, I think. A printer object is not a
printer even when it's living in core, and a wall object is not a wall. You
have to *ask* it whether you've bumped into it or not.. a real wall,
usually, isn't that polite. :)

-- 
You dont know what to do when you dont know what you're doing.
http://space.tin.it/computer/csadun


Relevant Pages

  • Re: Count the faces......
    ... So you dont see through the girl? ... of the girl near the wall see a face of a woman? ... I got up and shook my head and was sure that some of my band members ... weird breathing at night and it had felt like there was somebody there, ...
    (alt.guitar)
  • Re: OT--DH Dog Bite---very long, sorry, im mad as hell
    ... he did call and report it to the animal control. ... dont think he wants the animal put down but the report had ... even had a dog, which was barking loudly enough to make ...
    (rec.crafts.textiles.quilting)
  • Re: a few questions about where bank talent is going
    ... what I dont understand is where are all these people going ... My bank branch is one of those broom closet-sized places ... One of my clients hires wall to wall idiots... ... having taught many high school grads who know all their ...
    (sci.research.careers)
  • Re: blocking outside distractions
    ... I did all the 'nice' stuff like asking them to keep the dog quiet etc. ... I played it in one of my bedrooms next to the party wall. ... The neighbors were pissed off, ...
    (rec.music.makers.piano)
  • Re: Scores on the doors please gentlemen
    ... I dont know how you lot survived that! ... free kicks when the player is so dramatic - the heels get kicked up behind ... Why didnt the wall jump - it only went a foot or so over them? ... I dont really blame Boruc all that much. ...
    (uk.sport.football.clubs.celtic)