Object Technology
This presentation is the property of its rightful owner.
Sponsored Links
1 / 34

Object Technology PowerPoint PPT Presentation


  • 85 Views
  • Uploaded on
  • Presentation posted in: General

Object Technology. Course Aim. The Object Technology course will -. Examine the differences between procedural and object-oriented programming; Explain the principles, characteristics and benefits of object technology; Present the concepts underlying distributive object processing; and

Download Presentation

Object Technology

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Object technology

Object Technology


Course aim

Course Aim

The Object Technology course will -

  • Examine the differences between procedural and object-oriented programming;

  • Explain the principles, characteristics and benefits of object technology;

  • Present the concepts underlying distributive object processing; and

  • Introduce and contrast approaches to object persistence in databases.


Course objectives

Course Objectives

  • Name and discuss the three foundational concepts upon which object technology is built

  • Given a list of terms and characteristics of object methodology, correctly match them with a list of definitions

  • Contrast object-oriented and traditional programming and identify the benefits of object orientation

  • Describe the benefits of objects residing and operating remotely, and identify the mechanisms necessary for distributing objects

  • Given names of four persistence mechanisms, provide at least one advantage and one disadvantage of using each as a database for objects.

The successful learner will be able to -


From productivity to adaptivity

From Productivity to Adaptivity...

  • After 50 years of information-systems evolution, computers hinder more than help the process of change

  • Systems block urgently needed competitive change

  • 80 - 90% of the average software development budget goes to maintenance. (Only 40% in the 1970’s!)

  • Answer has been more productive software construction (4GLs, CASE tools and object oriented programming)

  • Better answer is to build more adaptive systems

  • Software systems must be flexible, easily modified to meet new opportunities and challenges


The history of object technology

The History of Object Technology...

  • Basic concepts of object programming were incorporated in “Simula” (simulation language) developed in Norway in the late 60s to simulate real world processes

  • Fundamentals of object orientation are as old as universe

  • Simula was developed to build working models of complex physical systems involving 1,000s of components

  • The technology is only now gaining commercial attention

  • Most popular languages now are Smalltalk, C++ and Java

  • Ada and object COBOL now qualify; Visual Basic v5 lacks only inheritance

  • The promise of object orientation is worth a careful look


Basic concepts of object orientation

? ? ?

Basic Concepts of Object Orientation

  • Objects and Encapsulation

  • Classes and Inheritance

  • Messages and Polymorphism

Object programming more closely duplicates real-world processes than traditional programming because it more nearly models nature’s own means of managing complexity and adapting to change.


Objects

maxSpeed

contents

fuelCapacity

loadCapacity

Objects...

FreightVehicle

moveTo

Methods

(Functionality)

Attributes

Attributes are what an object knows

(Behavior)

Attributes are usually private

turn

(Variables)

load

Methods are what an object does

Information hiding is necessary to strong modularity

Methods are usually public

unload

chgSpeed

Property

stop

An object is any person, place, event, thing, screen, report or concept that applies to the system defined

An object is any person, place, event, thing, screen, report or concept that applies to the system defined


Objects and encapsulation

FreightVehicle

moveTo

Methods

Attributes

(Functionality)

turn

load

(Variables)

unload

chgSpeed

stop

loadCapacity

contents

fuelCapacity

maxSpeed

Objects and Encapsulation...

Encapsulation hides what an object knows and does

Abstraction determines what an object knows and does

Encapsulation encloses an object's state and behavioral characteristics, and is the means by which information hiding and modularity are implemented.

Encapsulation encloses an object's state and behavioral characteristics, and is the means by which information hiding and modularity are implemented.


Advantages of encapsulated objects

Advantages of Encapsulated Objects

  • Data is wrapped with procedures as in the real world

  • Objects make ideal software modules, designed and maintained independently of one another

  • Objects are a natural way of viewing complexity

  • Each object models its own range of behavior, and has data about its status -- a self-contained universe

  • Global data does not exist; cannot be corrupted

  • An object’s data is protected, secure from outside tampering

  • Well defined and “wrapped” objects are highly reusable


Basic concepts of object orientation1

Basic Concepts of Object Orientation

  • Objects and Encapsulation

  • Classes and Inheritance

  • Messages and Polymorphism

Encapsulation is the separation of an object’s external interface from its internal implementation. A class is a set of objects that share common inherited structure and behavior.

? ?


Classes

Classes...

Classes group similar objects. How many classes to which these objects belong can you name?

Classes group similar objects. How many classes to which these objects belong can you name?


Classes1

Methods

Values

Methods

Values

Values

Values

Values

Values

Values

Values

Methods

Methods

Methods

Methods

Classes...

and Inheritance...

Superclass

Objects and classes inherit and can override commonalties

Inheritance provides for special cases of a class, thus classhierarchies

Objects

Subclasses

Subclasses inherit common methods and variables from the superclass. A class can override inherited attributes and methods.

Subclasses inherit common methods and variables from the superclass. A class can override inherited attributes and methods.


Class hierarchy

Superclass

Mammals

Superclass

People

Athletes

Where do these fit?

Workers

What Class is this?

Class Hierarchy...

Subclass of what Superclass?

Animals

Subclasses

Sea Creatures

Classes not only group similar objects. They group classes within classes -- subclasses within superclasses.

Classes not only group similar objects. They group classes within classes -- subclasses within superclasses.


Basic concepts of object orientation2

Basic Concepts of Object Orientation

  • Objects and Encapsulation

  • Classes and Inheritance

  • Messages and Polymorphism

Inheritance takes advantage of the similarities between classes, and messaging accomplishes the natural interaction of objects needed to accomplish work.

?


Object technology

Message Signature:

Class 2

Methods

ObjectName.Method (Parameters)

Methods

Return Value:

(Result, if any)

(__________)

Messages...

and Polymorphism...

Truck

train.shipTo (1000, Chicago)

Interface

Different objects can respond to the same message

Class 1

Sender

Train

Interface

Receiver

Real-world objects have an infinite variety of effects on one another, effects implemented through messages.

Real-world objects have an infinite variety of effects on one another, effects implemented through messages.


Object technology

More characteristics of objects...

Composite Objects, or Aggregation

Aggregation expresses ‘is-part-of’ relationships

Component objects are part of an aggregation

Objects that contain other objects are called composite objects; their member objects are called components.

Objects that contain other objects are called composite objects; their member objects are called components.


Object technology

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

Seat

More characteristics of objects...

Collections

What collections can be found in your house?

Cabins:

First Business Economy

There is a special kind of class called a collection class, which allows managing like objects as a group.

There is a special kind of class called a collection class, which allows managing like objects as a group.


Object technology

More characteristics of objects...

Collaboration

Delegation of tasks is the way objects collaborate to get work done

Objects, like people, must often collaborate in order to get the job done.

Objects, like people, must often collaborate in order to get the job done.


Object technology

More characteristics of objects...

Coupling and Cohesion

Software systems that are easily maintained are loosely coupled and highly cohesive.

Software systems that are easily maintained are loosely coupled and highly cohesive.


Object technology

Methods

Values

Athletes

Methods

Values

Values

Values

Values

Values

Methods

Methods

Methods

More characteristics of objects...

Abstract classes

An abstract class cannot have objects instantiated from it.

A class from which objects can be created is a concrete class

Abstract classes are general, high-level classes created for greater organization; they also serve as inheritance templates.

Abstract classes are general, high-level classes created for greater organization; they also serve as inheritance templates.


Object technology

More characteristics of objects...

Instance Relationships

Cardinality determines the number of instances in the relationship

Optionality expresses whether the relationship is required

Objects are related to one another as expressed in the verbs that connect them, for example, students take courses.

Objects are related to one another as expressed in the verbs that connect them, for example, students take courses.


Distributing objects

Distributing Objects

  • Networked environments introduce several issues about where programmed classes and objects should reside.

    • How should business logic be divided among network computers?

    • On which computer should a class be implemented?

    • How can computers on the network be most efficiently used?

  • Distributed classes is one architecture for placing classes of business logic on computers based on their behavior

    • Traditional client/server approach

    • Peer-to-peer client/server approach

    • Applets

    • Problem: The class may not be where needed at time of process

  • Better to distribute objects so they dynamically reside on the machine most appropriate for the current process

    • The object request broker (ORB) is middleware enabling objects to send messages to remote objects


Object technology

Server

Response

Receiver

Request

ORB

Server

Sender

Distributed objects...

The first requirement is a remote messaging architecture using a message channel

Message bus

The (ORB) object request broker enables objects to communicate across the network

CORBA is the ORB standard with an interface definition language (IDL) that defines services

Distributed Objects are objects that dynamically move about the network and reside anywhere they are currently needed.

Distributed Objects are objects that dynamically move about the network and reside anywhere they are currently needed.


Object technology

Server

Response

Receiver

Request

ORB

Server

Sender

Distributed objects...

An essential element is location transparency

Location

Service

Message bus

Location transparency relieves objects of maintaining object locations

The Location Service is a service of the ORB

The sender of a message first asks the location service for the receiver’s location, then sends its message.

The sender of a message first asks the location service for the receiver’s location, then sends its message.


Object technology

Server

Response

Receiver

Proxy object

Request

ORB

Server

Sender

Distributed objects...

A further step is remoteness transparency

Message bus

A proxy object serves as a local representative of a remote object

Remoteness transparency hides the fact the receiving object is on a different machine

A Proxy Object presents the interface of the remote object it represents to objects on the local machine appearing to them as a local object.

A Proxy Object presents the interface of the remote object it represents to objects on the local machine appearing to them as a local object.


Object technology

Server

Server

Mobile Object

Distributed objects...

The ideal level of implementation is mobile objects

Mobile objects allow dynamic load balancing of system resources

Java allows definition of mobile objects in its support for agents

Mobile objects move freely from machine to machine within a virtual object space as they are needed.

Mobile objects move freely from machine to machine within a virtual object space as they are needed.


Object technology

Mobile Objects

Ideal

Remoteness Transparency

Location Transparency

Remote Messaging

Basic

Distributed objects summary

Levels of object distribution implementation

Each higher level of implementation depends upon the lower implementation(s).

Each higher level of implementation depends upon the lower implementation(s).


Making objects persistent

Making objects persistent...

  • Persistence deals with how objects will be stored between invocations of an object-oriented application

    • Persistent objects must be available & work correctly when needed

  • Other terminology important to this discussion:

    • Persistence mechanism - permanent storage facility

    • Persistence layer - the collection of classes necessary for providing and maintaining persistence. The layer wraps the mechanism.

    • Object identifier (OID) - Typically a large, unique integer used as a “key” for accessing an object.

  • There are four common mechanisms:

    • Flat files

    • Relational databases

    • Object-oriented databases

    • Object/relational databases


Making objects persistent1

Object

Object

Object

Object

Object

Object

Object

Data Dictionary

Making objects persistent...

A common approach is using flat, or single, data files

The biggest design issue is whether to read/write sequentially or randomly

A flat file is a file of text or images

Flat File

Map

Flat File


Making objects persistent2

Relational

Database

Object

Object

Object

Object

Object

Object

Object

Data Dictionary

Making objects persistent...

The most widely used technique is relational databases

Persistent object uses data from the dictionary to create dynamic SQL statements for accessing the database

Relational databases can store object-oriented systems, especially attributes

Persistent

Object


Making objects persistent3

Making objects persistent...

The latest technology is object-oriented databases

  • An OODBMS stores an object’s attributes and methods

    • This is a fundamental premise of object technology

  • Designed specifically for object-oriented systems

    • Supports encapsulation, inheritance and polymorphism

    • Good systems support object distribution across the network

    • Security - restricted access at database, class or object levels

    • Version control that recognizes functions as well as data

Organized, workable approach OR time- bomb -- it depends on your design


Making objects persistent4

Really the best of two worlds? -- Maybe!

Making objects persistent...

A hybrid approach is object/relational databases

  • An attempt to combine the advantages of two database worlds for storing both data and objects

    • The relational ability to work with tables of columns and rows

    • Plus the ability to encapsulate both data and functionality

  • Traversing objects in the database is easy, thus supporting complex relationships between objects

  • Object/relational databases implement -

    • Inheritance mapping of the type used with relational databases

    • Extensions to SQL for accessing objects as well as data

    • Methods in tables

    • Easy traversal between objects

  • Better than relational, but easy to fall back into old relational design habits


Course objectives1

Course Objectives

  • Name and discuss the three foundational concepts upon which object technology is built

  • Given a list of terms and characteristics of object methodology, correctly match them with a list of definitions

  • Contrast object-oriented and traditional programming and identify the benefits of object orientation

  • Describe the benefits of objects residing and operating remotely, and identify the mechanisms necessary for distributing objects

  • Given names of four persistence mechanisms, provide at least one advantage and one disadvantage of using each as a database for objects.

The successful learner will be able to -


Thanks for your participation

Thanks for your participation...

Your comments and suggestions toward improving this course are welcome…..


  • Login