home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!crdgw1!rpi!usc!howland.reston.ans.net!spool.mu.edu!hri.com!opl.com!regina!harvey
- From: harvey@opl.com (Harvey Reed)
- Newsgroups: comp.object
- Subject: Re: Maintenance and OO
- Message-ID: <harvey.728178381@regina>
- Date: 27 Jan 93 23:46:21 GMT
- References: <1993Jan25.093100@axion.bt.co.uk> <harvey.728148390@regina>
- Sender: news@opl.com
- Lines: 56
-
-
- I got some good response, so I will summarize:
-
- harvey@opl.com (Harvey Reed) writes:
- >...
- >the design. Maintaining OO (and C++) requires a more global understanding
- >of the system than with C.
-
- >I think this is a result of the fact that well designed OO packages
- >(class, whatever) tend to get reused over and over, so the end result
- >is that fixing a line of code can have impact throughout the system.
-
-
- [Dave Cline, et. al.] correctly point out that a common trait
- of traditional C (let's call it "flat") systems that used globals
- was that - maintainers needed to know a lot about the system. Add
- to that the "Globals Considered Harmful Paper"...
- I want to draw a distinction between the knowledge that an
- OO maintainer needs and a "flat" maintainer needs.
-
- -----------------
-
- What's the difference? Let's start with a class. In many respects
- an OO class is analogous to a FLAT library. The big difference
- is that the OO class is typically finer grained (smaller API), and
- the dependencies between the OO classes are more complex than the
- dependencies between FLAT libraries.
-
- If the designer of an OO system eliminated relationships between
- OO classes, the resulting system will be a lot closer in look
- and feel to the FLAT system. However it is precisely these relationships
- that give OO the power (inheritance, containment, polymorphism, etc.)
- to express more with less. These OO relationships protect the
- system from a FLAT-ness where the responsibility to update globals
- is spread out. As my manager says... "spread out responsibility
- is no responsibility".
-
- -----------------
-
- SOOOOO... just what does the maintainer need to know? Well, in the
- OO system, more global knowledge, but of a type that is (after training)
- easier to comprehend. The maintainer must understand all the OO
- relationships between the classes (libraries) that is in the
- immediate vicinity of where a bug-fix or enhancement will go.
-
- IMO this is of a completely different nature than global variables,
- and much easier to deal with.
-
-
-
-
- --
- ++harvey
- ===========================================================================
- internet: harvey@opl.com / hreed@cs.ulowell.edu / h.reed@ieee.org
- voice/fax: 617-965-0220 / 617-965-7599
-