CS551 UML for Distributed Objects Chapter 2 of Engineering Distributed Objects - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

CS551 UML for Distributed Objects Chapter 2 of Engineering Distributed Objects

Description:

spurs:Team. stefan:Player. name = 'Stefan Freund' role = Defender. Number=4. name='J rgen Klinsmann' ... Components still have to be interoperable. ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 27
Provided by: frankm8
Category:

less

Transcript and Presenter's Notes

Title: CS551 UML for Distributed Objects Chapter 2 of Engineering Distributed Objects


1
CS551UML for Distributed Objects (Chapter 2 of
Engineering Distributed Objects)
  • Yugi Lee
  • STB 555
  • (816) 235-5932
  • yugi_at_cstp.umkc.edu
  • www.cstp.umkc.edu/yugi

2
UML and Meta Model for Distributed Objects
  • Used for communicating about objects
  • Static vs. dynamic properties
  • Type vs. instance properties
  • UML
  • Use Case Diagrams
  • Sequence Diagrams
  • Class and Object Diagrams
  • State Diagrams
  • Packages
  • Meta Model

3
Use Case Diagrams
Plan Training
Trainer
Schedule
Determine League
Games
National Soccer
Manager
Association
Print Personal
Player
Schedule
4
Sequence Diagrams
BvBTeam
TeddyPlayer
StefanPlayer
Output
TonyTainer
bookGoalies
book()
book()
printTrainingPlan
5
Class Diagrams
6
Packages
Soccer Clubs
League
Management
National Team
7
Object Diagrams
8
State Diagrams
in team
healthy
in match
playing
/swap
/swap
/injury
reserve
injured
in_squad /play
!in_squad /play
/recovered
/finish
/finish
free
training
/exercise
9
Parallel State Composition
Player
/sign_contract
/unsatisfaction
happy
on transfer list
/resign
in team
10
Meta Model for Distributed Objects
  • Distributed Systems consist of multiple
    components.
  • Components are heterogeneous.
  • Components still have to be interoperable.
  • There has to be a common model for components
    that expresses
  • component states,
  • component services and
  • interaction between components.

11
OO Approach to Distributed Systems
  • Components ? objects.
  • Visible component state ? object attributes.
  • Usable component services ? object operations.
  • Component interactions ? operation execution
    requests.
  • Component service failures ? exceptions.

12
Need for an Object Meta-model
  • There are many different object-oriented
    approaches
  • Distribution middleware must define object model
    that can serve as a common basis for
    heterogeneous components.
  • We introduce general distributed object model to
    capture common characteristics of object models
    of different distributed object-middleware.

13
Different levels of abstraction...
Meta-Object Facility
Level 3
Meta Object Model
Level 2
Object Types
Level 1
Objects
Level 0
14
Object
  • Has a unique identifier.
  • May have many different references that refer to
    the object.
  • Has a set of attributes whose names denote
    values.
  • References may denote
  • equal objects
  • identical objects
  • Is encapsulated by operations.
  • May raise particular exceptions.

15
Sample Object
klinsiPlayer
name Jürgen Klinsmann role Forward Number
18
16
Types and Distributed Objects
  • Attributes, operations and exceptions are
    properties objects may export to other objects.
  • Multiple objects may export the same properties.
  • Only define the properties once!
  • Attributes and operations, and exceptions are
    defined in object types.

17
Attributes
  • Attributes have a name and a type.
  • Type can be an object type or a non-object type.
  • Attributes are readable by other components.
  • Attributes may or may not be modifiable by other
    components.
  • Attributes correspond to one or two operations
    (set/get).

18
Exceptions
  • Service requests in a distributed system may not
    be properly executed.
  • Exceptions are used to explain reason of failure
    to requester of operation execution.
  • Operation execution failures may be
  • generic or
  • specific.
  • Specific failures may be explained in specific
    exceptions.

19
Operations
  • Operations have a signature that consists of
  • a name,
  • a list of in, out, or in-out parameters,
  • a return value type, and
  • a list of exceptions that the operation can raise.

20
Object Type Example
ltltinterfacegtgt Player
-namestring -rolePosition -Numberint
void book(in Date d) raises (AlreadyBooked)
21
Operation Execution Requests
  • A client object can request an operation
    execution from a server object.
  • Operation request is expressed by sending a
    message (operation name) to server object.
  • Server objects are identified by object
    references.
  • Clients have to react to exceptions that the
    operation may raise.

22
Subtyping
  • Properties shared by several types should be
    defined only once.
  • Object types are organised in a type hierarchy.
  • Subtypes inherit attributes, exceptions and
    operations from their supertypes.
  • Subtypes can add more specific properties.
  • Subtypes can redefine inherited properties.

23
Multiple Inheritance
  • Means that one object type can be subtype of more
    than one super type
  • Not supported by all middleware
  • May lead to ambiguities

24
Multiple Inheritance Example
ltltinterfacegtgt Player
ltltinterfacegtgt Trainer
-namestring -rolePosition -Numberint
-salaryint
void book(in Date d) raises (AlreadyBooked) nex
t_game()Date
next_game()Date
ltltinterfacegtgt PlayerTrainer
25
Polymorphism
  • Object models may be statically typed.
  • Static type of a variable restricts the dynamic
    type of objects that can be assigned to it.
  • Polymorphism denotes the possibility of
    assignments of objects that are instances of the
    static type and all its subtypes.

26
Polymorphism Example
chelseaTeam
name Chelsea
vPlayerTrainer
dPlayer
name Gianluca Vialli role Forward Number
10 salary1000000
name Marcel Desailly roleDefender Number5
zPlayer
name Gianfranco Zola roleForward Number3
Write a Comment
User Comments (0)
About PowerShow.com