home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / object / 5117 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.5 KB

  1. Path: sparky!uunet!crdgw1!rpi!usc!howland.reston.ans.net!spool.mu.edu!hri.com!opl.com!regina!harvey
  2. From: harvey@opl.com (Harvey Reed)
  3. Newsgroups: comp.object
  4. Subject: Re: Maintenance and OO
  5. Message-ID: <harvey.728178381@regina>
  6. Date: 27 Jan 93 23:46:21 GMT
  7. References: <1993Jan25.093100@axion.bt.co.uk> <harvey.728148390@regina>
  8. Sender: news@opl.com
  9. Lines: 56
  10.  
  11.  
  12. I got some good response, so I will summarize:
  13.  
  14. harvey@opl.com (Harvey Reed) writes:
  15. >...
  16. >the design. Maintaining OO (and C++) requires a more global understanding
  17. >of the system than with C.
  18.  
  19. >I think this is a result of the fact that well designed OO packages
  20. >(class, whatever) tend to get reused over and over, so the end result
  21. >is that fixing a line of code can have impact throughout the system.
  22.  
  23.  
  24. [Dave Cline, et. al.] correctly point out that a common trait
  25. of traditional C (let's call it "flat") systems that used globals
  26. was that - maintainers needed to know a lot about the system. Add
  27. to that the "Globals Considered Harmful Paper"...
  28. I want to draw a distinction between the knowledge that an
  29. OO maintainer needs and a "flat" maintainer needs.
  30.  
  31. -----------------
  32.  
  33. What's the difference? Let's start with a class. In many respects
  34. an OO class is analogous to a FLAT library. The big difference
  35. is that the OO class is typically finer grained (smaller API), and
  36. the dependencies between the OO classes are more complex than the
  37. dependencies between FLAT libraries.
  38.  
  39. If the designer of an OO system eliminated relationships between
  40. OO classes, the resulting system will be a lot closer in look
  41. and feel to the FLAT system. However it is precisely these relationships
  42. that give OO the power (inheritance, containment, polymorphism, etc.)
  43. to express more with less. These OO relationships protect the 
  44. system from a FLAT-ness where the responsibility to update globals 
  45. is spread out. As my manager says... "spread out responsibility 
  46. is no responsibility".
  47.  
  48. -----------------
  49.  
  50. SOOOOO... just what does the maintainer need to know? Well, in the
  51. OO system, more global knowledge, but of a type that is (after training)
  52. easier to comprehend. The maintainer must understand all the OO
  53. relationships between the classes (libraries) that is in the 
  54. immediate vicinity of where a bug-fix or enhancement will go.
  55.  
  56. IMO this is of a completely different nature than global variables,
  57. and much easier to deal with.
  58.  
  59.  
  60.  
  61.  
  62. -- 
  63. ++harvey
  64. ===========================================================================
  65. internet:       harvey@opl.com  /  hreed@cs.ulowell.edu  /  h.reed@ieee.org
  66. voice/fax:      617-965-0220    /  617-965-7599
  67.