Principles of ObjectOriented Software Development - PowerPoint PPT Presentation

1 / 47
About This Presentation
Title:

Principles of ObjectOriented Software Development

Description:

programming languages, orthogonality, reliability, complexity, ... slots -- parents, variables and methods. Creation. shallow cloning. deep cloning. Delegation ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 48
Provided by: faculte150
Category:

less

Transcript and Presenter's Notes

Title: Principles of ObjectOriented Software Development


1
Principles of Object-Oriented Software Development
  • Object-oriented programming languages

2
Object-oriented programming languages
Introduction The object paradigm
Comparing Smalltalk, Eiffel, C and Java
Design dimensions of object-oriented languages
Prototypes -- delegation versus inheritance
Meta-level architectures Summary Q/A
Literature
3
Object-orientedprogramming languages
  • the object paradigm
  • language design dimensions
  • classless prototypes
  • meta-level architectures

Additional keywords and phrases programming
languages, orthogonality, reliability,
complexity, types, delegation, multiple
paradigms, prototypes, reflection
4
The object paradigm
Subsections A classification of
object-oriented languages Alternative object
models Object extensions of Lisp, C and
Prolog Script languages -- integration with
Java
5
The notion of object
Simula
  • abstract data types -- software engineering
  • frames -- artificial intelligence
  • semantic data models -- database system
    development
  • capability-based computing -- distributed systems

6
object-oriented
structurally capability of representing
arbitrarily structured complex objects operationa
lly the ability to operate on complex
objects through generic operators behaviorally
the specification of types and operations
(data abstraction)
Perspectives of object orientation
7
A classification of object-oriented languages

8
Objects
language characteristics
  • object creation facility
  • message passing capability
  • class capability
  • inheritance features

9
Classification
  • hybrid -- C, Lisp, Pascal, Prolog
  • frame-based -- knowledge-based reasoning
  • distributed, concurrent, actor -- parallel
    computing
  • alternative object models -- prototypes,
    delegation

10
Alternative object models

11
Object extensions of Lisp, C and Prolog
Object extensions Lisp -- LOOPS, FLAVORS,
CLOS, FOOPS C -- Objective C, C
Prolog -- SPOOL, VULCAN, DLP Commercial
products -- languages Smalltalk, Eiffel,
C, Objective C, Object Pascal, Java
12
Object structure -- efficient mapping


C struct A ...
class A public ...
class A ... struct A private

The
equivalence between class and struct
13
Script languages
Java embedding
Javascript -- Dynamic HTML Perl
-- CGI/Web library
JPL
Tcl/Tk -- tclets
Jacl, Tcl Blend
Python -- Grail
JPython
14
Objects in Javascript

15
ltscript languageJavascriptgt
javascript
function object_display(msg)
object method
return msg ' (' this.variable ')'
function object()
object
constructor this.variable0
this.display object_display return
this var a new object()

create object document.write(a.display("a
message")) document.write(a.display("another
message")) lt/scriptgt
16
Comparing Smalltalk, Eiffel, C and Java
Subsections Criteria for comparison
Language characteristics
17
Criteria for comparison
  • class libraries
  • programming environment
  • language characteristics

18
Language characteristics
  • uniformity of data structures
  • documentation value
  • reliability
  • inheritance mechanisms
  • efficiency
  • memory management
  • language complexity

19
Smalltalk
Eiffel C Java
uniformity high
medium low medium
documentation value medium high
medium high reliability
medium medium
low high protected operations
no no yes
yes multiple inheritance no
yes yes
no efficiency low
medium high
low garbage collection yes
yes no yes
language complexity low
medium high medium
20
Design dimensions of object-oriented
languages
Subsections Object-based versus
object-oriented Towards and orthogonal
approach -- type extensions Multi-paradigms
languages -- logic Active objects --
synchronous Java/C
21
Object Oriented LanguageDesign
  • object state operations
  • class template for object creation
  • inheritance super/base and subclasses

object-oriented objects classes
inheritance
data abstraction -- state accessible by
operations strong typing -- compile time checking
22
Orthogonal approach
  • objects -- modular computing agents
  • types -- expression classification
  • delegation -- resource sharing
  • abstraction -- interface specification

23
Multi-paradigm languages
  • logic

24
Open systems reactive -- flexible (dynamic)
choice of actions modular -- (static)
scalability Dimensions of modularity
encapsulation boundary -- interface to client
distribution boundary -- visibility from within
objects concurrency boundary -- threads per
object, synchronization
25
Active objects
  • synchronous Java/C

26
Object-based concurrency
  • add processes -- synchronization
  • multiple active objects -- rendezvous
  • asynchronous communication -- message buffers

27
Synchronous C/Java
28
active class S
sC public
m () ... private _at_S ()

pseudo-constructor select
01 -gt m()
external call
instructions ...
accept m
accept internal method instructions
... waituntil
(date)
time-out instructions ...
default

default instructions ...

29
Prototypes
  • delegation versus inheritance

Subsections Alternative forms of sharing
Implementation techniques -- Self
30
Prototypes
exemplars
  • cloning -- creation time sharing
  • delegation -- lifetime sharing

31
State slots -- parents, variables and
methods Creation shallow cloning deep
cloning Delegation implicit delegation
explicit delegation
32
Improving performance
  • special purpose hardware
  • hybrid languages
  • static typing
  • dynamic compilation

Implementation techniques -- Self
33
Self -- prototypes objects, cloning,
delegation Dynamic compilation -- type
information customized compilation
message inlining lazy compilation
message splitting
Implementation techniques -- Self
34
Meta-level architectures

35
The class concept
  • abstract data type -- interface description
  • object generator -- template for creation
  • repository -- for sharing resources
  • object -- instance of a metaclass

36
(No Transcript)
37
Postulates
class-based languages
  • everything is an object
  • every object belongs to a class
  • every class inherits from the class Object
  • class variables of an object are instance
    variables of its class

38
Reflective definition of Class
name Class supers
(Object) iv
(name supers iv methods) methods
(new ...)
39
Summary
40
The object paradigm
1
  • notion of object -- viewpoints
  • classification -- object extensions

41
Comparing Smalltalk,Eiffel, C and Java
2
  • criteria -- libraries, environments, language
    characteristics
  • comparison -- language characteristics

42
Design dimensions ofobject-oriented languages
3
  • object-oriented -- object-based inheritance
  • orthogonal dimensions -- objects, types,
    delegation, abstraction
  • open systems -- dimensions of modularity

43
Prototypes -- delegationversus inheritance
4
  • prototypes -- cloning and delegation
  • performance -- dynamic compilation

44
Meta-level architectures
5
  • class -- the concept of class
  • meta architecture -- subclass and instance
    hierarchy
  • reflection -- postulates

45
Questions
1. What are the basic characteristics of
object-oriented languages? 2. How would you
classify object-oriented languages? Name a few
representatives of each category. 3. What do you
consider to be the major characteristic of the
object model supported by C? Explain. 4. Why
would you need friends? 5. How would you
characterize the difference between object-based
and object-oriented? 6. Along what orthogonal
dimensions would you design an object-oriented
language? Explain. 7. Give a characterisation of
active objects. In what situations may active
objects be advantageous? 8. How would you
characterize prototype-based languages?
46
9. What are the differences between inheritance
and delegation? Does C support delegation?
Explain. And Java? 10. How would you
characterize the concept of a class? 11. Can you
sketch the meta architecture of Smalltalk? 12.
How would you phrase the postulates underlying
class-based languages? Can you give a reflective
version of these postulates?
47
Further reading
A concise treatment of programming languages is
given in BG94. Further, you may want to
consult Wegner87, which contains the original
presentation of the discussion concerning the
distinction between object-based and
object-oriented. For Java, read the original
white paper, Java. An interesting extension of
C is described in Petitpierre98. At the
corresponding web site, http//ltiwww.epfl.ch/sCxx
, there is much additional material. Finally,
for an account of the design and evolution of
C, read Stroustrup97. For more information on
C, visit http//www.accu.org , and for Java,
http//www.javasoft.com .
Write a Comment
User Comments (0)
About PowerShow.com