home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso / answers / object-faq / part1 < prev    next >
Internet Message Format  |  1994-09-17  |  61KB

  1. Path: bloom-beacon.mit.edu!senator-bedfellow.mit.edu!faqserv
  2. From: Bob Hathaway <rjh@geodesic.com>
  3. Newsgroups: comp.object,comp.answers,news.answers
  4. Subject: Comp.Object FAQ Version 1.0.6 (9-15) Part 1/9
  5. Supersedes: <object-faq/part1_777166834@rtfm.mit.edu>
  6. Followup-To: comp.object
  7. Date: 17 Sep 1994 12:04:15 GMT
  8. Organization: Geodesic Systems
  9. Lines: 1189
  10. Approved: news-answers-request@MIT.Edu
  11. Expires: 31 Oct 1994 12:03:01 GMT
  12. Message-ID: <object-faq/part1_779803381@rtfm.mit.edu>
  13. References: <object-faq/announce_779803381@rtfm.mit.edu>
  14. NNTP-Posting-Host: bloom-picayune.mit.edu
  15. Summary: Frequently Asked Questions (FAQ) List and Available Systems For Object-Oriented Technology
  16. X-Last-Updated: 1994/09/15
  17. Originator: faqserv@bloom-picayune.MIT.EDU
  18. Xref: bloom-beacon.mit.edu comp.object:12650 comp.answers:7309 news.answers:25849
  19.  
  20. Archive-name: object-faq/part1
  21. Last-Modified: 9/15/94
  22. Version: 1.0.6
  23.  
  24. COMP.OBJECT FAQ
  25. Version: 1.0.6
  26. Date:    9/15/1994
  27.  
  28.  
  29. Author:
  30.   Bob Hathaway
  31.   Geodesic Systems, Inc.
  32.   Cyberdyne Systems Corporation
  33.   rjh@geodesic.com
  34.  
  35.  
  36. Anonymous FTP Sites and Hypertext Server:
  37.   anonymous@zaphod.uchicago.edu:/pub/CompObj6.faq(.Z) (128.135.72.61)
  38.   anonymous@rtfm.mit.edu:/pub/usenet/comp.object/*_Part_*
  39.   http://cui_www.unige.ch/OSG/FAQ/OO-FAQ/index.html
  40.  
  41. Mail Server:  (See also section 1.24)
  42.   mail mail-server@rtfm.mit.edu
  43.   Subject:
  44.   send usenet/comp.object/*
  45.  
  46. Zaphod is preferred over rtfm for anonymous ftp retrieval, as it provides a
  47. single file.  Rtfm contains the FAQ as posted.
  48.  
  49. To use the hypertext system, see APPENDIX E, entries 27.
  50. There is currently no comp.object archive.
  51.  
  52. Copyright 1992-1994  Bob Hathaway
  53. All rights reserved.
  54.  
  55. Permission is granted to freely copy and distribute this document but only at
  56. no cost to others and with the exception of a nominal distribution fee, if
  57. any.  No sale, resale or reprinting is granted without the explicit written
  58. permission of the author.
  59.  
  60. Contributors:  Per Abrahamsen, Edwardo Casais, Stewart Clamen, Dennis De
  61.   Champeaux, Mike DeVaney, Eric Dujardin, Piercarlo Grandi, Brian Henderson-
  62.   Sellers, Urs Hoelzle, Paul Johnson, Bill Kinnersley, Oscar Nierstrasz, 
  63.   James Odell, Eoin Woods, and many others whose contributions have helped this
  64.   document to fulfull its objective of bringing object-oriented concepts and
  65.   systems to everyone.  And special thanks to Object Systems, Geodesic Systems
  66.   and Cyberdyne Systems for providing the support and resources needed to make
  67.   this effort possible.
  68.  
  69. Objective:
  70.   In the spirit of other FAQs, to provide a simple document to answer the most
  71.   frequently asked and recurring questions and to allow new users to understand
  72.   frequently discussed topics and terms used in comp.object.   This should
  73.   bring new comp.object readers and/or writers to at least an introductory
  74.   level of comprehension as soon as possible.  Other goals (hopes) are to
  75.   provide a quick and current reference on available systems such as object-
  76.   oriented languages, CASE, OODB and etc. and to provide good references to
  77.   current and relevant OO systems, groups, texts and literature.
  78.  
  79. Disclaimer:
  80.   This document does not necessarily reflect the opinions of the author's or
  81.   any contributor's companies.  There are no explicit or implicit guarantees
  82.   implied by this document.
  83.  
  84. While object systems are a constantly changing and moving target with a broad
  85. diversity of often conflicting methodologies, constructs, terminologies,
  86. approaches, languages, implementations and etc. and comp.object has a wide
  87. diversity of readers and writers ranging from students, professors and
  88. researchers in academia to beginners, professionals, top-notch experts and
  89. leaders in industry with a broad range of experience and backgrounds ranging
  90. across many paradigms, this FAQ can certainly not aspire to satisfy all of them
  91. completely but instead attempts to provide the most well-rounded treatment of
  92. object-oriented concepts and realizations primarily from the mainstream and
  93. popular authors and systems and further to provide a collection of available
  94. systems and tools in the appendices.
  95.  
  96. Several improvements are planned for future FAQs, including a glossary.
  97.  
  98.  
  99. SECTION 1:  BASICS
  100.   1.1)  What Is An Object?
  101.   1.2)  What Is Object Encapsulation (Or Protection)?
  102.   1.3)  What Is A Class?
  103.   1.4)  What Is A Meta-Class?
  104.   1.5)  What Is The Infinite Regress Of Objects And Classes?
  105.   1.6)  What are MOPs and Reflection?
  106.   1.7)  What Is Inheritance?
  107.   1.8)  What Is Multiple Inheritance?
  108.   1.9)  Does Multiple Inheritance Pose Any Additional Difficulties?
  109.   1.10) What Is Dynamic Inheritance?
  110.   1.11) What Is Shared (Repeated) Inheritance?
  111.   1.12) Why Use Inheritance?
  112.   1.13) Why Don't Some People Like Inheritance?
  113.   1.14) What Is Specialization/Generalization/Overriding?
  114.   1.15) What Is The Difference Between Object-Based And Object-Oriented?
  115.   1.16) Is A Class An Object?
  116.   1.17) Is An Object A Class?
  117.   1.18) What Is A Method? (And Receiver And Message)
  118.   1.19) What Are Multi-Methods And Multiple-Polymorphism?
  119.   1.20) What Is OOP?
  120.   1.21) What Is OOA/OOD (And Where Can I Get What I Need On It)?
  121.   1.22) Where Did Object-Orientation Come From?
  122.   1.23) What Are The Benefits Of Object-Orientation?
  123.   1.24) What Other FAQs Are available?
  124.  
  125. SECTION 2:  TYPING
  126.   2.1)  What Is Polymorphism?
  127.   2.2)  What Does Polymorphism Boil Down To In OO Programming Languages?
  128.   2.3)  What Is Dynamic Binding?
  129.   2.4)  Is There A Difference Between Being A Member Or Instance Of A Class?
  130.   2.5)  What Is This I Read About ML And Functional Programming Languages?
  131.   2.6)  What Is the Difference Between Static And Dynamic Typing?
  132.   2.7)  What Is A Separation Between Type And Class (Representation)?
  133.   2.8)  What Are Generics And Templates?
  134.  
  135. SECTION 3:  GENERAL
  136.   3.1)  What Is The "Classical" Object-Oriented Paradigm?
  137.   3.2)  What Is The "Delegation/Prototyping" Object-Oriented Paradigm?
  138.   3.3)  Are There Any Other Object-Oriented Paradigms?
  139.   3.4)  What Are The Major Object-Oriented Programming Languages Today?
  140.   3.5)  What Are Object-Oriented Databases And Persistence?
  141.   3.6)  What Are Object-Oriented Operating Systems?
  142.   3.7)  What Are The Current Object-Oriented Methodologies?
  143.   3.8)  What Is The OMG/OMA/ORB/CORBA?
  144.   3.9)  Why Is Garbage Collection A Good Thing?
  145.   3.10) What Can I Do To Teach OO To The Kids?
  146.   3.11) What Is Available On Object-Oriented Testing?
  147.   3.12) What Distributed Systems Are Available?
  148.   3.13) What Is The MVC Framework?
  149.   3.14) What Is Real-Time?
  150.   3.15) What Is Available on OO Metrics?
  151.  
  152. SECTION 4:  COMMONLY ASKED LANGUAGE SPECIFIC QUESTIONS
  153.   4.1)  What Is Downcasting?
  154.   4.2)  What Are Virtual Functions?
  155.   4.3)  Can I Use Multiple-Polymorphism Or Multi-Methods In C++?
  156.   4.4)  Can I Use Dynamic Inheritance In C++?
  157.  
  158. ANNOTATED BIBLIOGRAPHY
  159.  
  160. APPENDIXES
  161.   APPENDIX A  VIPS
  162.   APPENDIX B  OBJECT-ORIENTED DATABASES AND VENDORS
  163.   APPENDIX C  OBJECT-ORIENTED LANGUAGES AND VENDORS
  164.   APPENDIX D  OBJECT-ORIENTED CASE (OOA/D/P TOOLS) AND VENDORS
  165.   APPENDIX E  ANONYMOUS FTP SITES
  166.   APPENDIX F  MAGAZINES, JOURNALS AND NEWSLETTERS
  167.  
  168. [Another appendix on miscellaneous commercial object-oriented systems should
  169.  be added soon for completeness]
  170.  
  171.  
  172. SECTION 1:  BASICS
  173. ==================
  174.  
  175. Suggested Readings:
  176.   [Booch 91, 94]
  177.   Others to be added...
  178.  
  179.  
  180. 1.1) What Is An Object?
  181. -----------------------
  182.  
  183. There are many definitions of an object, such as found in [Booch 91, p77]:
  184. "An object has state, behavior, and identity; the structure and behavior of
  185. similar objects are defined in their common class; the terms instance and
  186. object are interchangeable".  This is a "classical languages" definition, as
  187. defined in [Coplien 92, p280], where "classes play a central role in the
  188. object model", since they do not in prototyping/delegation languages.  
  189. "The term object was first formally applied in the Simula language, and
  190. objects typically existed in Simula programs to simulate some aspect of
  191. reality" [Booch 91, p77].  Other definitions referenced by Booch include
  192. Smith and Tockey: "an object represents an individual, identifiable item,
  193. unit, or entity, either real or abstract, with a well-defined role in the
  194. problem domain." and [Cox 91]: "anything with a crisply defined boundary"
  195. (in context, this is "outside the computer domain".  A more conventional
  196. definition appears on pg 54).  Booch goes on to describe these definitions
  197. in depth.  [Martin 92, p 241] defines: "An "object" is anything to which a
  198. concept applies", and "A concept is an idea or notion we share that applies
  199. to certain objects in our awareness".  [Rumbaugh 91] defines: "We define an
  200. object as a concept, abstraction or thing with crisp boundaries and meaning for
  201. the problem at hand." [Shlaer 88, p 14] defines: "An object is an abstraction
  202. of a set of real-world things such that:
  203.   * all of the real-world things in the set - the instances - have the same
  204.     characteristics
  205.   * all instances are subject to and conform to the same rules"
  206. and on identifying objects: "What are the *things* in this problem?  Most of
  207. the things are likely to fall into the following five categories: Tangible
  208. things, Roles, Incidents, Interactions, and Specifications."  [Booch 91, 4.3]
  209. covers "Identifying Key Abstractions" for objects and classes based on an
  210. understanding of the problem domain and [Jacobson 92] provides a novel approach
  211. to identifying objects through use-cases, leading to a use-case driven design.
  212. Jacobson also classifies objects into interface objects (e.g. GUI), entity
  213. objects (corresponding to real-world objects), and control objects (introduced
  214. in design).
  215.  
  216. The implementation of objects could roughly be categorized into descriptor-
  217. based, capability-based, and simple static-based approaches.  Descriptor-
  218. based approaches (e.g. Smalltalk handles) allow powerful dynamic typing, as
  219. do the capability-based approaches which are typically found in object-
  220. oriented databases and operating systems (object id's).  A "proxy" based
  221. approach with an added layer of indirection to Smalltalk's handles is found
  222. in Distributed Smalltalk which allows transparent, distributed, and migrating
  223. objects [Kim 89, ch 19 and Yaoqing 93].  Simple static approaches are found
  224. in languages such as C++, although the new RTTI facility will supply simple
  225. dynamic typing, which is also present in new versions of Eiffel.
  226.  
  227. Descriptor-based approaches can have pointer semantics and can be statically
  228. typeless (or just "typeless", as in Smalltalk) where references (variables)
  229. have no type, but the objects (values) they point to always do.  An untyped
  230. pointer (such as void* in C++) and an embedded dynamic typing scheme are used
  231. in more conventional languages to fully emulate this style of dynamically typed
  232. programming (see sections 2.3, 4.3, and [Coplien 92]).
  233.  
  234. Below is a simple example to show a most trivial case of OO implementation.
  235. It is primarily intended to introduce new terms.  See [Cardelli 85] for
  236. another semantic definition of OO using functions for methods and for
  237. a view of types as sets of values.
  238.  
  239. Simple statically-typed objects (static and auto vars and temps in C++ and
  240. expanded types in Eiffel) can be viewed as instances of a record type,
  241. whose record fields are called instance variables (Smalltalk) or member data
  242. (C++).  The record (class) may also contain operations which are called
  243. methods (Smalltalk) or member functions (C++) which are equivalent to a
  244. function taking an object of the record type, called the receiver, as the
  245. first parameter.  The receiver is called self (Smalltalk) or this (C++).
  246. Members will denote both instance variables and methods.  Inheritance is
  247. roughly equivalent to a loosely coupled variant record, with derived classes
  248. as variant parts and with multiple-inheritance concatenating several records
  249. to serve as a base.
  250.  
  251. A virtual member in statically typed languages is a base class member that can
  252. be set or respecified by a derived class.  This is roughly equivalent to a
  253. pointer or function pointer in the base class being set by the derived class.
  254. [Stroustrup 90] covers the implementation details of virtual member functions
  255. in C++, which also involve an offset for the receiver to handle multiple-
  256. inheritance.  This is an example of dynamic binding, which replaces a
  257. switch statement on variant parts with a single call, reducing code size
  258. and program complexity (fewer nested programming constructs) and allowing
  259. variants to be added without modifying client code (which causes higher defect
  260. injection rates during maintanance and debugging).
  261.  
  262. Virtual members in dynamically typed languages are more flexible because
  263. static typechecking requirements are dropped.  See section 2.5.
  264.  
  265. The terms method/member function, instance variable/member data, subclass/
  266. derived class, parent class/base class, and etc. will be used interchangeably.
  267. As pointed out in [Stroustrup 90, p197], the base/derived class terminology
  268. may be preferable to the sub/super-class terminology, and is preferred in
  269. this document also.
  270.  
  271. Delegation/prototyping languages [Kim 89, ch3; Ungar 87, Sciore 89] have a more
  272. flexible kind of object which can play the role of classes in classical OO
  273. languages.  Since there is no separate class construct in these languages, and
  274. only objects, they are referred to as single-hierarchy, or 1 Level systems.
  275. Objects contain fields, methods and delegates (pseudo parents), whereas
  276. classical object-oriented languages associate method, field and parent
  277. definitions with classes (and only associate state and class with objects,
  278. although vtables of function pointers for dynamic binding is an exception).
  279. However, one-level objects often play the role of classes to take advantage of
  280. sharing and often instances will simply delegate to parents to access methods
  281. or shared state, otherwise idiosyncratic objects, a powerful and natural
  282. concept, will result.  Typical 1 Level objects can contain any number of
  283. fields, methods and parents and any object can be used as a template/exemplar,
  284. thus performing the classical role of a class.  In typical prototyping systems,
  285. parents (as any other member) can be added or changed dynamically, providing
  286. dynamic multiple inheritance (or more typically simple delegation).  Here, the
  287. term "Prototype" usually refers to prototype theory, a recent theory of
  288. classification where any object can be inherited from or cloned to serve as a
  289. prototype for newly created instances.  [The Author also uses the term for
  290. languages providing high quality support for rapid prototyping, although this
  291. usage is atypical]  See [Booch 94, pp 154-155] for a brief discussion of
  292. prototype theory in the context of OOA and OOD.
  293.  
  294. It is common in such systems for an object to "become" another kind of object
  295. by changing its parent.  A good example is a window becoming an icon, since
  296. window and icon objects display different behavior (although cognitive
  297. differences are significant too:-)  Delegation refers to delegating the
  298. search for an attribute to a delegate, and is therefore more of a pure
  299. message passing mechanism (as with dynamic scoping) than inheritance, which
  300. also typically specifies non-shared state when used for representation.
  301.  
  302. Chambers has proposed an interesting variation called "Predicate Classes"
  303. [Chambers 93] as a part of his Cecil language.  These classes will only be
  304. parents when certain predicates are true.  This can support a types/classes
  305. as collections of objects view, which is the same as the types as sets of
  306. values view taken by [Cardelli 85].  [Martin 92] provides some examples of
  307. this view applied during OOA.
  308.  
  309. 1 level systems therefore provide the most flexible and powerful capabilities.
  310. Self is a good example of a delegation-based single hierarchy language [Ungar
  311. 87].
  312.  
  313.  
  314. 1.2)  What Is Object Encapsulation (Or Protection)?
  315. ---------------------------------------------------
  316.  
  317. [Booch 91, p. 45] defines: "Encapsulation is the process of hiding all of the
  318. details of an object that do not contribute to its essential characteristics."
  319.  
  320. [Coad 91, 1.1.2] defines: "Encapsulation (Information Hiding).  A principle,
  321. used when developing an overall program structure, that each component of a 
  322. program should encapsulate or hide a single design decision...  The interface
  323. to each module is defined in such a way as to reveal as little as possible
  324. about its inner workings.  [Oxford, 1986]"
  325.  
  326. Some languages permit arbitrary access to objects and allow methods to be
  327. defined outside of a class as in conventional programming.  Simula and
  328. Object Pascal provide no protection for objects, meaning instance variables
  329. may be accessed wherever visible.  CLOS and Ada allow methods to be defined
  330. outside of a class, providing functions and procedures.  While both CLOS
  331. and Ada have packages for encapsulation, CLOS's are optional while Ada's
  332. methodology clearly specifies class-like encapsulation (Adts).
  333.  
  334. However most object-oriented languages provide a well defined interface to
  335. their objects thru classes.  C++ has a very general encapsulation/protection
  336. mechanism with public, private and protected members.  Public members (member
  337. data and member functions) may be accessed from anywhere.  A Stack's Push and
  338. Pop methods will be public.  Private members are only accessible from within
  339. a class.  A Stack's representation, such as a list or array, will usually be
  340. private.  Protected members are accessible from within a class and also from
  341. within subclasses (also called derived classes).  A Stack's representation
  342. could be declared protected allowing subclass access.  C++ also allows a
  343. class to specify friends (other (sub)classes and functions), that can access
  344. all members (its representation).  Eiffel 3.0 allows exporting access to
  345. specific classes.
  346.  
  347. For another example, Smalltalk's class instance variables are not accessible
  348. from outside of their class (they are not only private, but invisible).
  349. Smalltalk's methods are all public (can be invoked from anywhere), but a
  350. private specifier indicates methods should not be used from outside of the
  351. class.  All Smalltalk instance variables can be accessed by subclasses, 
  352. helping with abstract classes and overriding.
  353.  
  354. Another issue is per-object or per-class protection.  Per-class protection
  355. is most common (e.g. Ada, C++, Eiffel), where class methods can access any
  356. object of that class and not just the receiver.  Methods can only access the
  357. receiver in per-object protection.  This supports a subtyping model, as any
  358. object other than the receiver is only satisfying an abstract type interface,
  359. whereby no method or object structure can be inferred in the general case.
  360.  
  361.  
  362. 1.3  What Is A Class?
  363. --------------------
  364.  
  365. A class is a general term denoting classification and also has a new meaning
  366. in object-oriented methods.  Within the OO context, a class is a specification
  367. of structure (instance variables), behavior (methods), and inheritance
  368. (parents, or recursive structure and behavior) for objects.  As pointed out
  369. above, classes can also specify access permissions for clients and derived
  370. classes, visibility and member lookup resolution.  This is a feature-based or
  371. intensional definition, emphasizing a class as a descriptor/constructor of
  372. objects (as opposed to a collection of objects, as with the more classical
  373. extensional view, which may begin the analysis process).
  374.  
  375. Original Aristotlean classification defines a "class" as a generalization of
  376. objects:
  377. [Booch 91, p93]
  378.   "a group, set, or kind marked by common attributes or a common attribute; a
  379.    group division, distinction, or rating based on quality, degree of
  380.    competence, or condition".
  381.    
  382. [Booch's definition in the context of OOD]
  383.   "A class is a set of objects that share a common structure and a common
  384.   behavior."  "A single object is simply an instance of a class."
  385.  
  386. The intension of a class is its semantics and its extension is its instances
  387. [Martin 92].
  388.  
  389. [Booch 94, 4.2] proposes 3 views of classification as useful in OO analysis and
  390. design: classical categorization (common properties), conceptual clustering
  391. (conceptual descriptions), and prototype theory (resemblance to an exemplar).
  392. He advocates starting with the former approach, turning to the second approach
  393. upon unsatisfactory results, and finally the latter if the first two approaches
  394. fail to suffice.
  395.  
  396.  
  397. 1.4)  What Is A Meta-Class?
  398. ---------------------------
  399.  
  400. [See also section 1.6]
  401.  
  402. A Meta-Class is a class' class.  If a class is an object, then that object
  403. must have a class (in classical OO anyway).  Compilers provide an easy way to
  404. picture Meta-Classes.  Classes must be implemented in some way; perhaps with
  405. dictionaries for methods, instances, and parents and methods to perform all
  406. the work of being a class.  This can be declared in a class named "Meta-Class".
  407. The Meta-Class can also provide services to application programs, such as
  408. returning a set of all methods, instances or parents for review (or even
  409. modification).  [Booch 91, p 119] provides another example in Smalltalk with
  410. timers.  In Smalltalk, the situation is more complex.  To make this easy, refer
  411. to the following listing, which is based on the number of levels of distinct
  412. instantiations:
  413.  
  414. 1 Level System
  415.   All objects can be viewed as classes and all classes can be viewed as
  416.   objects (as in Self).  There is no need for Meta-Classes because objects
  417.   describe themselves.  Also called "single-hierarchy" systems.
  418.   There is only 1 kind of object.
  419. 2 Level System
  420.   All Objects are instances of a Class but Classes are not accessible to
  421.   programs (no Meta-Class except for in the compiler and perhaps for type-safe
  422.   linkage, as in C++).
  423.   There are 2 kinds of distinct objects: objects and classes.
  424. 3 Level System
  425.   All objects are instances of a class and all classes are instances of
  426.   Meta-Class.  The Meta-Class is a class and is therefore an instance of
  427.   itself (really making this a 3 1/2 Level System).  This allows classes to
  428.   be first class objects and therefore classes are available to programs.
  429.   There are 2 kinds of distinct objects (objects and classes), with a
  430.   distinguished class, the metaclass.
  431. 5 Level System
  432.   What Smalltalk provides.  Like a 3 Level System, but there is an extra level
  433.   of specialized Meta-Classes for classes.  There is still a Meta-Class as in 
  434.   a 3 Level System, but as a class it also has a specialized Meta-Class, the
  435.   "Meta-Class class" and this results in a 5 Level System: 
  436.     object
  437.     class
  438.     class class (Smalltalk's Meta-Classes)
  439.     Meta-Class
  440.     Meta-Class class
  441.  
  442.   The "class class"es handle messages to classes, such as constructors and
  443.   "new", and also "class variables" (a term from Smalltalk), which are
  444.   variables shared between all instances of a class (static member data in
  445.   C++).  There are 3 distinct kinds of objects (objects, classes, and
  446.   metaclasses).
  447.  
  448.  
  449. 1.5)  What Is The Infinite Regress Of Objects And Classes?
  450. ----------------------------------------------------------
  451.  
  452. In the authors opinion, a myth.  The story goes an object is an instance of a
  453. class (Meta-Object), a class is an instance of a Meta-Class, which must also
  454. be an instance of a Meta-Meta-Class, which must also be an instance of a Meta-
  455. Meta-Meta-Class, ...  Closure can be achieved with an instance-of loop, as with
  456. a Meta-Class being an instance of itself or with a "Meta-Class - Meta-Class
  457. class" instance-of loop (as in Smalltalk).
  458.  
  459.  
  460. 1.6)  What Are MOPs And Reflection?
  461. -----------------------------------
  462.  
  463. MOP is an acronym for Meta-Object Protocol.  This is a system with
  464. Meta-Classes accessible to users [Kiczales 92, Paepcke 93].  In CLOS
  465. terminology, an introspective protocol provides a read only capability (e.g.
  466. what is this object's class, give info on this class, etc.) and an
  467. intercessory protocol provides a write capability which allows system
  468. modification (e.g. add the following method or instance to this class,
  469. perform inheritance this way, etc.).  Because inheritance can be used to
  470. perform differential changes, intercessory protocols allow users to not
  471. only define new frameworks but to specialize existing system frameworks
  472. differentially without affecting them and their extant objects.  Thus, many
  473. frameworks can interoperate together simultaneously.  This is a good example
  474. of object-oriented reuse, since the compiler itself is reused thru
  475. specialization to provide new frameworks.
  476.  
  477. "Reflective" systems are systems with MOPs (not to be confused with reflexive
  478. systems, which often refer to systems implemented in terms of themselves, or
  479. bootstrapped).  Reflective systems are inevitably reflexive (as are most
  480. quality compilers), providing a direct program interface to the system.
  481.  
  482.  
  483. 1.7)  What Is Inheritance?
  484. --------------------------
  485.  
  486. Inheritance provides a natural classification for kinds of objects and allows
  487. for the commonality of objects to be explicitly taken advantage of in modeling
  488. and constructing object systems.  Natural means we use concepts,
  489. classification, and generalization to understand and deal with the complexities
  490. of the real world.  See the example below using computers.
  491.  
  492. Inheritance is a relationship between classes where one class is the parent
  493. (base/superclass/ancestor/etc.) class of another.  Inheritance provides
  494. programming by extension (as opposed to programming by reinvention
  495. [LaLonde 90]) and can be used as an is-a-kind-of (or is-a) relationship or
  496. for differential programming.  Inheritance can also double for assignment
  497. compatibility (see section 2.7).
  498.  
  499. In delegation languages, such as Self, inheritance is delegation where objects
  500. refer to other objects to respond to messages (environment) and do not
  501. respecify state by default.
  502.  
  503. Inherited parents can specify various flavors of state.  Delegation languages
  504. don't specify new state by default (to do so requires cloning), C-based (C++,
  505. Objective-C, etc.), lisp-based (CLOS, Flavors, Scheme, etc.), and Pascal-based
  506. (Ada-9x, Modula-3, Object Pascal, etc.) OO languages do, but with multiple-
  507. inheritance can also share parents within a class lattice (CLOS and Eiffel
  508. provide this as a default at the level of slots and features, respectively).
  509.  
  510. Inheritance also provides for member lookup, or internal environment.  Various
  511. schemes exist, for example C++ finds the closest match within a scope but
  512. causes an ambiguity error iff more than one parent has match, CLOS creates
  513. a linear precedence list, Self provides parent priorities, and Eiffel forces
  514. renaming for any parent member conflicts.
  515.  
  516. Defining inheritance (with a thorough description or denotational semantic
  517. definition, or both) can avoid confusion about which inheritance scheme is
  518. being used (especially in OOD), because inheritance has many variations and
  519. combinations of state and environment (sometimes with complex rules).
  520. Inheritance can also be used for typing, where a type or class can be used to
  521. specify required attributes of a matching object (see sections 2.1, 2.7 and
  522. [Cardelli 85]).  It would be more judicious to have discussions on how
  523. inheritance should be defined instead of over what it is, since it has many
  524. existing uses and semantics.
  525.  
  526. An example of the is-a-kind-of relationship is shown below.  Is-a is often
  527. used synonymously, but can be used to show the "object is-a class"
  528. instantiation relationship.  In classical OO, inheritance is a relationship
  529. between classes only.  In one-level systems, is-a (object instantiation) and
  530. is-a-kind-of (inheritance) are merged into one [Ungar 87, Madsen 93, Sciore
  531. 89].
  532.  
  533.                                Computer
  534.                               /    |     \
  535.                        Mainframe  Mini    Personal
  536.                         /    \    ...       /   \
  537.                   Data Proc  Scientific   PC    Workstation
  538.  
  539. Class hierarchies are subjective [Booch 91, 4.2; Lakoff 87] and usually drawn
  540. with the parent class on top, but more demanding graphs (as is often the case
  541. in [Rumbaugh 91]) allow any topology, with the head of an arrow indicating the
  542. base class and the tail indicating the derived class.
  543.  
  544. Differential programming is the use of inheritance to reuse existing classes
  545. by making a small change to a class.  Creating a subclass to alter a method
  546. or to add a method to a parent class is an example.
  547.  
  548.  
  549. 1.8)  What Is Multiple Inheritance?
  550. -----------------------------------
  551.  
  552. Multiple Inheritance occurs when a class inherits from more than one parent.
  553. For example, a person is a mammal and an intellectual_entity, and a document
  554. may be an editable_item and a kind of literature.
  555.  
  556. Mixin's is a style of MI (from flavors) where a class is created to provide
  557. additional attributes or properties to other classes.  They are intended to be
  558. inherited by any class requiring them.  Method combination, or calling
  559. sequences of before, after, and around methods or even several primary methods
  560. [Kim 89, ch 4], make good use of mixins by invoking their methods without
  561. explicitly calling them, allowing client class code to remain unchanged [Booch
  562. 91, p 113].
  563.  
  564.  
  565. 1.9)  Does Multiple Inheritance Pose Any Additional Difficulties?
  566. -----------------------------------------------------------------
  567.  
  568. Yes, it does.  Any name can be simply resolved to a class member with single
  569. inheritance by simply accessing the first name encountered for data members
  570. and by accessing the first signature match (or ambiguity) encountered for
  571. methods (at least one way, C++ hides some member functions).  Since several
  572. distinct parents can declare a member within a multiple inheritance hierarchy,
  573. which to choose becomes an issue.  Eiffel forces derived classes to rename
  574. parent members that conflict.  Self prioritizes parents.  CLOS merges member
  575. "slots" (instance variables) with the same name into a single slot, as did
  576. the earlier flavors.  C++ declares an error iff a conflict arises, but a
  577. class qualifier can be used to explicitly disambiguate.  Smalltalk renders
  578. same names for instance variables of subclasses illegal.
  579.  
  580. On the other hand, multiple-inheritance can be seen as required for basic
  581. object-oriented programming, because many objects in the real world belong to
  582. several classes.  In classical systems without MI, a class which should inherit
  583. from more than one class must textually include all but one of those classes in
  584. its interface, causing code duplication (and a messy interface).
  585.  
  586.  
  587. 1.10)  What Is Dynamic Inheritance?
  588. -----------------------------------
  589.  
  590. Dynamic inheritance allows objects to change and evolve over time.  Since base
  591. classes provide properties and attributes for objects, changing base classes
  592. changes the properties and attributes of a class.  A previous example was a
  593. window changing into an icon and then back again, which involves changing a
  594. base class between a window and icon class.
  595.  
  596. More specifically, dynamic inheritance refers to the ability to add, delete,
  597. or change parents from objects (or classes) at run-time.  Actors, CLOS, and
  598. Smalltalk provide dynamic inheritance in some form or other.  Single hierarchy
  599. systems, such as Self, provide dynamic inheritance in the form of delegation
  600. [Ungar 87].
  601.  
  602. See also [Kim 89, chs 1, 3] for a discussion and [Coplien 92] for some
  603. implementation discussion in C++.
  604.  
  605.  
  606. 1.11)  What Is Shared (Repeated) Inheritance?
  607. ---------------------------------------------
  608.  
  609. Multiple Inheritance brings up the possibility for a class to appear as a
  610. parent more than once in a class graph (repeated inheritance), and there is
  611. then a potential to share that class.  Only one instance of the class will
  612. then appear in the graph (as is always the case in CLOS, because all *members*
  613. with the same name will be shared (receive a single slot) with the greatest
  614. common subtype as its type).  C++ provides an alternative, where only parents
  615. specified as virtual (virtual bases) are shared within the same class lattice,
  616. allowing both shared and non-shared occurrences of a parent to coexist.  All
  617. "features" in Eiffel (C++ members) of a repeated parent that are not to be
  618. shared must be renamed "along an inheritance path", else they are shared by
  619. default.  This allows a finer granularity of control and consistent name
  620. resolution but requires more work for parents with many features.
  621.  
  622.  
  623. 1.12)  Why Use Inheritance?
  624. ---------------------------
  625.  
  626. Inheritance is a natural way to model the world or a domain of discourse,
  627. and so provides a natural model for OOA and OOD (and even OOP).  This is
  628. common in the AI domain, where semantic nets use inheritance to understand
  629. the world by using classes and concepts for generalization and categorization,
  630. by reducing the real-world's inherent complexity.
  631.  
  632. Inheritance also provides for code and structural reuse.  In the above Computer
  633. class diagram, all routines and structure available in class Computer are
  634. available to all subclasses throughout the diagram.  All attributes available
  635. in Personal computers are also available to all of its subclasses.  This kind
  636. of reuse takes advantage of the is-a-kind-of relationship.  Class libraries
  637. also allow reuse between applications, potentially allowing order-of-magnitude
  638. increases in productivity and reductions in defect rates (program errors),
  639. as library classes have already been tested and further use provides further
  640. testing providing even greater reliability.
  641.  
  642. With differential programming, a class does not have to be modified if it is
  643. close to what's required; a derived class can be created to specialize it.
  644. This avoids code redundancy, since code would have to be copied and modified
  645. otherwise.  See [Raj 89] for an alternative approach as found in Jade.
  646.  
  647. Polymorphism is often explicitly available in many OO languages (such as C++,
  648. CLOS, Eiffel, etc.) based on inheritance when type and class are bound together
  649. (typing based on subclassing, or subclass polymorphism), since only an object
  650. which is a member of (inherits from) a class is polymorphically assignment
  651. compatible with (can be used in place of) instances or references of that
  652. class.  Such assignment can result in the loss of an object's dynamic type in
  653. favor of a static type (or even loss of an object's representation to that of
  654. the static class, as in C++ slicing).  Maintaining the dynamic type of objects
  655. can be provided (and preferred); however, C++ provides both sliced and non-
  656. sliced replacement in a statically typed environment (see section 2.1).
  657.  
  658.  
  659. 1.13)  Why Don't Some People Like Inheritance?
  660. ----------------------------------------------
  661.  
  662. Some people complain that inheritance is hierarchical (which is what most
  663. object-oriented languages provide).  They would also like to see more
  664. operations available (set operations are quite common in specialized systems).
  665. The former is a kind of language dependent feature commonly found in object-
  666. oriented languages which are then associated with the term "inheritance"
  667. (although they don't need to be.  For example, delegation languages allow graph
  668. inheritance stuctures).  Some don't like the coupling of classes (as in Jade),
  669. but in the author's opinion many of their complaints are easily answered.  In
  670. systems that provide inheritance, inheritance provides a simple and elegant way
  671. to reuse code and to model the real world in a meaningful way.
  672.  
  673. Others complain multiple inheritance is too complicated because it brings up
  674. the issues of shared bases and member conflict resolution.  But most modern
  675. systems support Multiple Inheritance by employing semantic resolution
  676. strategies or renaming, and most consider MI to be highly desirable.  See the
  677. latter part of section 1.9 for an example of why MI is important.
  678.  
  679. Some prefer association to MI, claiming "roles" (as defined in [Rumbaugh 91])
  680. should be associations and inheritance should be reserved for a single
  681. hierarchy "creation" mechanism, however this loses polymorphism and loses the
  682. use of inheritance for typical classification.  Representation "roles" can be
  683. supported by dynamic multiple inheritance (DMI) in many situations.
  684.  
  685.  
  686. 1.14)  What Is Specialization/Generalization/Overriding?
  687. --------------------------------------------------------
  688.  
  689. To create a subclass is specialization, to factor out common parts of
  690. derived classes into a common base (or parent) is generalization [Booch 91,
  691. p56].  Overriding is the term used in Smalltalk and C++ for redefining a
  692. (virtual in Simula and C++) method in a derived class, thus providing
  693. specialized behavior.  All routines in Smalltalk are overridable and non-
  694. "frozen" features in Eiffel can be "redefined" in a derived class.  Whenever
  695. a method is invoked on an object of the base class, the derived class method
  696. is executed overriding the base class method, if any.  Overriding in Simula
  697. is a combination of overloading and multiple-polymorphism because parameters do
  698. not have to be declared.  Eiffel and BETA are examples of languages allowing
  699. any member to be redefined and not just methods, as is typical.
  700.  
  701.  
  702. 1.15)  What Is The Difference Between Object-Based And Object-Oriented?
  703. -----------------------------------------------------------------------
  704.  
  705. Object-Based Programming usually refers to objects without inheritance
  706. [Cardelli 85] and hence without polymorphism, as in '83 Ada and Modula-2.
  707. These languages support abstract data types (Adts) and not classes, which
  708. provide inheritance and polymorphism.  Ada-9x and Modula-3; however, support
  709. both inheritance and polymorphism and are object-oriented.  [Cardelli 85, p481]
  710. state "that a language is object-oriented if and only if it satisfies the
  711. following requirements:
  712.  
  713.   - It supports objects that are data abstractions with an interface of named
  714.     operations and a hidden local state.
  715.   - Objects have an associated type.
  716.   - Types may inherit attributes from supertypes.
  717.  
  718.   object-oriented = data abstractions + object types + type inheritance
  719.  
  720. These definitions are also found in [Booch 91, Ch2 and Wegner 87].
  721.  
  722. [Coad 91] provides another model:
  723.  
  724.   Object-Oriented = Classes and Objects 
  725.                     + Inheritance 
  726.                     + Communication with messages
  727.  
  728. Stroustrup's first edition of [Stroustrup 91, '86 p. 37] defines object based
  729. as: "... storing type identification in each object, brings us to a style of
  730. programming often referred to as "object based"", which is quite different
  731. from C+W's.
  732.  
  733. A more modern definition of "object-oriented" includes single-hierarchy
  734. languages and perhaps object id's for unique objects.  Object id's support the
  735. modern notion of relocatable, persistent and distributed objects that can
  736. even migrate across machines.  Distributed Smalltalk's proxy objects [Kim 89,
  737. ch 19 and Yaoqing 93] provide another example of a distributable and migratable
  738. object facility.  Separate type system support is another extension.
  739.  
  740. [Booch 94, 2.2] proposes 7 "Elements of the Object Model"; 4 major and 3 minor:
  741.   Major:
  742.     Abstraction
  743.     Encapsulation
  744.     Modularity
  745.     Hierarchy  (Inheritance)
  746.   Minor:
  747.     Typing
  748.     Concurrency
  749.     Persistence
  750.  
  751.  
  752. 1.16)  Is A Class An Object?
  753. ----------------------------
  754.  
  755. In C++ no, because C++ classes are not instances of an accessible class (a
  756. Meta-Class) and because C++ classes are not accessible to programs.  Classes
  757. are objects in 3 Level Systems and above because classes are instances of
  758. meta-classes.  But classes play a dual role, because objects can only be
  759. declared to be instances of a class (and class objects instances of a
  760. meta-class).  In 1 Level (single-hierarchy) systems, all classes are objects.
  761.  
  762.  
  763. 1.17)  Is An Object A Class?
  764. ----------------------------
  765.  
  766. In a Level 3 System and above yes, but only instances of a Meta-Class are
  767. Classes.  Instances of a Class (ordinary objects) are not classes (excluding
  768. hybrid systems).  However, all objects may be classes in single hierarchy
  769. systems, since any object may act as a class (provide object instantiation or
  770. act as a shared parent).
  771.  
  772.  
  773. 1.18)  What Is A Method? (And Receiver And Message)
  774. ---------------------------------------------------
  775.  
  776. A method implements behavior, which is defined by [Booch 91, p80]:
  777.  
  778.   Behavior is how an object acts and reacts, in terms of its state changes
  779.   and message passing.
  780.  
  781. A method is a function or procedure which is defined in a class and typically
  782. can access the internal state of an object of that class to perform some
  783. operation.  It can be thought of as a procedure with the first parameter as
  784. the object to work on.  This object is called the receiver, which is the object
  785. the method operates on.  An exception exists with C++'s static member functions
  786. which do not have a receiver, or "this" pointer.  The following are some common
  787. notations for invoking a method, and this invocation can be called a message
  788. (or message passing, see below):
  789.  
  790.   receiver.message_name(a1, a2, a3)   
  791.   receiver message_name: a1 parm1: a2 parm3: a3
  792.  
  793. Selector would be another good choice for message_name in the above examples,
  794. although keywords (or formal parameter names, like named parameters) are
  795. considered part of the selector in Smalltalk (and hence Objective-C).
  796.  
  797. If done statically, this can be referred to as invocation, and message passing
  798. if done dynamically (true dynamic binding).  Statically typed dynamic binding
  799. (e.g. C++ and Eiffel) is really in between (checked function pointers).
  800.  
  801. See also section 1.19 below for a discussion on the functional (prefix) verses
  802. message based (receiver based) notation.
  803.  
  804.  
  805. 1.19)  What Are Multi-Methods And Multiple-Polymorphism?
  806. --------------------------------------------------------
  807.  
  808. Multi-methods involve two primary concepts, multiple-polymorphism and lack of
  809. encapsulation.  These issues are orthogonal.  Multiple-polymorphism implies
  810. more than one parameter can be used in the selection of a method.  Lack of
  811. encapsulation implies all arguments can be accessed by a multi-method (although
  812. packages can be used to restrict access, as in CLOS).  Multi-methods can also
  813. imply a functional prefix notation, although the CLOS designers (who coined the
  814. term "multi-method") consider the functional and receiver based forms
  815. (messages) equivalent.  Functional syntax was chosen "in order to minimize the
  816. number of new mechanisms added to COMMON LISP" [Kim ch 4, p70 (D. Moon)].
  817. [Chambers 93] discusses multi-methods in his new OO language, Cecil.
  818.  
  819. Multiple-polymorphism allows specialized functions or methods to be defined to
  820. handle various cases:
  821.  
  822.   +(int, int)
  823.   +(int, float)
  824.   +(int, complex)
  825.   +(int, real)
  826.   +(float, complex)
  827.   +(float, real)
  828.   +(float, float)
  829.  
  830. The above functions are specialized to each of the cases required allowing
  831. single, highly cohesive and loosely coupled functions to be defined.  This is
  832. also the true essence of object-oriented polymorphism, which allows objects to
  833. define methods for each specific case desired.  In addition to better coupling
  834. and cohesion, multiple-polymorphism reduces program complexity by avoiding
  835. coding logic (switch statements) and because small methods further reduce
  836. complexity, as code complexity doesn't grow linearly with lines of code per
  837. method, but perhaps exponentially.  This should be distinguished from double
  838. dispatch, a fancy name for single dispatch after a call, which only provides
  839. switching on a single argument per call (but for 2 levels), consistently
  840. ignoring the inherent type of parameters in messaging.  Double dispatch is
  841. used in languages with static typing for simplicity and efficiency
  842. considerations.
  843.  
  844. If all of the above types are Numbers, code can be written without concern for
  845. the actual classes of objects present:
  846.  
  847.   fn(one, two: Number): Number
  848.     return one + two;
  849.  
  850. The addition expression above will invoke the correct "+" function based on the
  851. inherent (true, actual, or dynamic) types of one and two.  Only the inherent
  852. type of "one" would be used with double dispatch!  In the author's opinion,
  853. this is a serious shortcoming.  Further, double dispatch would only allow
  854. switching to the "fn" function based on the type of "one" also.  This could
  855. lead to the use of switch statements based on type or complex coding in many
  856. real-world programming situations, unnecessarily.  In the author's opinion,
  857. this should only be used as necessary, e.g. if the implementation language
  858. doesn't support multiple-polymorphism and either efficiency considerations
  859. dominate and double dispatch can be suffered, or an embedded dynamic typing
  860. scheme is used.
  861.  
  862. Why do multi-methods allow open access to parameters?  It allows efficient
  863. handling, like C++ friends, usually by allowing representation details of more
  864. than one object to be exposed.  See [Kim ch 4, pp70-71 (D. Moon)] for an
  865. alternative explanation.  While open access can be useful in some cases, it
  866. typically isn't recommended as a general OO practice (see section 1.15, C+W's
  867. requirement 1 for OO languages and Section 1.2 on Encapsulation) and also
  868. violates subtype polymorphism, because only subclass polymorphism is based on
  869. representation and not type.
  870.  
  871. Polymorphic languages can be statically typed to provide strong type checking,
  872. efficiency, and to support a static programming idiom, but require restrictions
  873. in many cases, such as requiring overriding methods to have identical
  874. signatures with the methods they substitute (as in C++) or allowing covariant
  875. parameters but limiting base class usage (as in Eiffel).  If these restrictions
  876. are dropped, multiple-polymorphism results.  Thus a single overridable function
  877. declared in a base class may have several functions overriding it in a derived
  878. class differentiated only by their formal argument types.  This therefore
  879. requires both static and dynamic typing, because no formal argument
  880. differentiation is possible without static types, as in Smalltalk, and no
  881. actual argument differentiation is possible without dynamic types (as in C++
  882. and Eiffel).  See section 2.3 for another example of multiple-polymorphism.
  883.  
  884. There is some concern about the efficiency of run-time method selection as
  885. can occur with multiple-polymorphism (or even dynamic message passing).
  886. However, static analysis optimizations are commonly available in the
  887. literature, potentially providing a single static selection in many cases
  888. [See Agrawal 91, Chambers 92, Mugridge 91, and etc.].
  889.  
  890. But coupling the two cases of selector variables (as found in CLOS,
  891. Objective-C, and etc.) and several possible known selectors together with the
  892. general undecidability of dynamic types at compile-time renders dynamic typing
  893. and run-time selection (or checking) as unavoidable in the general case [a
  894. point often mistaken in comp.object.  E.g. simple statically/strongly typed
  895. multi-methods still require dynamic types!]
  896.  
  897. See [Booch 91], multiple-polymorphism, for a good CLOS example.
  898.  
  899.  
  900. 1.20)  What Is OOP?
  901. -------------------
  902.  
  903. OOP stands for Object-Oriented Programming, the usual programming/hacking and
  904. etc. most programmers think of.  Modern software engineering methodologies;
  905. however, consider OOP as the implementation/evolution of an OOD.
  906.  
  907.  
  908. 1.21)  What Is OOA/OOD (And Where Can I Get What I Need On It)?
  909. ---------------------------------------------------------------
  910.  
  911.   See also section 3.7, the Annotated Bibliography, and APPENDIX D.  The
  912.   classified bibliography in [Booch 94] also contains entries on OOA(B), OOD(F)
  913.   and OOP(G).
  914.  
  915. [Booch 91]
  916.   "In OOA, we seek to model the world by identifying the classes and objects
  917.   that form the vocabulary of the problem domain, and in OOD, we invent the
  918.   abstractions and mechanisms that provide the behavior that this model
  919.   requires."
  920.  
  921. [Coad 91]
  922.   "OOA is the challenge of understanding the problem domain, and then the
  923.   system's responsibilities in that light".
  924.   "To us, analysis is the study of a problem domain, leading to a specification
  925.   of externally observable behavior; a complete, consistent, and feasible
  926.   statement of what is needed; a coverage of both functional and quantified
  927.   operational characteristics (e.g. reliability, availability, performance)".
  928.   "Design.  The practise of taking a specification of externally available
  929.   behavior and adding details needed for actual computer system implementation,
  930.   including human interaction, task management, and data management details."
  931.  
  932. And on Domain Analysis:
  933.  
  934.   "Whereas OOA typically focuses upon one specific problem at a time, domain
  935.    analysis seeks to identify the classes and objects that are common to all
  936.    applications within a given domain, [...]".  - [Booch 91]
  937.  
  938.   [The following quotes on domain analysis are from [Berard 93]]
  939.  
  940.   "An investigation of a specific application area that seeks to identify the
  941.    operations, objects, and structures that commonly occur in software systems
  942.    within this area.  - Dan McNicholl
  943.  
  944.   "Systems analysis states what is done for a specific problem in a domain
  945.    while domain analysis states what can be done in a range of problems in a
  946.    domain.  ...A domain analysis is only useful in many similar systems are to
  947.    be built so that the cost of the domain analysis can be amortized over the
  948.    cost of all the systems.
  949.  
  950.    The key to reusable software is captured in domain analysis in that it
  951.    stresses the reusability of analysis and design, not code. - Jim Neighbors
  952.  
  953.   "The process of identifying, collecting, organizing, and representing the
  954.   relevant information in a domain based on the study of existing systems and
  955.   their development histories, knowledge captured from domain experts,
  956.   underlying theory, and emerging technology within the domain."  - Kang et al.
  957.  
  958.   Object-oriented domain analysis (OODA) seeks to identify reusable items
  959.   localized around objects, e.g., classes, instances, systems of interacting
  960.   objects, and kits [frameworks]. OORA analysts and OOD designers will
  961.   interact on a fairly frequent basis with the domain analysis effort.
  962.  
  963.  
  964. OOA and OOD stand for Object-Oriented Analysis and Object-Oriented Design,
  965. respectively.  OOA strives to understand and model, in terms of object-oriented
  966. concepts (objects and classes), a particular problem within a problem domain
  967. (from its requirements, domain and environment) from a user-oriented or domain
  968. expert's perspective and with an emphasis on modeling the real-world (the
  969. system and its context/(user-)environment).  The product, or resultant model,
  970. of OOA specifies a complete system and a complete set of requirements and
  971. external interface of the system to be built, often obtained from a domain
  972. model (e.g. FUSION), scenarios (Rumbaugh), or use-cases (Jacobson).
  973.  
  974. [Shlaer 88] is often credited as the first book on OOA, although their method
  975. adds OO techniques to the traditional structured analysis principles of Yourdon
  976. and Constantine. Their complete approach ([Shlaer 88, 92]) consists of
  977. information modeling and recursive design, or OOA/RD and represents a recent
  978. addition to the structured analysis family (as does Martin and Odell).
  979. [Yourdon 92] provides a critique, although may only refer to their earlier
  980. work.  Many other methodologies including Rumbaugh's OMT, Martin and Odell's
  981. OOA/D, and many others, also share common ground with SA and other existing
  982. analysis methodologies with such constructs as associations (E-R), functional
  983. models, and even DFD's.  Booch, Jacobson, and Wirfs-Brock are examples of OO
  984. methodologies representing a greater departure from the conventional
  985. "structured" techniques, with greater emphasis on objects.  OOram [Reenskaug
  986. 91] provides support and emphasis on types and roles as guiding principles,
  987. which is quite powerful.  [Booch 94] presents a methodology which is an
  988. evolutionary step beyond the first edition by incorporating a collection of the
  989. best features from several of the major OO methodologies, as does HP's new
  990. FUSION methodology.
  991.  
  992. The usual progression is from OOA to OOD to OOP (implementation) and this
  993. Universal Process Model roughly corresponds to the Waterfall Model [Royce 70].
  994. See [Humphrey 89] and [Yourdon 92] for a few of many discussions on software
  995. life-cycle models and their use.  Humphrey also details Worldy and Atomic
  996. Process Models for finer grained analysis and design in the Defined Process
  997. (see below) and discusses other alternatives to the task oriented models.  He
  998. also provides the following critisisms on the Waterfall Model which had led to
  999. Boehm's seminal work on the Spiral Model:
  1000.  
  1001.   * It does not adequately address changes
  1002.   * It assumes a relatively uniform and orderly sequence of development steps
  1003.   * It does not provide for such methods as rapid prototyping or advanced
  1004.     languages
  1005.  
  1006. Modern OO methodologies directly address these points and emphasize the
  1007. incremental, iterative, evolutionary, concurrent and situational nature of
  1008. software development.  [Boehm 86] presents a seminal spiral life-cycle model
  1009. with a risk-driven incremental prototyping approach.  [Booch 91, 6.1]
  1010. proposes a "round-trip gestalt" design with analyze-design iterations and
  1011. an overall system perspective and [Berard 93] proposes an (incremental)
  1012. "parallel-recursive design" with analyze-design-implement-test iterations.
  1013. [Coad 91b] presents the following development cycle breakdown:
  1014.  
  1015.   Waterfall-
  1016.     Analysis
  1017.     Design
  1018.     Programming
  1019.  
  1020.   Spiral-
  1021.     Analysis, prototyping, risk management
  1022.     Design, prototyping, risk management
  1023.     Programming, prototyping, risk management
  1024.     [Boehm, 1988]  
  1025.  
  1026.   Incremental-
  1027.     A little analysis
  1028.     A little design
  1029.     A little programming
  1030.     Repeat
  1031.     [Gilb, 1988]
  1032.  
  1033. [Author's note: The spiral model is often incremental and may waterfall if
  1034.  called for.]
  1035.  
  1036. Since classes and objects are used in all phases of the OO software life-cycle,
  1037. the process is often referred to as seamless, meaning there is no conceptual
  1038. gap between the phases as is often the case in other software development
  1039. methodologies, such as the analysis (DFD's) to design (structure charts) to
  1040. programming gaps found in traditional structured analysis and design.
  1041. Seamlessness together with naturalness is a big advantage for consistency.
  1042.  
  1043. A problem domain has many realizations, or differing OOAs.  An OOA has many
  1044. realizations, or differing OODs, but a similar notation is often used for
  1045. the two.  An OOD also has many realizations, or differing OOPs, but allows a
  1046. selection from among various languages for implementation (choosing the best
  1047. language to implement the design).  But some, such as Bjarne Stroustrup, don't
  1048. like OOA and OOD getting too far from OOP (implementation independent), for
  1049. fear that great discrepancies could occur between OOD and OOP by losing sight
  1050. of the implementation language, which in some cases is predetermined.  See also
  1051. [Stroustrup 91].
  1052.  
  1053. From a greater perspective, the SEI has developed the Capability Maturity Model
  1054. (CMM), a process-based TQM model for assessing the level of an organization's
  1055. software development and which is often required by government contractors
  1056. in the US [Humphrey 89].  The CMM also serves as a 5 level improvement process
  1057. by specifying steps for organizations to progress to the next level, ultimately
  1058. leading to statistical (process) control and sustained improvement.  Watts S.
  1059. Humphrey is now working on the Personal Software Process (PSP), a scaled down
  1060. version of the CMM for individuals to use.  Next should follow a team-based
  1061. software process (TSP?).
  1062.  
  1063.  Level 1: Initial:    Every project is handled differently; ad hoc and chaotic.
  1064.  Level 2: Repeatable: Every project is handled similarly.
  1065.  Level 3: Defined:    Standard processes are defined and used for all projects.
  1066.  Level 4: Managed:    A measurable basis for all improvements to the process.
  1067.  Level 5: Optimizing: Emphasis on defect prevention and optimizing/continually
  1068.                       improving the process.
  1069.  
  1070. See also:
  1071. Kitson, D.H. and Masters, S. "An Analysis of SEI Software Process Assessment
  1072. Results 1987-1991", CMU/SEI-92-TR-24
  1073.  
  1074. Humphrey, W., Snyder, T. and Willis, R. "Software Process Improvement at
  1075. Hughes Aircraft", IEEE Software, July 1991
  1076.  
  1077. Dion, R., "Elements of a Process Improvement Program," IEEE Software, July
  1078. 1992.
  1079.  
  1080. "Concepts on Measuring the Benefits of Software Process Improvement,"
  1081. CMU/SEI-93-TR-9.
  1082.  
  1083. See also [Yourdon 92], [Wilkie 93], and [Booch 94] for discussions on this
  1084. often cited model.  There is also an ISO 9000 (9001,9003) standard on software
  1085. quality and ami working group in Europe creating the SPICE standard, which is
  1086. similar work to the CMM.  To join the ami mailing list email to:
  1087.   ami-request@aut.alcatel.at 
  1088. with the following message: 
  1089.   subscribe firstname, lastname, e-mail address.
  1090.  
  1091. Object-Oriented Information Engineering's "Enterprise Modeling" [Martin 92],
  1092. also found in [Jacobson 92], and some recent business "reengineering" efforts
  1093. place information systems within an organizational perspective by modeling
  1094. entire organizations or a large part of them, with the information processing
  1095. system and software products development as integrated components.  [Yourdon
  1096. 92] even calls for "global modeling"!
  1097.  
  1098.  
  1099. 1.22)  Where Did Object-Orientation Come From?
  1100. ----------------------------------------------
  1101.  
  1102. Simula was the first object-oriented language providing objects, classes,
  1103. inheritance, and dynamic typing in 1967 (in addition to its Algol-60 subset).
  1104. It was intended as a conveyance of object-oriented design.  Simula 1 was a
  1105. simulation language, and the later general-purpose language Simula 67 is now
  1106. referred to as simply Simula.  Smalltalk was the next major contributor
  1107. including classes, inheritance, a high-powered graphical environment and a
  1108. powerful dynamic typing mechanism (although these existed to some extent in
  1109. Simula).  Self is somewhat of a Smalltalk-based next generation language, as is
  1110. BETA a followup to Simula (by its original designers).
  1111.  
  1112. [Meyer 88] contains a brief summary and history of Simula and Smalltalk, among
  1113. other OO languages.
  1114.  
  1115.  
  1116. 1.23)  What Are The Benefits Of Object-Orientation?
  1117. ---------------------------------------------------
  1118.  
  1119. Reuse, quality, an emphasis on modeling the real world (or a "stronger
  1120. equivalence" with the RW than other methodologies), a consistent and seamless
  1121. OOA/OOD/OOP package, naturalness (our "object concept"), resistance to change,
  1122. encapsulation and abstraction (higher cohesion/lower coupling), and etc.
  1123.  
  1124. On resistance to change, system objects change infrequently while processes
  1125. and procedures (top-down) are fequently changed, providing object-oriented
  1126. systems with more resilient system organization.
  1127.  
  1128. [Harmon 93]:
  1129.   Faster development
  1130.   Increased Quality
  1131.   Easier maintenance
  1132.   Enhanced modifiability
  1133.  
  1134. [Booch 94]:
  1135.   Exploit power of OOPs
  1136.   Reuse of software and designs, frameworks
  1137.   Systems more change resilient, evolvable
  1138.   Reduced development risks for complex systems, integration spread out
  1139.   Appeals to human cognition, naturalness
  1140.  
  1141.  
  1142. 1.24)  What Other FAQs Are Available?
  1143. -------------------------------------
  1144.  
  1145. FAQ's are cross-posted to news.answers and are archived on anonymous ftp from:
  1146.  
  1147.   rtfm.mit.edu:/pub/usenet        (also usenet-by-hierarchy, etc.)
  1148.  
  1149. rtfm archives several FAQs pertinent to OO (alternative/original sites are listed).
  1150.  
  1151.   comp.lang.ada         ajpo.sei.cmu.edu:public/comp-lang-ada/cla-faq[12]
  1152.   BETA FAQ              daimi.aau.dk:pub/beta/beta-language-faq.txt
  1153.   comp.lang.c++         sun.soe.clarkson.edu:pub/C++/FAQ [128.153.12.3]
  1154.   comp.lang.clos
  1155.   comp.lang.eiffel      ftp.cm.cf.ac.uk:/pub/eiffel/eiffel-faq
  1156.   comp.lang.oberon
  1157.   comp.lang.objective-c
  1158.   comp.lang.sather      ftp.ICSI.Berkeley.EDU:pub/sather [not on rtfm]
  1159.   comp.lang.scheme      ftp.think.com:/public/think/lisp/scheme-faq.text
  1160.   comp.lang.smalltalk   xcf.Berkeley.EDU:misc/smalltalk/FAQ/SmalltalkFAQ.entire
  1161.   comp.object           zaphod.uchicago.edu:/pub/comp.object-faq.1.0.5(.Z)
  1162.   comp.object.logic     ftp.cs.cmu.edu:(2)prg_1.faq,prg_2.faq  [128.2.206.173]
  1163.   comp.software-eng
  1164.  
  1165. Notes:
  1166.   1) xcf.Berkeley.EDU is 128.32.138.1
  1167.   2) /afs/cs.cmu.edu/project/ai-repository/ai/pubs/faqs/prolog/
  1168.   3) Beta FAQ www: http://www.daimi.aau.dk/~beta/beta-language-faq.html
  1169.      most current.  Email: info@mjolner.dk with body: send BETA beta-faq
  1170.  
  1171. See APPENDIX E, entry 60 for a CDROM with Internet FAQs.
  1172.  
  1173. A new C++ libraries FAQ is posted monthly to comp.lang.c++ and should be on
  1174. rtfm soon.  Contact cpplibs@trmphrst.demon.co.uk.  It contains anonymous ftp
  1175. sites and commercial libraries and may be merged with this FAQ soon.
  1176.  
  1177. Many FAQs are also available from mail-servers, however most can be accessed by
  1178. the rtfm mail-server.  Mail to mail-server@rtfm.mit.edu with help and index in
  1179. the body with no leading spaces and on separate lines for more information.
  1180.  
  1181. Example Unix Command (will retrieve this FAQ in about 26 pieces (and growing)):
  1182.   mail mail-server@rtfm.mit.edu
  1183.   Subject:
  1184.   send usenet/comp.object/*
  1185.  
  1186. There is also a great ftp site for sci.virtual-worlds on:
  1187.   stein.u.washington.edu (140.142.56.1)
  1188.           - home of sci.virtual-worlds, huge faq w/ great info!
  1189.           - if unable to use try ftp.u.washington.edu
  1190.           /public/virtual-worlds
  1191.  
  1192. [While vr may not be directly related to comp.object, it is most interesting!
  1193.    - The Author]
  1194.  
  1195.  
  1196. SECTION 2:  TYPING
  1197. ==================
  1198.  
  1199. There are many definitions of type (and class and related concepts).  Many
  1200. authors define the terms as applied by their particular approach or language,
  1201. however we shall proceed in the face of this diversity.
  1202.  
  1203.   References
  1204.     [Blair 89]          Some Typing Topics.
  1205.     [Booch 91]          Small Section on Typing.
  1206.     [Cardelli 85]       Discussion on Object-Oriented Typing.
  1207.     [Gunter 94]         Theoretical Aspects of Object-Oriented Programming.
  1208.     [Kim 89, ch1]       Discussion on Some Research Topics.
  1209.