Sei sulla pagina 1di 26

CT015-3-2 Design Methods

Object and Class Structuring


Learning objectives

• At the end of this lecture, you should be


able to :
– Describe object structuring criteria and
categories

CT015-3-2 Design Methods Object and Class Structuring Slide 2 of 26


Object and Class Structuring

• First attempt at determining the software


objects in the system.
– Emphasis on objects modeling real-world and
entity objects
• Determines and categorizes the software
interfaces to the objects developed in the
Static Modeling phase.
• The beginnings of the Dynamic Model

CT015-3-2 Design Methods Object and Class Structuring Slide 3 of 26


Object and Class Structuring
Criteria

• Determine all software objects in system


– Use Object Structuring Criteria
– Guidelines for identifying object
• Structuring criteria depicted using stereotypes
– Stereotype defines a new building block that is derived
from an existing UML modelling element but is tailored to
the modeller's problem
– Depicted using guillemets
«entity», «boundary», «control»

CT015-3-2 Design Methods Object and Class Structuring Slide 4 of 26


Object and Class Structuring
Categories
• The four main categories :
1. Entity object
– represents the class where the data to be saved to or
retrieved from.
2. Boundary object
– Software object that interfaces to and communicates
with the external environment
Device Interface Objects connect to a hardware I/O device.
User Interface Objects provide for human user interaction.
System Interface Objects represent external systems or
subsystems.

CT015-3-2 Design Methods Object and Class Structuring Slide 5 of 26


Object and Class Structuring
Categories
3. Control object
– Software object that provides the overall coordination
for a collection of objects. Control objects may be
coordinator objects, state-dependent control
objects, or timer objects.
4. Application logic object
– Software object that contains the details of the
application logic. Another category is service objects,
which provide services for client objects, typically in
service-oriented architectures and applications.
CT015-3-2 Design Methods Object and Class Structuring Slide 6 of 26
Classification of application
classes by stereotype

CT015-3-2 Design Methods Object and Class Structuring Slide 7 of 26


Boundary Object

• Boundary objects are further categorized as:


– User interaction object
Software object that interacts with and interfaces to a
human user.
– Proxy object
Software object that interfaces to and communicates
with an external system or subsystem.
– Device I/O boundary object
Software object that receives input from and/or outputs
to a hardware I/O device.
CT015-3-2 Design Methods Object and Class Structuring Slide 8 of 26
User interaction class and object
• Communicates directly
with the human user,
receiving input from
the user and providing
output to the user via
standard I/O devices
such as the keyboard,
visual display, mouse
and GUI.

CT015-3-2 Design Methods Object and Class Structuring Slide 9 of 26


Proxy Objects

• Interfaces to an external
system
– Interfaces to an
external system
– Hides details of how
to communicate with
external system
• E.g., Robot Proxy
• Interfaces to external (real-
world) robot

CT015-3-2 Design Methods Object and Class Structuring Slide 10 of 26


Device I/O boundary object
• Interfaces to I/O device
• Input object
– E.g., Sensor
Interface
• Output object
– E.g., Actuator
Interface
• I/O (Input/Output) object
– E.g., ATM Card
Reader Interface

CT015-3-2 Design Methods Object and Class Structuring Slide 11 of 26


Device I/O boundary object

CT015-3-2 Design Methods Object and Class Structuring Slide 12 of 26


Depicting External Classes and
Boundary Classes

CT015-3-2 Design Methods Object and Class Structuring Slide 13 of 26


Entity Classes and Objects

• Entity Objects are long living.


– Used by many use cases.
– Store information that persists across use
cases.
E.g., Account, Sensor
• Entity objects are instances of the entity
classes developed in the Static Modeling
phase.
• Entity classes often mapped to relational
database during design
CT015-3-2 Design Methods Object and Class Structuring Slide 14 of 26
Entity Classes and Objects

Example of entity class and object

CT015-3-2 Design Methods Object and Class Structuring Slide 15 of 26


Control Classes and Objects

• Provides overall coordination for execution of


a group of objects
– Makes overall decisions
– Decides when, and in what order, other
objects participate in interaction sequence
• Entity objects
• Boundary objects

CT015-3-2 Design Methods Object and Class Structuring Slide 16 of 26


Control Classes and Objects

• Control Objects:
– Coordinator object
Overall decision-making object that determines the
overall sequencing for a collection of related objects.
– State dependent control object
Defined by finite state machine - depicted by using a
statechart.
– Timer object
A control object that is activated by an external timer –
e.g, a real-time clock or operating system clock.
CT015-3-2 Design Methods Object and Class Structuring Slide 17 of 26
Control Classes and Objects

Example of
coordinator class
and object

CT015-3-2 Design Methods Object and Class Structuring Slide 18 of 26


Control Classes and Objects

Example of
state-dependent
control class and
object

CT015-3-2 Design Methods Object and Class Structuring Slide 19 of 26


Control Classes and Objects

Example of a
timer class and
object

CT015-3-2 Design Methods Object and Class Structuring Slide 20 of 26


Application Logic Classes and
Objects
• 3 kinds of application logic objects:
– Business Logic Object
Defines business specific application logic (rules) for
processing a client request. Usually accesses more
than one entity object
– Algorithm Object
Encapsulates algorithm used in problem domain. More
usual in scientific, engineering, real-time domains
– Service object
Provides a service to other objects and responds to
requests from client objects
CT015-3-2 Design Methods Object and Class Structuring Slide 21 of 26
Application Logic Classes and
Objects

Example of
business logic
class and object

CT015-3-2 Design Methods Object and Class Structuring Slide 22 of 26


Application Logic Classes and
Objects

Example of
algorithm class
and object

CT015-3-2 Design Methods Object and Class Structuring Slide 23 of 26


Application Logic Classes and
Objects

Example of service
class and object

CT015-3-2 Design Methods Object and Class Structuring Slide 24 of 26


Review

• What is boundary object?


• State 3 sub-types of application logic
objects?

CT015-3-2 Design Methods Object and Class Structuring Slide 25 of 26


Q&A

CT015-3-2 Design Methods Object and Class Structuring Slide 26 of 26

Potrebbero piacerti anche