Chapter 14 - Wiley

separatesnottyΛογισμικό & κατασκευή λογ/κού

25 Νοε 2013 (πριν από 3 χρόνια και 8 μήνες)

80 εμφανίσεις

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

1

An Introduction to



Object
-
Oriented
Analysis


Objects in and UML plain English.


Chapter 14: Implementation

OOPLs and OODBMSs

Based on the book by

David William Brown

John Wiley & Sons, ISBN 0471371378

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

2

Copyright

Copyright
8

2002 Flying Kiwi Productions

All rights reserved.



This slide presentation is based on “An Introduction to Object
-
Oriented Analysis; Objects and UML in Plain English,” by David
William Brown, Wiley, ISBN 0471371378, “The Book.”

Permission

is hereby granted to copy, modify or excerpt all or any
part of this slide presentation, provided it is solely for use with
courses, seminars or other presentations or productions
where a
copy of The Book is purchased

by or for each and every participant or
recipient.



An

instructor guide is available from the publisher for such presentations.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

3

Chapter 14: Implementation:
OOPLs and OODBMSs


14.1. Languages and Databases.


14.2. Directions: OMG and ODMG.


14.3. Issues for O
-
O Languages and Databases.


14.4. O
-
O Programming Languages.


14.5. O
-
O Databases.


14.6. O
-
O Development Environments.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

4

14.1. Languages and
Databases.

Chapter 14: Implementation:
OOPLs and OODBMSs

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

5

Chapter 14: Implementation: OOPLs and OODBMSs

14.1. Languages and Databases.



“NICE” Committee


Nonprofit International Consortium for Eiffel


Sun has

117 licensees

for Java.


Java is now the language of choice


Licence has tight compatibility requirements


In 1997, Sun found it necessary to sue

Microsoft for licence violation and non
-
standard

features
.


Only Microsoft.


Both
Eiffel

and
Java

have been
standardized by the inventors

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

6

Chapter 14: Implementation: OOPLs and OODBMSs

14.1. Languages and Databases.


So IBM produced one, and then there were three.



But then the original pair merged to combat the
interloper,



And we were back to two!


C++
was

the most widespread O
-
O language


But remember that the advantages it promises tend
to be
seductive

and
illusory
.


The same goes for all hybrid/extended languages


OO Pascal, Objective
-
C, even OO COBOL,


And many others.


There
were

two vendors of Smalltalk compilers
and development environments.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

7

Chapter 14: Implementation: OOPLs and OODBMSs

14.1. Languages and Databases.


The
ANSI SQL3

committee is developing


“An object SQL that extends SQL2 with
facilities for defining, manipulating and
querying an object database


as a
superset

of a relational
database.”



It is
“Object SQL”
or
“OSQL”


Both ANSI and ISO are working on standards.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

8

Chapter 14: Implementation:
OOPLs and OODBMSs


14.1. Languages and Databases.




14.3. Issues for O
-
O Languages and Databases.


14.4. O
-
O Programming Languages.


14.5. O
-
O Databases.


14.6. O
-
O Development Environments.

14.2. Directions: OMG and ODMG.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

9

14.2. Directions: OMG
and ODMG.

Chapter 14: Implementation:
OOPLs and OODBMSs

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

10

Chapter 14: Implementation: OOPLs and OODBMSs


14.2. Directions: OMG and ODMG.


Exists as “components” assembled into various
“profiles” each for a particular product.


There is a profile for
ORBs,

one for
ODBMSs,

etc.


The

“Core Component”
is one that must be
present in every profile.


The OMG
ODBMS

spec adds:



Persistence,


Relationships,


Attributes,


Queries


Transactions (Commit/Rollback)


The core of the OMG standard is the



OMG Object Model

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

11

The Acronym Farm

To extend their work into object databases




A true
subgroup


All are members of OMG




NOT

a splinter group


That would be
in opposition

A subgroup has formed from the

OMG

And Now
-

The rest of the Good News:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

12

The Acronym Farm:


Dedicated to database interoperability


e.g., by a standardized language interface across vendors


Within the CORBA spec


Voting Members represent
90%
of the OODBMS
market.


Voting Members are required to make two







major commitments . . .

object database management group

(
ODMG
)

All are members of OMG SIG on


Object Databases (SIGDB)

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

13

The Acronym Farm:

ODMG


Will be based on one that some member already has


This is proof it’s worthwhile and doable


They know what it should look and behave like



All members will add it to their products within 18
months


All products will have it added in a reasonable time


All products will
have it!

Any new feature mandated by the

ODMG:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

14


Voting Members


eXcelon Corporation


Objectivity, Inc.


Sun Microsystems


POET Software Corp.

The Acronym Farm:


Who’s Who in the
ODMG
:


Reviewing Members


CERN


Computer Associates Intl.


NEC Corporation


Versant Corporation


Andersen Consulting


Micro Data Base Systems


Academic Members


Brown University


MIT


Oregon Graduate Institute


University of Colorado


University of Massachusetts


University of Wisconsin


Universitaet Zuerich


Wichita State University

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

15

Chapter 14: Implementation: OOPLs and OODBMSs


14.2. Directions: OMG and ODMG.


This is the current statement of requirements for
compatibility among OODBMSs.


ODMG 3.0 consists of these parts:


ODMG Object Model


A formalized specification of the OMG object model.


Suitable as the basis for designing an OODBMS.


“Bindings”

to Smalltalk, C++ and Java.


Each binding has


An Object Definition Language (ODL)


An Object Query Language (OQL)


An Object Management Language (OML)


The ODMG 3.0 Spec

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

16

Chapter 14: Implementation:
OOPLs and OODBMSs


14.1. Languages and Databases.


14.2. Directions: OMG and ODMG.




14.4. O
-
O Programming Languages.


14.5. O
-
O Databases.


14.6. O
-
O Development Environments.

14.3. Issues for O
-
O Languages and Databases.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

17

14.3. Issues for O
-
O
Languages and
Databases.

Chapter 14: Implementation:
OOPLs and OODBMSs

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

18

Chapter 14: Implementation: OOPLs and OODBMSs


14.3. Issues for O
-
O Languages and Databases.

The Good

Java, Eiffel, Smalltalk

The Bad

C++

and the
Ugly

O
-
O COBOL.


Sutherland (1995) with apologies to Clint Eastwood.


We Have:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

19

Chapter 14: Implementation: OOPLs and OODBMSs


14.3. Issues for O
-
O Languages and Databases.


When an instance is created, it occupies
RAM.


When it is deleted, we need to free that RAM
for reuse.


This process is known as “Garbage
Collection.”


The better languages do it Automatically


Java, Smalltalk, Eiffel


C++ does not.



C++ forces the programmer to remember to clear
the garbage.

Garbage Collection:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

20

Chapter 14: Implementation: OOPLs and OODBMSs


14.3. Issues for O
-
O Languages and Databases.


Related to Garbage Collection.


If the garbage is not cleared


(and for a number of other possible reasons)


There is a buildup of unavailable memory,


To the point where the system can run out
of RAM and crash.

Memory Leaks:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

21

Chapter 14: Implementation: OOPLs and OODBMSs


14.3. Issues for O
-
O Languages and Databases.


Unless you have the necessary C++
tweaking and optimizing skills on your
team,


Remember that C++ code is not noticeably
quicker than higher
-
level code.

Upward Compatibility:


Largely an illusory and seductive
“advantage.”

Execution Speed:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

22

Chapter 14: Implementation: OOPLs and OODBMSs


14.3. Issues for O
-
O Languages and Databases.

Like a fire extinguisher . . .

Mostly you never need it,

But the day you do,

It’s
real

nice to have it along!

Multiple Inheritance:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

23

Chapter 14: Implementation: OOPLs and OODBMSs


14.3. Issues for O
-
O Languages and Databases.


There can be conflicts over inheriting the
same feature from two or more different
ancestors.


Each language has its own way of resolving
this


Read the manual!


Smalltalk has “roles”, a form of “dynamic
typing,”


Which allows an object to sometimes be in one
class and sometimes in another.

Multiple Inheritance:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

24

Chapter 14: Implementation: OOPLs and OODBMSs


14.3. Issues for O
-
O Languages and Databases.


Even within one language, porting from one
compiler to another is difficult,


Unless they have closely
-
matching class libraries.


The ANSI standards for C++ and OO COBOL do not
specify any class libraries as part of the language.


A lot of unnecessary work to port from say Microsoft
C++ to Borland C++.


ANSI Smalltalk will include a standard set of class
libraries.


Java already does, controlled by Sun’s licensing
agreements.
The main goal of Java is portability!

Standardized Class Libraries:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

25

Chapter 14: Implementation:
OOPLs and OODBMSs


14.1. Languages and Databases.


14.2. Directions: OMG and ODMG.


14.3. Issues for O
-
O Languages and Databases.




14.5. O
-
O Databases.


14.6. O
-
O Development Environments.

14.4. O
-
O Programming Languages.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

26

14.4. O
-
O
Programming
Languages.

Chapter 14: Implementation:
OOPLs and OODBMSs

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

27

Chapter 14: Implementation: OOPLs and OODBMSs

14.4. O
-
O Programming Languages.


Arguably the most “pure” O
-
O language.



Everything

is an object
-

even attribute
values.


Comes as a complete development
environment,


With standard class libraries.

Smalltalk

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

28

Chapter 14: Implementation: OOPLs and OODBMSs

14.4. O
-
O Programming Languages.


Complex and detailed.


Not as programmer
-
productive.


Makes seductive promises of
reduced
learning curve
and
speed advantages.


Very fast
if
expertly

optimized.

C++

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

29

Chapter 14: Implementation: OOPLs and OODBMSs

14.4. O
-
O Programming Languages.


Developed by Bertrand Meyer


“Designed from the ground up to increase the
amount of reuse going on.”


And also to encourage


“. . . reuse of industrial
-
grade components . . .”


“. . . long
-
term investment in class libraries.”


An elegant, very pure O
-
O language.


Concurrency is included in the design of the
language, but not yet in the compilers.

Eiffel

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

30

Chapter 14: Implementation: OOPLs and OODBMSs

14.4. O
-
O Programming Languages.


To keep the language growing in line with the
actual requirements of developers,


Meyer has given control to the “NICE”
committee,


The “Nonprofit International Consortium for
Eiffel.”


This should avoid the “dBase Syndrome.”

Eiffel

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

31

Chapter 14: Implementation: OOPLs and OODBMSs

14.4. O
-
O Programming Languages.


COBOL has had its place in History.



Developed by CODASYL “
C
ommittee for
D
ata
SY
stems
L
anguages” in the 1960s,



Led by then
Captain
,

now
the late Rear
-
Admiral,

Grace Hopper, USN
,

one of the early heroes of IT.



COBOL brought us to the peak of mainframe
business data processing.



Now it’s time to move on

to more modern and powerful languages


See “The Good, the Bad & the Ugly.”

Object
-
Oriented COBOL

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

32

Chapter 14: Implementation: OOPLs and OODBMSs

14.4. O
-
O Programming Languages.


Named for
Ada Lovelace,

the first computer
programmer
200 years ago.


Required

by the US Dept of Defense for all
its information systems contracts.


Ada 83 had objects (“packages”) but no
inheritance or polymorphism,

So it was not O
-
O.

Ada 95 is completely O
-
O,


With multiple inheritance, an ANSI/ISO
standard and all the bells and whistles.

Ada

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

33

Chapter 14: Implementation: OOPLs and OODBMSs

14.4. O
-
O Programming Languages.


Available both for applets running on the web


And for standalone IS applications


Conceived from the ground up as pure O
-
O


Like C++ with all the anomalies removed and
the rough edges smoothed out


Less chance for a programmer to screw up


Now the language of choice


Becoming more and more widely used

Java

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

34

Chapter 14: Implementation:
OOPLs and OODBMSs


14.1. Languages and Databases.


14.2. Directions: OMG and ODMG.


14.3. Issues for O
-
O Languages and Databases.


14.4. O
-
O Programming Languages.




14.6. O
-
O Development Environments.

14.5. O
-
O Databases.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

35

14.5. O
-
O Databases.

Chapter 14: Implementation:
OOPLs and OODBMSs

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

36

Chapter 14: Implementation: OOPLs and OODBMSs


14.5. O
-
O Databases.


But are in good shape, with all those
“Heavy
-
Duty Industrial
-
Strength” features
in place,


And a growing list of successful projects.


OODBMSs are new, and evolving rapidly,

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

37

Chapter 14: Implementation: OOPLs and OODBMSs


14.5. O
-
O Databases.


COGNOS Axiant


Object
-
Oriented dBASE


Gemstone (from Servio Corp.)


HP Odapter (formerly OpenODB)


O
2


Objectivity


ObjectStore


ORACLE 8


Visual paradox


Poet


UniSQL


VERSANT

Here is a partial list:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

38

Chapter 14: Implementation: OOPLs and OODBMSs


14.5. O
-
O Databases.


Extended relational:


Tables


Modified to handle complex attribute types


Lists, graphics, sound and video clips etc.


Some use BLOBs


Binary Large Object.


Pointer
-
Based:


Borrows the pointer idea from the old
CODASYL network databases from the ’70s.


Things like
clustering

are important again.


Faster than Extended Relational.

Two Approaches to OODBMS Technology:

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

39

Chapter 14: Implementation: OOPLs and OODBMSs


14.5. O
-
O Databases.


Most are working within the ODMG
standard


Many ORBs are now available.


See current magazines for ads for ORBs and OODBMSs.




But since the beginning, Microsoft
have been the holdout from the OMG
and ODMG . . .

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

40

2 to 3 years


MS Proprietary vs OMG Consortium


MS Technologies exist, but are
embryonic


Each MS Technology Outdates its Predecessors



Active Support of each technology has so far
been:

The Near Future

Microsoft? OLE? COM? DCOM? WhateverCOM?

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

41

Time

2
-
3 year active support

DDE

OLE1

OLE2

OLE/COM

?

CORBA

Object

Services

Horizontal

Common

Facilities

Vertical

Common

Facilities

Source: T. J. Mowbray, OBJECT Magazine Nov
-
Dec 1994

The Near Future

Microsoft OLE / COM vs

OMG, ODMG, ORBs and CORBA.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

42


Standards Lifecycle


= End
-
User Systems Lifecycle





= 8 years


1000 OMG Members =
Industry Standard

The Near Future

OMG, ODMG, ORBs and CORBA.

The Hope for All Humankind?


(Systemkind?)

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

43

Chapter 14: Implementation:
OOPLs and OODBMSs


14.1. Languages and Databases.


14.2. Directions: OMG and ODMG.


14.3. Issues for O
-
O Languages and Databases.


14.4. O
-
O Programming Languages.


14.5. O
-
O Databases.

14.6. O
-
O Development Environments.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

44

14.6. O
-
O
Development
Environments.

Chapter 14: Implementation:
OOPLs and OODBMSs

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

45

Chapter 14: Implementation: OOPLs and OODBMSs


14.6. O
-
O Development Environments.


“The Visuals”


Visual BASIC, Visual C++


These are still
O
-
O front ends
to relational
databases as the back end.


They are truly O
-
O, but
only in the GUI.


They have classes like
Window

and
Button
,


But no database classes like
Customer, Employee,
Sale, Journal Entry, Payment, Student, Course,

etc.

We can expect them to evolve to full O
-
O
as the major relational databases do.


ORACLE, Sybase, ACCESS, Adabase, SQL Server etc.


PowerPoint, Delphi, etc.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

46

End of Chapter 14

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

47

End of Chapter 14

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

48

End of Chapter 14

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

49

End of Chapter 14

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

50

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

51

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

52

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

53


Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

54

The following slides contain
symbols I used in the
presentation. Use them when
adding or modifying slides in
order to maintain consistency
with my slides

David.

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

55

Customer

1:M

M:M

Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

56


Copyright
8

2002 Flying Kiwi Productions Inc. flykiwi@home.com

57