Chapter 25 - 28 Object-Oriented Practices Agenda • • • • • • • Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs OODBMS Manifesto Object Management Architecture Common Object Request Broker Architecture Object-Oriented Concepts • Abstraction – encapsulation and information hiding – Identifying the essential aspects of an entity (Object) – Abstract Data Type (ADT): interface part (operation) implementation part (data structure) • Encapsulation – An object has data structure and operations • Information hiding – Internal details – Data independence Terminology • • • • • Object Identity Classes Operations, methods & messages Inheritance Polymorphism Object Identity (OID) • • • • • • System generated Unique to that object Invariant Independent of the values of its attributes Invisible to the user Advantages: – Fast, efficient, independent of content, not changeable by user Class • Definition – Group of objects with similar properties (attributes), common behavior (methods), similar relationship to other objects, and common semantics. • Diagram – Box: class name, attributes, operations (methods) • Superclasses & subclasses • Generalization & specialization Inheritance • Definition – A subclass inherits the attributes, operations, and association of its superclasses • Types – – – – Single inheritance: one superclass Multiple inheritance: two or more superclasses Repeated inheritance: common superclass Selective inheritance: limited number of properties from the superclass Operations Methods & Messages • Operations – Function or procedure may be applied to or by objects in a class • Methods – The implementation of an operation for a class • Messages – Communication between objects to execution of a method Link & Association - 1 • Link – A physical or conceptual connection between objects – Link attribute describes property of an association • Association – A description of a group of links with common structure and common semantics – Has a name (roles for problem description) • A link is an instance of an association Link & Association - 2 • Qualified association – The objects in a many role are partially or fully disambiguated by an attribute called the qualifier – A small box on the end of the association line near the source class • Multiplicity – The number of instances of one class that may relate to a single instance of an associated class – one, many, zero or one Polymorphism • Overloading – The name of a method to be reused within a class definition or across class definitions • Overriding – The name of property to be redefined in a subclass • Dynamic binding – Runtime determination of object and method Object Modeling Tips • • • • • • • • Scope Simplicity Layout of diagram Name (descriptive, crisp, and unambiguous) Association (foreign keys) Multiplicity Qualifiers Review Object-oriented DBMSs • Object-oriented data model (OODM) – A logical data model of objects supported in object-oriented programming • Object-oriented database (OODB) – A persistent and sharable collection of objects defined by an OODM • Object-oriented DBMS (OODBMS) – The manager of an OODB OODBMS Manifesto - 1 • • • • • Support complex objects Support object identity Support encapsulation Support types or classes Support inheritance between types or classes • Support dynamic binding OODBMS Manifesto - 2 • • • • • • • Completed computational DML Extensible data types Data persistence Support very large databases Support concurrent users Backup & recovery Support simple way of querying data Object Management Architecture (OMA) • Object Model (OM) – A design-portable abstract model for communicating with OMG (Object Management Group)-compliant object-oriented systems • Object Request Broker (ORB) – Handles distribution of messages between application objects (software bus) • Object Services (concurrency control, security, persistence etc.) • Common Facilities (printing, e-mail etc.) • Common Object Request Broker Architecture (CORBA) – Enable client-server interaction with a specific implementation of ORB Points To Remember • • • • • • • Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs OODBMS Manifesto Object Management Architecture Common Object Request Broker Architecture Assignments • Review chapters 5-6, 11-18, 25-27 • Read chapters 19 and 20 • Exam 3 – Date: • Project – Due date: – Place: End of MIS150 • Exam date: 12/9/03 • Study! Study! Study! • Have a happy and safe holiday!!