home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsc!cbfsb!att-out!pacbell.com!tandem!UB.com!igor!thor!rmartin
- From: rmartin@thor.Rational.COM (Bob Martin)
- Newsgroups: comp.object
- Subject: Re: Object-Oriented Methodologies - Class Specifications
- Message-ID: <rmartin.715531442@thor>
- Date: 3 Sep 92 14:44:02 GMT
- References: <715276480.1.p00058@mail.psi.net> <1992Sep1.220559.10346@m.cs.uiuc.edu>
- Sender: news@Rational.COM
- Lines: 28
-
- johnson@m.cs.uiuc.edu (Ralph Johnson) writes:
-
- >Draw is definitely more debatable. My guess is that if you ask a Circle
- >to draw on a window, it just performs the DrawCircle operation on the
- >window, which isn't all that bad. But in general, different applications
- >will want to draw on different things, and will want to interpret drawing
- >differently. Is color needed? Line-width? Neither of these are attributes
- >of Circles, so it seems unreasonable to make Circles be responsible for
- >drawing.
-
- >In Smalltalk, there is a separation between geometric objects and
- >graphical objects. A circle is not displayable. Instead, you have
- >to put a wrapper on it that includes color and line width information,
- >as well as the display operations.
-
- If Circle is a member of a family of objects which know how to draw
- themselves on a Window, then the knowledge of Window by Circle is
- proper. One could argue that the family itself was improperly
- coupled, since it represented two fundemental abstractions: One, a
- set of geometric objects. And two: A set of objects which can be
- drawn on a window. It could enhance the reusability of the family if
- the concept of the window were removed from the family, and some other
- method were applied to allow drawing on the window.
- --
- Robert Martin Training courses offered in:
- R. C. M. Consulting Object Oriented Analysis
- 2080 Cranbrook Rd. Object Oriented Design
- Green Oaks, Il 60048 (708) 918-1004 C++
-