MODULE 5
MODULE 5
Deployment DIAGRAMS
Component and Deployment
Diagrmas
of class diagram.
• Packages that are friends to another may see all the elements of that
Visibility package, no matter what their visibility.
• If an element is visible within a package, it is visible within all packages
nested inside the package.
Dependency –Among Packages
Two Stereotypes of Dependency Among Packages:
access: the source package is granted the right to reference the
elements of the target package (:: convention)
import: a kind of access; the public contents of the target package
enter the flat namespace of the source as if they had been declared in the
source
Client
packageName + OrderForm
+ TrackingForm
- Order
<<import>> <<access>>
exports Policies <<import>>
packageName packageName
+OrderRules
-GUI:Window imports
subPackageName PackageClass GUI
<<import>>
+Window
+Form
#EventHandler
6
Modeling Groups of Elements
Look for “clumps” of elements that are semantically close to one another.
Surround “clumps” with a package.
7
Identify public elements of each package.
Identify import dependencies.
registration
Tools.db
db interfaces
Cloudscape Oracle
Class Package Diagrams
(http://www.agilemodeling.com/artifacts/packageDiagram.htm)
Seminar
Registration <<import>>Java
<<application>> Student Contact Infrastructure
Point <<technical>>
<<import>>
<<import>>
Professor <<import>>
COMMON MECHANISMS
•Adornments
Notes & Compartments
•Extensibility Mechanisms
–Stereotypes - Extension of the UML metaclasses.
–Tagged Values - Extension of the properties of a UML element.
–Constraints - Extension of the semantics of a UML element.
Adornments
Textual or graphical items added to an element’s basic notation.
<<library>> «subsystem»
Server accounts.dll AccountsPayable
{ dueDate = 12/30/2002
{channels = 3} {customerOnly} status = unpaid }
tagged values
Constraints
• Extension of the semantics of a UML element.
13• Allows new or modified rules
• Rendered in braces {}.
– Informally as free-form text, or
– Formally in UML’s Object Constraint Language (OCL):
E.g., {self.wife.gender = female and self.husband.gender = male}
Corporation
Portfolio Department
BankAccount * *
{or}
{secure} {subset}
Person
BankAccount id : {SSN, passport} member1..* 1 manager
A simple constraint Constraint across multiple elements Person
components,
including the classifiers that specify
loanOfficer.dll component
Registrar.exe
LoanOfficer CreditSearch
Course.dll
Student.dll
LoanPolicy
classes
Component
UML2.0 – architectural view
Diagram
17
Big demand, hmm…
Short history behind architecture
Architecture still an emerging discipline
Challenges, a bumpy road ahead
18
Component Diagram – another example
(www.cs.tut.fi/tapahtumat/olio2004/richardson.pdf)
19
Component Diagram – another example
(www.cs.tut.fi/tapahtumat/olio2004/richardson.pdf)
20
Component
UML2.0 – architectural view
Diagram
Explicit description of interfaces: lollipop
21 provided services to other components Component
requested services from other components
socket
An interface is a collection of 1..* methods, and 0..* attributes
Interfaces can consist of synchronous and / or asynchronous operations
A port (square) is an interaction point between the component and its environment.
Can be named; Can support uni-directional (either provide or require) or bi-directional (both provide and require) communicat
Can support multiple interfaces.
possibly concurrent interactions
fully isolate an object’s internals from its environment
caller or callee?
security AccessControl
StudentAdministration
Student Encription
Incoming
Incoming Persistence
signals/calls
signals/calls Outgoing
Outgoing
signals/calls
signals/calls
StudentSchedule DataAccess
Data[1..*]
Component Diagram: UML 1.x and UML 2.0
(http://www.agilemodeling.com/artifacts/componentDiagram.htm)
22
Component Diagram: UML 1.x and
UML 2.0
(http://www.agilemodeling.com/artifacts/componentDiagram.htm)
23
25
interface (or ports) that indicates that one component provides the services
required by another; simple line/ball-and-socket/lollipop-socket notation
A delegation connector binds a component’s external behavior (as specified at
delegation
delegation
assembly store
connector
component or
class?
connector
an asynchronous stimulus
communicated between instances
class interface signal
Shape data type <<signal>>
IUnknown OffHook
origin
<<type>>
move() Int
resize() { values range from
display() -2**31 to +2**31 - 1 }
use case
Process loan
egb_server
membership_server
kernel32.dll
<<subsystem>>
Customer Service
component node
subsystem
Generalizable Element, Classifier, Class, Component?
Structured Class – Another
Example
29
what kind?
Deployment diagram
UML deployment diagram depicts
a static view of the run-time configuration
hardware,
and the middleware used to connect the
J2EE Membership
Server Server
DecNet
Tomcat
Server
Structural Diagrams - Deployment Diagram
(http://www.agilemodeling.com/artifacts/deploymentDiagram.htm)
34
35
Is this better?
More concrete
Implementation-oriented
37
Questions to Answer
Find out the classes and objects from the following real world problems:
1)Railway Reservation System
2)Hospital Management System
Think individually and identify the classes and prove that the type of relationship
between them will vary depending upon their properties given in object oriented
paradigm.