From: topmind on
> For example, I have a system that handles a variety
> of similar, but not identical, XML messages. I find
> it an elegant solution to have an abstract "XML
> Message" class with specializations handling
> the specific message types.

I find that real world things in my domain often do not lastingly
divide nicely into "types". The variations are in orthogonal or
semi-orthogonal factors. IS-A fails under dynamic orthogonality and one
has to turn to HAS-A techniques (such as feature lists and/or
many-to-many tables).

In some cases a standards committee may hard-wire stuff such that one
can make a hierarchy up-front without much fear of new features busting
the "type tree", but that is a minority situation, and still no
guarentee.

I don't really have to defend this position because a fair number of OO
proponents have agreed with "subtypes" having lots of limits (they use
OO HAS-A techniques instead). I shall set you tree fans free to go
battle with them instead of me.

-T-

From: Robert C. Martin on
On 8 Jun 2005 14:55:46 -0700, "topmind" <topmind(a)technologist.com>
wrote:

>> The bottom line for OO is that it is a technique for
>> managing dependencies and reducing coupling; and
>> the primary tool for achieving that is polymorphism.
>
>And I invite you to demostrate that with code examples
>outside of "device driver" examples. (Unless you can
>argue that most software issues can be effectively
>modeled as or like device drivers.)

I thought you were leaving us to battle on our own.

I accept your invitation, and refer you to the many books and articles
I have written on the topic, not one of which mentions "device
drivers". You'll find them listed at the www.objectmentor.com site
under the resources tab.

I eagerly await your informed analysis of those books and articles.



-----
Robert C. Martin (Uncle Bob) | email: unclebob(a)objectmentor.com
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716


"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
From: Robert C. Martin on
On 9 Jun 2005 13:09:04 -0700, "topmind" <topmind(a)technologist.com>
wrote:

>> Uncle Bob may be guilty of many things, but failure to provide
>> code samples is not one of them. Why don't you pick one of the articles
>> from his web site, or take a fragment from one of his books...
>
>For one, I don't do C++.

Excuses, excuses. How about all the Java examples then?

And if you don't do that language either, then perhaps you should
consider whether or not your inability to see usefulness in these
techniques might be based on your own naivete regarding languages.

>Second, his web-site examples are almost
>exclusive about device drivers.

Not even one. Can anybody find a device driver in my website
articles? I don't write device drivers.

>Are there any code examples that
>demostrate "reduced coupling" besides device driver and animal
>examples?

Take a look at the Payroll, Weather Station, and Architectural
Examination examples in my book "Agile Software Development,
Principles, Patterns, and Practices". Or take a look at the open
source project "FitNesse" (www.fitnesse.org) which is a web server,
wiki, and acceptance testing tool.

And please don't make that tired old "device driver" excuse again.
You've used it many times before, and it's no truer now than it was
then.


-----
Robert C. Martin (Uncle Bob) | email: unclebob(a)objectmentor.com
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716


"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
From: Robert C. Martin on
On Thu, 9 Jun 2005 12:42:11 +0100, Gerry Quinn
<gerryq(a)DELETETHISindigo.ie> wrote:

>In article <cmqda1lgqhsfd2e40vdvkcvv3006uajfcd(a)4ax.com>,
>unclebob(a)objectmentor.com says...
>> >Gerry Quinn wrote:
>>
>> >> To say "OO is about polymorphism", in short, is nonsense.
>>
>> This was cross posted to comp.object, so I'm not sure of the context.
>> Taken on its own, the above statement is less than accurate.
>
>The context was that is was a response to a poster who made the false
>statement (and it was not qualified by context) that "OO is about
>polymorphism".
>
>> OO has many defining traits such as encapsulation, inheritance, and
>> polymorphism. However, the one trait that is present in all OO
>> incarnations without modification is polymorphism. All the others are
>> quite variable. For example, inheritance means very different things
>> in different OO languages. In Smalltalk it's minor convenience,
>> whereas in Java it is a critical necessity *because* it enables
>> polymorphism. In C++ encapsulation boundaries are enforced by
>> 'private' and 'protected' keywords. Other languages use those
>> keywords in subtly different ways. Yet other languages don't have
>> them, and don't enforce encapsulation.
>
>To say "polymorphism is present in all OO incarnations without
>modification" is merely to say that you have defined it more vaguely
>than encapsulation and inheritance.

I don't think so. Polymorphism is the ability for an object to
respond to a message in a manner that is consistent with it's type.

Or, to get very concrete, OO is a way of structuring programs such
that data structures are manipulated by functions called through jump
tables contained by those data structures.
>
>> The bottom line for OO is that it is a technique for managing
>> dependencies and reducing coupling;
>
>Yes, that is what it is for.
>
>> and the primary tool for achieving
>> that is polymorphism.
>
>I don't agree with this, and even if you define polymorphism so
>inclusively that it becomes true, it still doesn't justify the
>assertion that that is what OO is about.

We disagree.
-----
Robert C. Martin (Uncle Bob) | email: unclebob(a)objectmentor.com
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716


"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
From: topmind on
> Not even one. Can anybody find a device driver in my website
> articles? I don't write device drivers.

You used to have a modem driver and lamp controller example
if I remember correctly. It seems they were removed because they
didn't contain the Fad DeJour methodology in them.

> examples in my book

My website and examples are provided for free, I espect the same
curtesy from you.

> which is a web server,
> wiki, and acceptance testing tool.

Okay, how about wiki's. How does specificly does polymorphism improve
wiki's beyond what a procedural version can do?

-T-
oop.ismad.com

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Next: Use Case Point Estimation