Re: Confusion With Inheritance
- From: "H. S. Lahman" <h.lahman@xxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 17:39:42 GMT
Responding to Martin...
Notice that when you described your classes, you described them in
terms of the data that they held, and not in terms of the behavior
that they exhibited. This is the first, and most serious, problem
with your example. Object Oriented Design is a discipline for
partitioning *behavior*, and *incidentally* the data that goes with
that behavior.
We disagree Big Time on this one.
Knowledge and behavior responsibilities have always been given equal stature in OO development. One abstracts the /intrinsic/ properties of problem space /entities/. The proportions of knowledge vs. behavior or their relative importance to the solution is not relevant -- one abstracts and encapsulates the entity's bundle of relevant properties as the object.
Defining objects based primarily around behaviors rather than the whole entity is just a form of procedural functional decomposition. One ends up defining a function library that collects procedures into classes rather than abstracting the problem space. Then when one connects up the class library with messages one has a C or FORTRAN program with strong typing.
************* There is nothing wrong with me that could not be cured by a capful of Drano.
H. S. Lahman hsl@xxxxxxxxxxxxxxxxx Pathfinder Solutions -- Put MDA to Work http://www.pathfindermda.com blog: http://pathfinderpeople.blogs.com/hslahman (888)OOA-PATH
.
- Follow-Ups:
- Re: Confusion With Inheritance
- From: Robert C . Martin
- Re: Confusion With Inheritance
- From: Michael Feathers
- Re: Confusion With Inheritance
- References:
- Confusion With Inheritance
- From: Brad
- Re: Confusion With Inheritance
- From: Robert C . Martin
- Confusion With Inheritance
- Prev by Date: Re: XP and Pair Programming
- Next by Date: Re: C++ implementation for C API ---- converting legacy C code to C++
- Previous by thread: Re: Confusion With Inheritance
- Next by thread: Re: Confusion With Inheritance
- Index(es):