home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / object-faq / part1 < prev    next >
Text File  |  1996-04-05  |  52KB  |  1,007 lines

  1. Newsgroups: comp.object,comp.answers,news.answers
  2. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!spool.mu.edu!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!news
  3. From: Bob Hathaway <rjh@geodesic.com>
  4. Subject: Comp.Object FAQ Version 1.0.9 (04-02) Part 1/13
  5. X-Nntp-Posting-Host: ford.uchicago.edu
  6. Message-ID: <Dp9q0A.9s8@midway.uchicago.edu>
  7. Followup-To: comp.object
  8. Summary: Frequently Asked Questions (FAQ) List and Available Systems For Object-Oriented Technology
  9. Sender: news@midway.uchicago.edu (News Administrator)
  10. Organization: Geodesic Systems
  11. References: <Dp9prv.92t@midway.uchicago.edu>
  12. Date: Wed, 3 Apr 1996 04:04:58 GMT
  13. Approved: news-answers-request@MIT.Edu
  14. Lines: 990
  15. Xref: senator-bedfellow.mit.edu comp.object:46929 comp.answers:17962 news.answers:68633
  16.  
  17. Archive-name: object-faq/part1
  18. Last-Modified: 04/02/96
  19. Version: 1.0.9
  20.  
  21.  
  22. COMP.OBJECT FAQ
  23. Version: 1.0.9
  24. Date:    4/2/96
  25.  
  26.  
  27. Author:
  28.   Bob Hathaway
  29.   Geodesic Systems, Inc.
  30.   Cyberdyne Systems Corporation
  31.   rjh@geodesic.com
  32.   http://www.geodesic.com/people/Bob
  33.   75027.1663@compuserve.com
  34.  
  35. Copyright 1992-1995  Bob Hathaway
  36. All rights reserved.
  37.  
  38. Permission is granted to freely copy and distribute this document but only
  39. with this full header attached and at no cost to others with the exception
  40. of a nominal distribution fee, if any.  No sale, resale or reprinting is
  41. granted without the explicit written permission of the author.
  42.  
  43.  
  44. Anonymous FTP Sites and Hypertext Server:
  45.   anonymous@zaphod.uchicago.edu:/pub/CompObj8.faq(.Z)     (128.135.72.61)
  46.   anonymous@rtfm.mit.edu:/pub/usenet/comp.object/*_Part_* (18.181.0.24 Tmp)
  47.   http://iamwww.unibe.ch/~scg/OOinfo/FAQ/index.html       (new IAM location)
  48.  
  49. Mail Server:  (See also section 1.24)
  50.   mail mail-server@rtfm.mit.edu
  51.   Subject:
  52.   send usenet/comp.object/*
  53.  
  54. Zaphod is preferred over rtfm for anonymous ftp retrieval, as it provides a
  55. single file.  Rtfm contains the FAQ as posted.
  56.  
  57. To use the hypertext system, see APPENDIX E, entries 27.
  58.  
  59. Comp.Object Archive:
  60.   A new and workable comp.object archive is now available on the www, with
  61.   much thanks to Markus A. Beckmann, beckmann@informatik.mathematik.uni-mainz.de.
  62. http://aaimzb.mathematik.uni-mainz.de/Personal/Mitarbeiter/comp.object.idx.html
  63.  
  64. Object Currents:
  65.   A related and free new on-line Object resource edited by yours truly:
  66. http://www.sigs.com/objectcurrents - Please take a look!
  67.  
  68. Contributors:  Per Abrahamsen, Margaret Burnett, Edwardo Casais, Stewart
  69.   Clamen, Dennis De Champeaux, Mike DeVaney, Eric Dujardin, Piercarlo Grandi,
  70.   Tim Harvey, Brian Henderson-Sellers, Urs Hoelzle, Paul Johnson, Bill
  71.   Kinnersley, Oscar Nierstrasz, James Odell, David Wheeler, Eoin Woods, and
  72.   many others whose contributions have helped this document to fulfull its
  73.   objective of bringing object-oriented concepts and systems to everyone.
  74.   
  75.   Special thanks to Object Systems, Geodesic Systems and Cyberdyne Systems for
  76.   providing the support and resources needed to make this effort possible.
  77.   Object Systems was primarily a "think tank" and producer of object-oriented
  78.   technologies, Geodesic Systems brings the latest in object-oriented theory
  79.   and technique to practical and widespread use, as does Cyberdyne.
  80.  
  81.   And to kick off the new Appendix G, Commercial OO Libraries and Systems, I'm
  82.   introducing our own new product (partly developed by me:-), the Great Circle
  83.   (TM) automatic memory management system for C and C++.  I've used it on
  84.   several of my own projects where it automatically fixed all memory leaks
  85.   instantly.
  86.   
  87.   New formatted and submitted entries for Appendix G are most welcome.
  88.  
  89. Objective:
  90.   In the spirit of other FAQs, to provide a simple document to answer the most
  91.   frequently asked and recurring questions and to allow new users to understand
  92.   frequently discussed topics and terms used in comp.object.   This should
  93.   bring new comp.object readers and/or writers to at least an introductory
  94.   level of comprehension as soon as possible.  Other goals (hopes) are to
  95.   provide a quick and current reference on available systems such as object-
  96.   oriented languages, CASE, OODB and etc. and to provide good references to
  97.   current and relevant OO systems, groups, texts and literature.
  98.  
  99. Disclaimer:
  100.   This document does not necessarily reflect the opinions of the author's or
  101.   any contributor's companies.  There are no explicit or implicit guarantees
  102.   implied by this document.
  103.  
  104. While object systems are a constantly changing and moving target with a broad
  105. diversity of often conflicting methodologies, constructs, terminologies,
  106. approaches, languages, implementations and etc. and comp.object has a wide
  107. diversity of readers and writers ranging from students, professors and
  108. researchers in academia to beginners, professionals, top-notch experts and
  109. leaders in industry with a broad range of experience and backgrounds ranging
  110. across many paradigms, this FAQ can certainly not aspire to satisfy all of them
  111. completely but instead attempts to provide the most well-rounded treatment of
  112. object-oriented concepts and realizations primarily from the mainstream and
  113. popular authors and systems and further to provide a collection of available
  114. systems and tools in the appendices.
  115.  
  116. Several improvements are planned for future FAQs, including a glossary.
  117.  
  118.  
  119. SECTION 1:  BASICS
  120.   1.1)  What Is An Object?
  121.   1.2)  What Is Object Encapsulation (Or Protection)?
  122.   1.3)  What Is A Class?
  123.   1.4)  What Is A Meta-Class?
  124.   1.5)  What Is The Infinite Regress Of Objects And Classes?
  125.   1.6)  What are MOPs and Reflection?
  126.   1.7)  What Is Inheritance?
  127.   1.8)  What Is Multiple Inheritance?
  128.   1.9)  Does Multiple Inheritance Pose Any Additional Difficulties?
  129.   1.10) What Is Dynamic Inheritance?
  130.   1.11) What Is Shared (Repeated) Inheritance?
  131.   1.12) Why Use Inheritance?
  132.   1.13) Why Don't Some People Like Inheritance?
  133.   1.14) What Is Specialization/Generalization/Overriding?
  134.   1.15) What Is The Difference Between Object-Based And Object-Oriented?
  135.   1.16) Is A Class An Object?
  136.   1.17) Is An Object A Class?
  137.   1.18) What Is A Method? (And Receiver And Message)
  138.   1.19) What Are Multi-Methods And Multiple-Polymorphism?
  139.   1.20) What Is OOP?
  140.   1.21) What Is OOA/OOD (And Where Can I Get What I Need On It)?
  141.   1.22) Where Did Object-Orientation Come From?
  142.   1.23) What Are The Benefits Of Object-Orientation?
  143.   1.24) What Other FAQs Are available?
  144.  
  145. SECTION 2:  TYPING
  146.   2.1)  What Is Polymorphism?
  147.   2.2)  What Does Polymorphism Boil Down To In OO Programming Languages?
  148.   2.3)  What Is Dynamic Binding?
  149.   2.4)  Is There A Difference Between Being A Member Or Instance Of A Class?
  150.   2.5)  What Is This I Read About ML And Functional Programming Languages?
  151.   2.6)  What Is the Difference Between Static And Dynamic Typing?
  152.   2.7)  What Is A Separation Between Type And Class (Representation)?
  153.   2.8)  What Are Generics And Templates?
  154.  
  155. SECTION 3:  GENERAL
  156.   3.1)  What Is The "Classical" Object-Oriented Paradigm?
  157.   3.2)  What Is The "Delegation/Prototyping" Object-Oriented Paradigm?
  158.   3.3)  Are There Any Other Object-Oriented Paradigms?
  159.   3.4)  What Are The Major Object-Oriented Programming Languages Today?
  160.   3.5)  What Are Object-Oriented Databases And Persistence?
  161.   3.6)  What Are Object-Oriented Operating Systems?
  162.   3.7)  What Are The Current Object-Oriented Methodologies?
  163.   3.8)  What Is The OMG/OMA/ORB/CORBA?
  164.   3.9)  Why Is Garbage Collection A Good Thing?
  165.   3.9b) Why is Garbage Collection Necessary For Object-Oriented Programming?
  166.   3.10) What Can I Do To Teach OO To The Kids?
  167.   3.11) What Is Available On Object-Oriented Testing?
  168.   3.12) What Distributed Systems Are Available?
  169.   3.13) What Is The MVC Framework?
  170.   3.14) What Is Real-Time?
  171.   3.15) What Is Available on OO Metrics?
  172.   3.16) What Are Visual Object-Oriented Programming Systems?
  173.   3.17) What Tutorials Are Available On Object-Oriented Concepts and Languages?
  174.  
  175. SECTION 4:  COMMONLY ASKED LANGUAGE SPECIFIC QUESTIONS
  176.   4.1)  What Is Downcasting?
  177.   4.2)  What Are Virtual Functions?
  178.   4.3)  Can I Use Multiple-Polymorphism Or Multi-Methods In C++?
  179.   4.4)  Can I Use Dynamic Inheritance In C++?
  180.  
  181. ANNOTATED BIBLIOGRAPHY
  182.  
  183. APPENDIXES
  184.   APPENDIX A  VIPS
  185.   APPENDIX B  OBJECT-ORIENTED DATABASES AND VENDORS
  186.   APPENDIX C  OBJECT-ORIENTED LANGUAGES AND VENDORS
  187.   APPENDIX D  OBJECT-ORIENTED CASE (OOA/D/P TOOLS) AND VENDORS
  188.   APPENDIX E  ANONYMOUS FTP SITES
  189.   APPENDIX F  MAGAZINES, JOURNALS AND NEWSLETTERS
  190.   APPENDIX G  COMMERCIAL OBJECT-ORIENTED LIBRARIES AND SYSTEMS
  191.  
  192. [Another appendix on commercial object-oriented class libraries should be
  193.  added soon]
  194.  
  195.  
  196. SECTION 1:  BASICS
  197. ==================
  198.  
  199. Suggested Readings:
  200.   [Booch 91, 94]
  201.   Others to be added...
  202.  
  203.  
  204. 1.1) What Is An Object?
  205. -----------------------
  206.  
  207. There are many definitions of an object, such as found in [Booch 91, p77]:
  208. "An object has state, behavior, and identity; the structure and behavior of
  209. similar objects are defined in their common class; the terms instance and
  210. object are interchangeable".  This is a "classical languages" definition, as
  211. defined in [Coplien 92, p280], where "classes play a central role in the
  212. object model", since they do not in prototyping/delegation languages.  
  213. "The term object was first formally applied in the Simula language, and
  214. objects typically existed in Simula programs to simulate some aspect of
  215. reality" [Booch 91, p77].  Other definitions referenced by Booch include
  216. Smith and Tockey: "an object represents an individual, identifiable item,
  217. unit, or entity, either real or abstract, with a well-defined role in the
  218. problem domain." and [Cox 91]: "anything with a crisply defined boundary"
  219. (in context, this is "outside the computer domain".  A more conventional
  220. definition appears on pg 54).  Booch goes on to describe these definitions
  221. in depth.  [Martin 92, p 241] defines: "An "object" is anything to which a
  222. concept applies", and "A concept is an idea or notion we share that applies
  223. to certain objects in our awareness".  [Rumbaugh 91] defines: "We define an
  224. object as a concept, abstraction or thing with crisp boundaries and meaning for
  225. the problem at hand." [Shlaer 88, p 14] defines: "An object is an abstraction
  226. of a set of real-world things such that:
  227.   * all of the real-world things in the set - the instances - have the same
  228.     characteristics
  229.   * all instances are subject to and conform to the same rules"
  230. and on identifying objects: "What are the *things* in this problem?  Most of
  231. the things are likely to fall into the following five categories: Tangible
  232. things, Roles, Incidents, Interactions, and Specifications."  [Booch 91, 4.3]
  233. covers "Identifying Key Abstractions" for objects and classes based on an
  234. understanding of the problem domain and [Jacobson 92] provides a novel approach
  235. to identifying objects through use-cases (scenarios), leading to a use-case
  236. driven design.  Jacobson also calls for managing complexity with specialized
  237. object categories [Jacobson 94]:
  238.   Ordinary Objects     - Typical OOPL objects
  239.   Use-Cases and Actors - Actors <--> Use-Cases <--> Object Model Objects
  240.   Megaobjects          - Composite objects (~ subsystems with inheritance)
  241.     Frameworks*(Typical) - Abstract MO meant for reuse and extension
  242.     Patterns** (Typical) - Framework-like, crsp. classes and comm patterns only
  243.   Application Objects  - In the Object Model
  244.     Interface            - E.g. GUI
  245.     Control              - Introduced in design for control purposes
  246.     Entity               - Correspond to real-world objects
  247.   Component Objects    - Utility and Implementation hiding objects
  248.     Utility              - Set, Array, ...
  249.     Impl. Hiding         - Distr. Arch., specific DBMS, OS
  250.  
  251.   Unrelated to Ivar Jacobson but relevant to the topic:
  252.   * There was a Software Frameworks Assoc. and magazine until last year, but
  253.     a review of their last conference is available by email thanks to Adam
  254.     Wildavsky, send requests to adamw@panix.com.
  255.   **There is a patterns mailing list, email: patterns-request@cs.uiuc.edu,
  256.       with the HEADING "subscribe".
  257.     See also st.cs.uiuc.edu for some info on patterns.
  258.     See also http://st-www.cs.uiuc.edu/users/patterns/patterns.html
  259.  
  260. The implementation of objects could roughly be categorized into descriptor-
  261. based, capability-based, and simple static-based approaches.  Descriptor-
  262. based approaches (e.g. Smalltalk handles) allow powerful dynamic typing, as
  263. do the capability-based approaches which are typically found in object-
  264. oriented databases and operating systems (object id's).  A "proxy" based
  265. approach with an added layer of indirection to Smalltalk's handles is found
  266. in Distributed Smalltalk which allows transparent, distributed, and migrating
  267. objects [Kim 89, ch 19 and Yaoqing 93].  Simple static approaches are found in
  268. languages such as C++, although the new RTTI facility will supply simple
  269. dynamic typing (checked downcasting) similar to those introduced by Eiffel
  270. in 1989 through the notion of assignment attempt, also known as type narrowing.
  271.  
  272. Descriptor-based approaches can have pointer semantics and can be statically
  273. typeless (or just "typeless", as in Smalltalk) where references (variables)
  274. have no type, but the objects (values) they point to always do.  An untyped
  275. pointer (such as void* in C++) and an embedded dynamic typing scheme are used
  276. in more conventional languages to fully emulate this style of dynamically typed
  277. programming (see sections 2.3, 4.3, and [Coplien 92]).
  278.  
  279. Below is a simple example to show a most trivial case of OO implementation.
  280. It is primarily intended to introduce new terms.  See [Cardelli 85] for
  281. another semantic definition of OO using functions for methods and for
  282. a view of types as sets of values.
  283.  
  284. Simple statically-typed objects (static and auto vars and temps in C++ and
  285. expanded types in Eiffel) can be viewed as instances of a record type,
  286. whose record fields are called instance variables (Smalltalk) or member data
  287. (C++).  The record (class) may also contain operations which are called
  288. methods (Smalltalk) or member functions (C++) which are equivalent to a
  289. function taking an object of the record type, called the receiver, as the
  290. first parameter.  The receiver is called self (Smalltalk) or this (C++).
  291. Members will denote both instance variables and methods.  Inheritance is
  292. roughly equivalent to a loosely coupled variant record, with derived classes
  293. as variant parts and with multiple-inheritance concatenating several records
  294. to serve as a base.
  295.  
  296. A virtual member in statically typed languages is a base class member that can
  297. be set or respecified by a derived class.  This is roughly equivalent to a
  298. pointer or function pointer in the base class being set by the derived class.
  299. [Stroustrup 90] covers the implementation details of virtual member functions
  300. in C++, which also involve an offset for the receiver to handle multiple-
  301. inheritance.  This is an example of dynamic binding, which replaces a
  302. switch statement on variant parts with a single call, reducing code size
  303. and program complexity (fewer nested programming constructs) and allowing
  304. variants to be added without modifying client code (which causes higher defect
  305. injection rates during maintanance and debugging).
  306.  
  307. Virtual members in dynamically typed languages are more flexible because
  308. static typechecking requirements are dropped.  See section 2.5.
  309.  
  310. The terms method/member function, instance variable/member data, subclass/
  311. derived class, parent class/base class, and etc. will be used interchangeably.
  312. As pointed out in [Stroustrup 90, p197], the base/derived class terminology
  313. may be preferable to the sub/super-class terminology, and is preferred in
  314. this document also.
  315.  
  316. Delegation/prototyping languages [Kim 89, ch3; Ungar 87, Sciore 89] have a more
  317. flexible kind of object which can play the role of classes in classical OO
  318. languages.  Since there is no separate class construct in these languages, and
  319. only objects, they are referred to as single-hierarchy, or 1 Level systems.
  320. Objects contain fields, methods and delegates (pseudo parents), whereas
  321. classical object-oriented languages associate method, field and parent
  322. definitions with classes (and only associate state and class with objects,
  323. although vtables of function pointers for dynamic binding are an exception).
  324. However, one-level objects often play the role of classes to take advantage of
  325. sharing and often instances will simply delegate to parents to access methods
  326. or shared state, otherwise idiosyncratic objects, a powerful and natural
  327. concept, will result.  Typical 1 Level objects can contain any number of
  328. fields, methods and parents and any object can be used as a template/exemplar,
  329. thus performing the classical role of a class.  In typical prototyping systems,
  330. parents (as any other member) can be added or changed dynamically, providing
  331. dynamic multiple inheritance (or more typically simple delegation).  Here, the
  332. term "Prototype" usually refers to prototype theory, a recent theory of
  333. classification where any object can be inherited from or cloned to serve as a
  334. prototype for newly created instances.  [The Author also uses the term for
  335. languages providing high quality support for rapid prototyping, although this
  336. usage is atypical]  See [Booch 94, pp 154-155] for a brief discussion of
  337. prototype theory in the context of OOA and OOD.
  338.  
  339. It is common in such systems for an object to "become" another kind of object
  340. by changing its parent.  A good example is a window becoming an icon, as
  341. window and icon objects display different behavior (although cognitive
  342. differences are significant too:-)  Delegation refers to delegating the
  343. search for an attribute to a delegate, and is therefore more of a pure
  344. message passing mechanism (as with dynamic scoping) than inheritance, which
  345. also typically specifies non-shared state when used for representation.
  346.  
  347. Chambers has proposed an interesting variation called "Predicate Classes"
  348. [Chambers 93] as a part of his Cecil language.  These classes will only be
  349. parents when certain predicates are true.  This can support a types/classes
  350. as collections of objects view, which is the same as the types as sets of
  351. values view taken by [Cardelli 85].  [Martin 92] provides some examples of
  352. this view applied during OOA.
  353.  
  354. 1 level systems therefore provide the most flexible and powerful capabilities.
  355. Self is a good example of a delegation-based single hierarchy language [Ungar
  356. 87].
  357.  
  358.  
  359. 1.2)  What Is Object Encapsulation (Or Protection)?
  360. ---------------------------------------------------
  361.  
  362. [Booch 91, p. 45] defines: "Encapsulation is the process of hiding all of the
  363. details of an object that do not contribute to its essential characteristics."
  364.  
  365. [Coad 91, 1.1.2] defines: "Encapsulation (Information Hiding).  A principle,
  366. used when developing an overall program structure, that each component of a 
  367. program should encapsulate or hide a single design decision...  The interface
  368. to each module is defined in such a way as to reveal as little as possible
  369. about its inner workings.  [Oxford, 1986]"
  370.  
  371. Some languages permit arbitrary access to objects and allow methods to be
  372. defined outside of a class as in conventional programming.  Simula and
  373. Object Pascal provide no protection for objects, meaning instance variables
  374. may be accessed wherever visible.  CLOS and Ada allow methods to be defined
  375. outside of a class, providing functions and procedures.  While both CLOS
  376. and Ada have packages for encapsulation, CLOS's are optional while Ada's
  377. methodology clearly specifies class-like encapsulation (Adts).
  378.  
  379. However most object-oriented languages provide a well defined interface to
  380. their objects thru classes.  C++ has a very general encapsulation/protection
  381. mechanism with public, private and protected members.  Public members (member
  382. data and member functions) may be accessed from anywhere.  A Stack's Push and
  383. Pop methods will be public.  Private members are only accessible from within
  384. a class.  A Stack's representation, such as a list or array, will usually be
  385. private.  Protected members are accessible from within a class and also from
  386. within subclasses (also called derived classes).  A Stack's representation
  387. could be declared protected allowing subclass access.  C++ also allows a
  388. class to specify friends (other (sub)classes and functions), that can access
  389. all members (its representation).  Eiffel 3.0 allows exporting access to
  390. specific classes.
  391.  
  392. For another example, Smalltalk's class instance variables are not accessible
  393. from outside of their class (they are not only private, but invisible).
  394. Smalltalk's methods are all public (can be invoked from anywhere), but a
  395. private specifier indicates methods should not be used from outside of the
  396. class.  All Smalltalk instance variables can be accessed by subclasses, 
  397. helping with abstract classes and overriding.
  398.  
  399. Another issue is per-object or per-class protection.  Per-class protection
  400. is most common (e.g. Ada, C++, Eiffel), where class methods can access any
  401. object of that class and not just the receiver.  Methods can only access the
  402. receiver in per-object protection.  This supports a subtyping model, as any
  403. object other than the receiver is only satisfying an abstract type interface,
  404. whereby no method or object structure can be inferred in the general case.
  405.  
  406.  
  407. 1.3  What Is A Class?
  408. --------------------
  409.  
  410. A class is a general term denoting classification and also has a new meaning
  411. in object-oriented methods.  Within the OO context, a class is a specification
  412. of structure (instance variables), behavior (methods), and inheritance
  413. (parents, or recursive structure and behavior) for objects.  As pointed out
  414. above, classes can also specify access permissions for clients and derived
  415. classes, visibility and member lookup resolution.  This is a feature-based or
  416. intensional definition, emphasizing a class as a descriptor/constructor of
  417. objects (as opposed to a collection of objects, as with the more classical
  418. extensional view, which may begin the analysis process).
  419.  
  420. Original Aristotlean classification defines a "class" as a generalization of
  421. objects:
  422. [Booch 91, p93]
  423.   "a group, set, or kind marked by common attributes or a common attribute; a
  424.    group division, distinction, or rating based on quality, degree of
  425.    competence, or condition".
  426.    
  427. [Booch's definition in the context of OOD]
  428.   "A class is a set of objects that share a common structure and a common
  429.   behavior."  "A single object is simply an instance of a class."
  430.  
  431. The intension of a class is its semantics and its extension is its instances
  432. [Martin 92].
  433.  
  434. [Booch 94, 4.2] proposes 3 views of classification as useful in OO analysis and
  435. design: classical categorization (common properties), conceptual clustering
  436. (conceptual descriptions), and prototype theory (resemblance to an exemplar).
  437. He advocates starting with the former approach, turning to the second approach
  438. upon unsatisfactory results, and finally the latter if the first two approaches
  439. fail to suffice.
  440.  
  441.  
  442. 1.4)  What Is A Meta-Class?
  443. ---------------------------
  444.  
  445. [See also section 1.6]
  446.  
  447. A Meta-Class is a class' class.  If a class is an object, then that object
  448. must have a class (in classical OO anyway).  Compilers provide an easy way to
  449. picture Meta-Classes.  Classes must be implemented in some way; perhaps with
  450. dictionaries for methods, instances, and parents and methods to perform all
  451. the work of being a class.  This can be declared in a class named "Meta-Class".
  452. The Meta-Class can also provide services to application programs, such as
  453. returning a set of all methods, instances or parents for review (or even
  454. modification).  [Booch 91, p 119] provides another example in Smalltalk with
  455. timers.  In Smalltalk, the situation is more complex.  To make this easy, refer
  456. to the following listing, which is based on the number of levels of distinct
  457. instantiations:
  458.  
  459. 1 Level System
  460.   All objects can be viewed as classes and all classes can be viewed as
  461.   objects (as in Self).  There is no need for Meta-Classes because objects
  462.   describe themselves.  Also called "single-hierarchy" systems.
  463.   There is only 1 kind of object.
  464. 2 Level System
  465.   All Objects are instances of a Class but Classes are not accessible to
  466.   programs (no Meta-Class except for in the compiler and perhaps for type-safe
  467.   linkage, as in C++).
  468.   There are 2 kinds of distinct objects: objects and classes.
  469. 3 Level System
  470.   All objects are instances of a class and all classes are instances of
  471.   Meta-Class.  The Meta-Class is a class and is therefore an instance of
  472.   itself (really making this a 3 1/2 Level System).  This allows classes to
  473.   be first class objects and therefore classes are available to programs.
  474.   There are 2 kinds of distinct objects (objects and classes), with a
  475.   distinguished class, the metaclass.
  476. 5 Level System
  477.   What Smalltalk provides.  Like a 3 Level System, but there is an extra level
  478.   of specialized Meta-Classes for classes.  There is still a Meta-Class as in 
  479.   a 3 Level System, but as a class it also has a specialized Meta-Class, the
  480.   "Meta-Class class" and this results in a 5 Level System: 
  481.     object
  482.     class
  483.     class class (Smalltalk's Meta-Classes)
  484.     Meta-Class
  485.     Meta-Class class
  486.  
  487.   The "class class"es handle messages to classes, such as constructors and
  488.   "new", and also "class variables" (a term from Smalltalk), which are
  489.   variables shared between all instances of a class (static member data in
  490.   C++).  There are 3 distinct kinds of objects (objects, classes, and
  491.   metaclasses).
  492.  
  493.  
  494. 1.5)  What Is The Infinite Regress Of Objects And Classes?
  495. ----------------------------------------------------------
  496.  
  497. In the authors opinion, a myth.  The story goes an object is an instance of a
  498. class (Meta-Object), a class is an instance of a Meta-Class, which must also
  499. be an instance of a Meta-Meta-Class, which must also be an instance of a Meta-
  500. Meta-Meta-Class, ...  Closure can be achieved with an instance-of loop, as with
  501. a Meta-Class being an instance of itself or with a "Meta-Class - Meta-Class
  502. class" instance-of loop (as in Smalltalk).
  503.  
  504.  
  505. 1.6)  What Are MOPs And Reflection?
  506. -----------------------------------
  507.  
  508. MOP is an acronym for Meta-Object Protocol.  This is a system with
  509. Meta-Classes accessible to users [Kiczales 92, Paepcke 93].  In CLOS
  510. terminology, an introspective protocol provides a read only capability (e.g.
  511. what is this object's class, give info on this class, etc.) and an
  512. intercessory protocol provides a write capability which allows system
  513. modification (e.g. add the following method or instance to this class,
  514. perform inheritance this way, etc.).  Because inheritance can be used to
  515. perform differential changes, intercessory protocols allow users to not
  516. only define new frameworks but to specialize existing system frameworks
  517. differentially without affecting them and their extant objects.  Thus, many
  518. frameworks can interoperate together simultaneously.  This is a good example
  519. of object-oriented reuse, since the compiler itself is reused thru
  520. specialization to provide new frameworks.
  521.  
  522. "Reflective" systems are systems with MOPs (not to be confused with reflexive
  523. systems, which often refer to systems implemented in terms of themselves, or
  524. bootstrapped).  Reflective systems are inevitably reflexive (as are most
  525. quality compilers), providing a direct program interface to the system.
  526.  
  527.  
  528. 1.7)  What Is Inheritance?
  529. --------------------------
  530.  
  531. Inheritance provides a natural classification for kinds of objects and allows
  532. for the commonality of objects to be explicitly taken advantage of in modeling
  533. and constructing object systems.  Natural means we use concepts,
  534. classification, and generalization to understand and deal with the complexities
  535. of the real world.  See the example below using computers.
  536.  
  537. Inheritance is a relationship between classes where one class is the parent
  538. (base/superclass/ancestor/etc.) class of another.  Inheritance provides
  539. programming by extension (as opposed to programming by reinvention
  540. [LaLonde 90]) and can be used as an is-a-kind-of (or is-a) relationship or
  541. for differential programming.  Inheritance can also double for assignment
  542. compatibility (see section 2.7).
  543.  
  544. In delegation languages, such as Self, inheritance is delegation where objects
  545. refer to other objects to respond to messages (environment) and do not
  546. respecify state by default.
  547.  
  548. Inherited parents can specify various flavors of state.  Delegation languages
  549. don't specify new state by default (to do so requires cloning), C-based (C++,
  550. Objective-C, etc.), lisp-based (CLOS, Flavors, Scheme, etc.), and Pascal-based
  551. (Ada95, Modula-3, Object Pascal, etc.) OO languages do, but with multiple-
  552. inheritance can also share parents within a class lattice (CLOS and Eiffel
  553. provide this as a default at the level of slots and features, respectively).
  554.  
  555. Inheritance also provides for member lookup, or internal environment.  Various
  556. schemes exist, for example C++ finds the closest match within a scope but
  557. causes an ambiguity error iff more than one parent has match, CLOS creates
  558. a linear precedence list, Self provides parent priorities, and Eiffel forces
  559. renaming for any parent member conflicts.
  560.  
  561. Defining inheritance (with a thorough description or denotational semantic
  562. definition, or both) can avoid confusion about which inheritance scheme is
  563. being used (especially in OOD), because inheritance has many variations and
  564. combinations of state and environment (sometimes with complex rules).
  565. Inheritance can also be used for typing, where a type or class can be used to
  566. specify required attributes of a matching object (see sections 2.1, 2.7 and
  567. [Cardelli 85]).  It would be more judicious to have discussions on how
  568. inheritance should be defined instead of over what it is, since it has many
  569. existing uses and semantics.
  570.  
  571. An example of the is-a-kind-of relationship is shown below.  Is-a is often
  572. used synonymously, but can be used to show the "object is-a class"
  573. instantiation relationship.  In classical OO, inheritance is a relationship
  574. between classes only.  In one-level systems, is-a (object instantiation) and
  575. is-a-kind-of (inheritance) are merged into one [Ungar 87, Madsen 93, Sciore
  576. 89].
  577.  
  578.                                Computer
  579.                               /    |     \
  580.                        Mainframe  Mini    Personal
  581.                         /    \    ...       /   \
  582.                   Data Proc  Scientific   PC    Workstation
  583.  
  584. Class hierarchies are subjective [Booch 91, 4.2; Lakoff 87] and usually drawn
  585. with the parent class on top, but more demanding graphs (as is often the case
  586. in [Rumbaugh 91]) allow any topology, with the head of an arrow indicating the
  587. base class and the tail indicating the derived class.
  588.  
  589. Differential programming is the use of inheritance to reuse existing classes
  590. by making a small change to a class.  Creating a subclass to alter a method
  591. or to add a method to a parent class is an example.
  592.  
  593.  
  594. 1.8)  What Is Multiple Inheritance?
  595. -----------------------------------
  596.  
  597. Multiple Inheritance occurs when a class inherits from more than one parent.
  598. For example, a person is a mammal and an intellectual_entity, and a document
  599. may be an editable_item and a kind of literature.
  600.  
  601. Mixin's is a style of MI (from flavors) where a class is created to provide
  602. additional attributes or properties to other classes.  They are intended to be
  603. inherited by any class requiring them.  Method combination, or calling
  604. sequences of before, after, and around methods or even several primary methods
  605. [Kim 89, ch 4], make good use of mixins by invoking their methods without
  606. explicitly calling them, allowing client class code to remain unchanged [Booch
  607. 91, p 113].
  608.  
  609.  
  610. 1.9)  Does Multiple Inheritance Pose Any Additional Difficulties?
  611. -----------------------------------------------------------------
  612.  
  613. Yes, it does.  Any name can be simply resolved to a class member with single
  614. inheritance by simply accessing the first name encountered for data members
  615. and by accessing the first signature match (or ambiguity) encountered for
  616. methods (at least one way, C++ hides some member functions).  Since several
  617. distinct parents can declare a member within a multiple inheritance hierarchy,
  618. which to choose becomes an issue.  Eiffel forces derived classes to rename
  619. parent members that conflict.  Self prioritizes parents.  CLOS merges member
  620. "slots" (instance variables) with the same name into a single slot, as did
  621. the earlier flavors.  C++ declares an error iff a conflict arises, but a
  622. class qualifier can be used to explicitly disambiguate.  Smalltalk renders
  623. same names for instance variables of subclasses illegal.
  624.  
  625. On the other hand, multiple-inheritance can be seen as required for basic
  626. object-oriented programming, because many objects in the real world belong to
  627. several classes.  In classical systems without MI, a class which should inherit
  628. from more than one class must textually include all but one of those classes in
  629. its interface, causing code duplication (and a messy interface).
  630.  
  631.  
  632. 1.10)  What Is Dynamic Inheritance?
  633. -----------------------------------
  634.  
  635. Dynamic inheritance allows objects to change and evolve over time.  Since base
  636. classes provide properties and attributes for objects, changing base classes
  637. changes the properties and attributes of a class.  A previous example was a
  638. window changing into an icon and then back again, which involves changing a
  639. base class between a window and icon class.
  640.  
  641. More specifically, dynamic inheritance refers to the ability to add, delete,
  642. or change parents from objects (or classes) at run-time.  Actors, CLOS, and
  643. Smalltalk provide dynamic inheritance in some form or other.  Single hierarchy
  644. systems, such as Self, provide dynamic inheritance in the form of delegation
  645. [Ungar 87].
  646.  
  647. See also [Kim 89, chs 1, 3] for a discussion and [Coplien 92] for some
  648. implementation discussion in C++.
  649.  
  650.  
  651. 1.11)  What Is Shared (Repeated) Inheritance?
  652. ---------------------------------------------
  653.  
  654. Multiple Inheritance brings up the possibility for a class to appear as a
  655. parent more than once in a class graph (repeated inheritance), and there is
  656. then a potential to share that class.  Only one instance of the class will
  657. then appear in the graph (as is always the case in CLOS, because all *members*
  658. with the same name will be shared (receive a single slot) with the greatest
  659. common subtype as its type).  C++ provides an alternative, where only parents
  660. specified as virtual (virtual bases) are shared within the same class lattice,
  661. allowing both shared and non-shared occurrences of a parent to coexist.  All
  662. "features" in Eiffel (C++ members) of a repeated parent that are not to be
  663. shared must be renamed "along an inheritance path", else they are shared by
  664. default.  This allows a finer granularity of control and consistent name
  665. resolution but requires more work for parents with many features.
  666.  
  667.  
  668. 1.12)  Why Use Inheritance?
  669. ---------------------------
  670.  
  671. Inheritance is a natural way to model the world or a domain of discourse,
  672. and so provides a natural model for OOA and OOD (and even OOP).  This is
  673. common in the AI domain, where semantic nets use inheritance to understand
  674. the world by using classes and concepts for generalization and categorization,
  675. by reducing the real-world's inherent complexity.
  676.  
  677. Inheritance also provides for code and structural reuse.  In the above Computer
  678. class diagram, all routines and structure available in class Computer are
  679. available to all subclasses throughout the diagram.  All attributes available
  680. in Personal computers are also available to all of its subclasses.  This kind
  681. of reuse takes advantage of the is-a-kind-of relationship.  Class libraries
  682. also allow reuse between applications, potentially allowing order-of-magnitude
  683. increases in productivity and reductions in defect rates (program errors),
  684. as library classes have already been tested and further use provides further
  685. testing providing even greater reliability.
  686.  
  687. With differential programming, a class does not have to be modified if it is
  688. close to what's required; a derived class can be created to specialize it.
  689. This avoids code redundancy, since code would have to be copied and modified
  690. otherwise.  See [Raj 89] for an alternative approach as found in Jade.
  691.  
  692. Polymorphism is often explicitly available in many OO languages (such as C++,
  693. CLOS, Eiffel, etc.) based on inheritance when type and class are bound together
  694. (typing based on subclassing, or subclass polymorphism), since only an object
  695. which is a member of (inherits from) a class is polymorphically assignment
  696. compatible with (can be used in place of) instances or references of that
  697. class.  Such assignment can result in the loss of an object's dynamic type in
  698. favor of a static type (or even loss of an object's representation to that of
  699. the static class, as in C++ slicing).  Maintaining the dynamic type of objects
  700. can be provided (and preferred); however, C++ provides both sliced and non-
  701. sliced replacement in a statically typed environment (see section 2.1).
  702.  
  703.  
  704. 1.13)  Why Don't Some People Like Inheritance?
  705. ----------------------------------------------
  706.  
  707. Some people complain that inheritance is hierarchical (which is what most
  708. object-oriented languages provide).  They would also like to see more
  709. operations available (set operations are quite common in specialized systems).
  710. The former is a kind of language dependent feature commonly found in object-
  711. oriented languages which are then associated with the term "inheritance"
  712. (although they don't need to be.  For example, delegation languages allow graph
  713. inheritance stuctures).  Some don't like the coupling of classes (as in Jade),
  714. but in the author's opinion many of their complaints are easily answered.  In
  715. systems that provide inheritance, inheritance provides a simple and elegant way
  716. to reuse code and to model the real world in a meaningful way.
  717.  
  718. Others complain multiple inheritance is too complicated because it brings up
  719. the issues of shared bases and member conflict resolution.  But most modern
  720. systems support Multiple Inheritance by employing semantic resolution
  721. strategies or renaming, and most consider MI to be highly desirable.  See the
  722. latter part of section 1.9 for an example of why MI is important.
  723.  
  724. Some prefer association to MI, claiming "roles" (as defined in [Rumbaugh 91])
  725. should be associations and inheritance should be reserved for a single
  726. hierarchy "creation" mechanism, however this loses polymorphism and loses the
  727. use of inheritance for typical classification.  Representation "roles" can be
  728. supported by dynamic multiple inheritance (DMI) in many situations.
  729.  
  730.  
  731. 1.14)  What Is Specialization/Generalization/Overriding?
  732. --------------------------------------------------------
  733.  
  734. To create a subclass is specialization, to factor out common parts of
  735. derived classes into a common base (or parent) is generalization [Booch 91,
  736. p56].  Overriding is the term used in Smalltalk and C++ for redefining a
  737. (virtual in Simula and C++) method in a derived class, thus providing
  738. specialized behavior.  All routines in Smalltalk are overridable and non-
  739. "frozen" features in Eiffel can be "redefined" in a derived class.  Whenever
  740. a method is invoked on an object of the base class, the derived class method
  741. is executed overriding the base class method, if any.  Overriding in Simula
  742. is a combination of overloading and multiple-polymorphism because parameters do
  743. not have to be declared.  Eiffel and BETA are examples of languages allowing
  744. any member to be redefined and not just methods, as is typical.
  745.  
  746.  
  747. 1.15)  What Is The Difference Between Object-Based And Object-Oriented?
  748. -----------------------------------------------------------------------
  749.  
  750. Object-Based Programming usually refers to objects without inheritance
  751. [Cardelli 85] and hence without polymorphism, as in '83 Ada and Modula-2.
  752. These languages support abstract data types (Adts) and not classes, which
  753. provide inheritance and polymorphism.  Ada95 and Modula-3; however, support
  754. both inheritance and polymorphism and are object-oriented.  [Cardelli 85, p481]
  755. state "that a language is object-oriented if and only if it satisfies the
  756. following requirements:
  757.  
  758.   - It supports objects that are data abstractions with an interface of named
  759.     operations and a hidden local state.
  760.   - Objects have an associated type.
  761.   - Types may inherit attributes from supertypes.
  762.  
  763.   object-oriented = data abstractions + object types + type inheritance
  764.  
  765. These definitions are also found in [Booch 91, Ch2 and Wegner 87].
  766.  
  767. [Coad 91] provides another model:
  768.  
  769.   Object-Oriented = Classes and Objects 
  770.                     + Inheritance 
  771.                     + Communication with messages
  772.  
  773. Stroustrup's first edition of [Stroustrup 91, '86 p. 37] defines object based
  774. as: "... storing type identification in each object, brings us to a style of
  775. programming often referred to as "object based"", which is quite different
  776. from C+W's.
  777.  
  778. A more modern definition of "object-oriented" includes single-hierarchy
  779. languages and perhaps object id's for unique objects.  Object id's support the
  780. modern notion of relocatable, persistent and distributed objects that can
  781. even migrate across machines.  Distributed Smalltalk's proxy objects [Kim 89,
  782. ch 19 and Yaoqing 93] provide another example of a distributable and migratable
  783. object facility.  Separate type system support is another extension.
  784.  
  785. [Booch 94, 2.2] proposes 7 "Elements of the Object Model"; 4 major and 3 minor:
  786.   Major:
  787.     Abstraction
  788.     Encapsulation
  789.     Modularity
  790.     Hierarchy  (Inheritance)
  791.   Minor:
  792.     Typing
  793.     Concurrency
  794.     Persistence
  795.  
  796.  
  797. 1.16)  Is A Class An Object?
  798. ----------------------------
  799.  
  800. In C++ no, because C++ classes are not instances of an accessible class (a
  801. Meta-Class) and because C++ classes are not accessible to programs.  Classes
  802. are objects in 3 Level Systems and above because classes are instances of
  803. meta-classes.  But classes play a dual role, because objects can only be
  804. declared to be instances of a class (and class objects instances of a
  805. meta-class).  In 1 Level (single-hierarchy) systems, all classes are objects.
  806.  
  807.  
  808. 1.17)  Is An Object A Class?
  809. ----------------------------
  810.  
  811. In a Level 3 System and above yes, but only instances of a Meta-Class are
  812. Classes.  Instances of a Class (ordinary objects) are not classes (excluding
  813. hybrid systems).  However, all objects may be classes in single hierarchy
  814. systems, since any object may act as a class (provide object instantiation or
  815. act as a shared parent).
  816.  
  817.  
  818. 1.18)  What Is A Method? (And Receiver And Message)
  819. ---------------------------------------------------
  820.  
  821. A method implements behavior, which is defined by [Booch 91, p80]:
  822.  
  823.   Behavior is how an object acts and reacts, in terms of its state changes
  824.   and message passing.
  825.  
  826. A method is a function or procedure which is defined in a class and typically
  827. can access the internal state of an object of that class to perform some
  828. operation.  It can be thought of as a procedure with the first parameter as
  829. the object to work on.  This object is called the receiver, which is the object
  830. the method operates on.  An exception exists with C++'s static member functions
  831. which do not have a receiver, or "this" pointer.  The following are some common
  832. notations for invoking a method, and this invocation can be called a message
  833. (or message passing, see below):
  834.  
  835.   receiver.message_name(a1, a2, a3)   
  836.   receiver message_name: a1 parm1: a2 parm3: a3
  837.  
  838. Selector would be another good choice for message_name in the above examples,
  839. although keywords (or formal parameter names, like named parameters) are
  840. considered part of the selector in Smalltalk (and hence Objective-C).
  841.  
  842. If done statically, this can be referred to as invocation, and message passing
  843. if done dynamically (true dynamic binding).  Statically typed dynamic binding
  844. (e.g. C++ and Eiffel) is really in between (checked function pointers).
  845.  
  846. See also section 1.19 below for a discussion on the functional (prefix) verses
  847. message based (receiver based) notation.
  848.  
  849.  
  850. 1.19)  What Are Multi-Methods And Multiple-Polymorphism?
  851. --------------------------------------------------------
  852.  
  853. Multi-methods involve two primary concepts, multiple-polymorphism and lack of
  854. encapsulation.  These issues are orthogonal.  Multiple-polymorphism implies
  855. more than one parameter can be used in the selection of a method.  Lack of
  856. encapsulation implies all arguments can be accessed by a multi-method (although
  857. packages can be used to restrict access, as in CLOS).  Multi-methods can also
  858. imply a functional prefix notation, although the CLOS designers (who coined the
  859. term "multi-method") consider the functional and receiver based forms
  860. (messages) equivalent.  Functional syntax was chosen "in order to minimize the
  861. number of new mechanisms added to COMMON LISP" [Kim ch 4, p70 (D. Moon)].
  862. [Chambers 93] discusses multi-methods in his new OO language, Cecil.
  863.  
  864. Multiple-polymorphism allows specialized functions or methods to be defined to
  865. handle various cases:
  866.  
  867.   +(int, int)
  868.   +(int, float)
  869.   +(int, complex)
  870.   +(int, real)
  871.   +(float, complex)
  872.   +(float, real)
  873.   +(float, float)
  874.  
  875. The above functions are specialized to each of the cases required allowing
  876. single, highly cohesive and loosely coupled functions to be defined.  This is
  877. also the true essence of object-oriented polymorphism, which allows objects to
  878. define methods for each specific case desired.  In addition to better coupling
  879. and cohesion, multiple-polymorphism reduces program complexity by avoiding
  880. coding logic (switch statements) and because small methods further reduce
  881. complexity, as code complexity doesn't grow linearly with lines of code per
  882. method, but perhaps exponentially.  This should be distinguished from double
  883. dispatch, a fancy name for single dispatch after a call, which only provides
  884. switching on a single argument per call (but for 2 levels), consistently
  885. ignoring the inherent type of parameters in messaging.  Double dispatch is
  886. used in languages with static typing for simplicity and efficiency
  887. considerations.
  888.  
  889. If all of the above types are Numbers, code can be written without concern for
  890. the actual classes of objects present:
  891.  
  892.   fn(one, two: Number): Number
  893.     return one + two;
  894.  
  895. The addition expression above will invoke the correct "+" function based on the
  896. inherent (true, actual, or dynamic) types of one and two.  Only the inherent
  897. type of "one" would be used with double dispatch!  In the author's opinion,
  898. this is a serious shortcoming.  Further, double dispatch would only allow
  899. switching to the "fn" function based on the type of "one" also.  This could
  900. lead to the use of switch statements based on type or complex coding in many
  901. real-world programming situations, unnecessarily.  In the author's opinion,
  902. this should only be used as necessary, e.g. if the implementation language
  903. doesn't support multiple-polymorphism and either efficiency considerations
  904. dominate and double dispatch can be suffered, or an embedded dynamic typing
  905. scheme is used.
  906.  
  907. Why do multi-methods allow open access to parameters?  It allows efficient
  908. handling, like C++ friends, usually by allowing representation details of more
  909. than one object to be exposed.  See [Kim ch 4, pp70-71 (D. Moon)] for an
  910. alternative explanation.  While open access can be useful in some cases, it
  911. typically isn't recommended as a general OO practice (see section 1.15, C+W's
  912. requirement 1 for OO languages and Section 1.2 on Encapsulation) and also
  913. violates subtype polymorphism, because only subclass polymorphism is based on
  914. representation and not type.
  915.  
  916. Polymorphic languages can be statically typed to provide strong type checking,
  917. efficiency, and to support a static programming idiom, but require restrictions
  918. in many cases, such as requiring overriding methods to have identical
  919. signatures with the methods they substitute (as in C++) or allowing covariant
  920. parameters but limiting base class usage (as in Eiffel).  If these restrictions
  921. are dropped, multiple-polymorphism results.  Thus a single overridable function
  922. declared in a base class may have several functions overriding it in a derived
  923. class differentiated only by their formal argument types.  This therefore
  924. requires both static and dynamic typing, because no formal argument
  925. differentiation is possible without static types, as in Smalltalk, and no
  926. actual argument differentiation is possible without dynamic types (as in C++
  927. and Eiffel).  See section 2.3 for another example of multiple-polymorphism.
  928.  
  929. There is some concern about the efficiency of run-time method selection as
  930. can occur with multiple-polymorphism (or even dynamic message passing).
  931. However, static analysis optimizations are commonly available in the
  932. literature, potentially providing a single static selection in many cases
  933. [See Agrawal 91, Chambers 92, Mugridge 91, and etc.].
  934.  
  935. But coupling the two cases of selector variables (as found in CLOS,
  936. Objective-C, and etc.) and several possible known selectors together with the
  937. general undecidability of dynamic types at compile-time renders dynamic typing
  938. and run-time selection (or checking) as unavoidable in the general case [a
  939. point often mistaken in comp.object.  E.g. simple statically/strongly typed
  940. multi-methods still require dynamic types!]
  941.  
  942. See [Booch 91], multiple-polymorphism, for a good CLOS example.
  943.  
  944.  
  945. 1.20)  What Is OOP?
  946. -------------------
  947.  
  948. OOP stands for Object-Oriented Programming, the usual programming/hacking and
  949. etc. most programmers think of.  Modern software engineering methodologies;
  950. however, consider OOP as the implementation/evolution of an OOD.
  951.  
  952.  
  953. 1.21)  What Is OOA/OOD (And Where Can I Get What I Need On It)?
  954. ---------------------------------------------------------------
  955.  
  956.   See also section 3.7, the Annotated Bibliography, and APPENDIX D.  The
  957.   classified bibliography in [Booch 94] also contains entries on OOA(B), OOD(F)
  958.   and OOP(G).
  959.  
  960. [Booch 91]
  961.   "In OOA, we seek to model the world by identifying the classes and objects
  962.   that form the vocabulary of the problem domain, and in OOD, we invent the
  963.   abstractions and mechanisms that provide the behavior that this model
  964.   requires."
  965.  
  966. [Coad 91]
  967.   "OOA is the challenge of understanding the problem domain, and then the
  968.   system's responsibilities in that light".
  969.   "To us, analysis is the study of a problem domain, leading to a specification
  970.   of externally observable behavior; a complete, consistent, and feasible
  971.   statement of what is needed; a coverage of both functional and quantified
  972.   operational characteristics (e.g. reliability, availability, performance)".
  973.   "Design.  The practise of taking a specification of externally available
  974.   behavior and adding details needed for actual computer system implementation,
  975.   including human interaction, task management, and data management details."
  976.  
  977. And on Domain Analysis:
  978.  
  979.   "Whereas OOA typically focuses upon one specific problem at a time, domain
  980.    analysis seeks to identify the classes and objects that are common to all
  981.    applications within a given domain, [...]".  - [Booch 91]
  982.  
  983.   [The following quotes on domain analysis are from [Berard 93]]
  984.  
  985.   "An investigation of a specific application area that seeks to identify the
  986.    operations, objects, and structures that commonly occur in software systems
  987.    within this area.  - Dan McNicholl
  988.  
  989.   "Systems analysis states what is done for a specific problem in a domain
  990.    while domain analysis states what can be done in a range of problems in a
  991.    domain.  ...A domain analysis is only useful in many similar systems are to
  992.    be built so that the cost of the domain analysis can be amortized over the
  993.    cost of all the systems.
  994.  
  995.    The key to reusable software is captured in domain analysis in that it
  996.    stresses the reusability of analysis and design, not code. - Jim Neighbors
  997.  
  998.   "The process of identifying, collecting, organizing, and representing the
  999.   relevant information in a domain based on the study of existing systems and
  1000.   their development histories, knowledge captured from domain experts,
  1001.   underlying theory, and emerging technology within the domain."  - Kang et al.
  1002.  
  1003.   Object-oriented domain analysis (OODA) seeks to identify reusable items
  1004.   localized around objects, e.g., classes, instances, systems of interacting
  1005.   objects, and kits [frameworks]. OORA analysts and OOD designers will
  1006.   interact on a fairly frequent basis with the domain analysis effort.
  1007.