You are on page 1of 60

CSE333

DOC/UML.1
Distributed Object Computing
and UML
Research and Work By:

Hector N. Echegoyen
Oliver Scheck
Gowri Shankar

Hector.Echegoyen@otis.com
oliverscheck@email.com
gowri@engr.uconn.edu



CSE333
DOC/UML.2
Objective
Explore UML Modeling Techniques/Constructs
and Identify Support to DOC
Employ Rational ROSE to Model and Develop a
Distributed Banking Application (using RMI)
Identify Key Distribution Issues Relating to OOM
Explore a Select Set of UML Modeling Tools to
Identify DOC Support



CSE333
DOC/UML.3
System Use Case
Description
Hard Concept to Grasp Initially
Almost Self-Explanatory - Focus on Functionality
of System With Interaction of Actors
Identified Four Major Actors
Major Functionality and Relations to Actors
Also Identified
Drew Clear Definitions of Operations for Each
Actor
Helped to Identify the Need for Some Sort of
Role Based Security (I.e., Customer Actor
Doesnt Perform Audits)
Actors Directly Linked to Roles?
Wrote Case Scenarios of Major Functions



CSE333
DOC/UML.4
Behavioral Modeling
System Use Case
Process Transactions
Distributed Communication
Persistent Storage
Report Generation
Printing
Auditing
Clerk
BANKING SYSTEM
The Customer
Manager
<<uses>>
<<uses>>
<<uses>>
<<uses>>
<<uses>>
THE CLERK
THE
CUSTOMER
THE
MANAGER
TheServer
THE SERVER



CSE333
DOC/UML.5
Deployment Diagram
Description
To Get an Idea of How the System Would Be
Distributed
Concept of More Than One Type of Bank Server
Questions:
What Kind of Functionality is Distributed
Where?
Where is Security, Servers or Clients, Both?
Where Should We Deploy Objects, and Which
Object?
Servers Handling Multiple Clients And/or Server
Transactions at the Same Time
Attempt to Make Our System Generic So That We
Can Run All Possible Scenarios



CSE333
DOC/UML.6
Architectural Modeling
Deployment Diagram
Branch
Server
Terminal
1
Terminal
2
Terminal
X
Branch
Server
Terminal
1
Terminal
2
Terminal
X
Central
Bank
ATM 1
ATM 2
ATM X
Hub



CSE333
DOC/UML.7
Structural Modeling
Logical and Component Views
ClientServerGui
U
TheServer
U
ClientServerGui
U
TheServer
U
CLASS
DIAGRAM
COMPONENT
DIAGRAM



CSE333
DOC/UML.8
Initial Logical View of Client
This is Where The Applet GUI Goes.
To be Added To The Model Later.
RMI Here
CustomerProfileForm
(from TheServer)
Serializable
(from io)
<<Interface>>
CustomerAccountForm
(from TheServer)
Vector
(from util)
TransactionInterface
<<Interface>>
TellerInterface
<<Interface>>
BankConnection
1
+BankTransaction
1
1
+TellerTransaction
1



CSE333
DOC/UML.9
Initial Local Server Simulator and Client
Comp Model
Funny
Money
Serializ
able
Serializable
Transactio
nInterface
Transaction
Interface
rmi
Bank
Connection
Remote
BankServer
server
util
Session
Interface
Session
Interface
Transacti
onByRole
Atm
Trans
Teller
Trans
Mgr
Trans
Teller
Interface
Teller
Interface



CSE333
DOC/UML.10
Initial Logical View of the Server
Simulator
FunnyMoney
amount : int
Serializable
(from io)
<<Interface>>
Remote
(from rmi)
<<Interface>>
This is Where The Applet GUI Goes.
To be Added To The Model Later.
RMI Here
TransactionInterface
<<Interface>> UnicastRemoteObject
(from server)
SessionInterface
<<Interface>>
Hashtable
(from util)
Account
Account()
SessionHandler
TransactionByRole
$ GOOD_CONN : int = 0
RemoteBankServer
accounts
1
+TheAccount
1
1
+TheSessionHandler
1
+TheTransactionHandler
AtmTrans
TellerTrans
MgrTrans
TellerInterface
<<Interface>>
CustomerProfileForm
(from TheServer)
CustomerAccountForm
(from TheServer)



CSE333
DOC/UML.11
Behavioral Modeling
Sequence Diagram of Log In
Client 1 Server
Enter UName And Passwd
Send UName And Passwd
Verify UName And Passwd
Send Connection Status
Prompt User For Transaction Info
Allocate Memory And Resources For Transactions
Allocate Memory And Resources For Transactions



CSE333
DOC/UML.12
Behavioral Modeling
Sequence Diagram of Log Out
Client Server
User Execute Logout
Send Logout Message
Release Memory And Resources
Successfully Logged Out Message
Release Memory And Resources



CSE333
DOC/UML.13
Final Application Models and Deployment
Each of Us to Explain his/her Own Piece in Detail
Hector - Client GUI and App
Oliver - Main Server Transaction and Interface
Hierarchy
Gowri - Main Server Banking Application
Only a Prototype - Not a Full-Fledged Application
Demo is Limited to a Couple of Transactions
Goal is to Prove Java RMI Concepts, Interfaces,
UML Support of Them in a Real World App
After This Phase, Ready to Jump to the Analysis
Phase



CSE333
DOC/UML.14
Final Development
Applet and Connection
BankConnection
$ GOOD_CONN : int = 0
$ UNK_CONN_ERR : int = 1
$ REMOT_ERR : int = 2
$ NOT_BOUND_ERR : int = 3
$ COMM_FAILED : int = 4
$ ATM_CONN : int = 11
$ TELLER_CONN : int = 12
$ MGR_CONN : int = 13
$ VERIF_FAILED : int = 14
$ TRANSACTION_PASSED : int = 20
$ TRANSACTION_FAILED : int = 21
Connect_To_Bank()
Run_Query()
Login()
Logout()
SendCustomerProfile()
SendCustomerAccount()
Connect_To_ServerBank()
LoginToServer()
LogoutFromServer()
ShowAllCustomers()
BankingApp
init()
JMenuItem2_actionPerformed()
JMenuItem2_actionPerformed_Interaction1()
JMenuItem18_actionPerformed()
JMenuItem18_actionPerformed_Interaction1()
JMenuItem2_actionPerformed_Interaction2()
myBankingAppCode_Logout()
JMenuItem4_actionPerformed()
JMenuItem4_actionPerformed_Interaction1()
JMenuItem4_actionPerformed_Interaction2()
createCustProfMenu_actionPerformed()
createCustProfMenu_actionPerformed_Interaction1()
closeMenu_actionPerformed()
closeMenu_actionPerformed_Interaction1()
createNewAccountMenu_actionPerformed()
createNewAccountMenu_actionPerformed_Interaction1()
myBankingAppCode_ShowAllCustomers()
JShowCustomersMItem_actionPerformed()
JShowCustomersMItem_actionPerformed_Interaction1()
+$MyBankConnection
APPLET AND
GUI
ITS CONNECTION TO THE
CLIENT BANK ENGINE



CSE333
DOC/UML.15
Final Development
Main Client Application
The Applet GUI IS To be Added To
The Model Later.
RMI ENTRY
HERE
CustomerProfileForm
(from TheServer)
Serializable
(from io)
<<Interface>>
CustomerAccountForm
(from TheServer)
BranchServerInterface
(from TheServer)
<<Interface>>
MgrTransactionInterface
(from TheServer)
<<Interface>>
ServerTransactionInterface
(from TheServer)
<<Interface>>
ATMTransactionInterface
(from TheServer)
<<Interface>>
SessionInterface
VerifyUserNameAndPassword()
PerformLogout()
<<Interface>>
ServerInterface
login()
logout()
(from TheServer)
<<Interface>>
RoleTransactionInterface
(from TheServer)
<<Interface>>
BankConnection
1
+BankSession
1
+BankServerSession
1 +BankServerTransaction 1
TellerTransactionInterface
(from TheServer)
<<Interface>>
Vector
(from util)
FORM CLASSES FOR
DATA TRANSFER
CONNECTION
CLASS WITH
THE GUI



CSE333
DOC/UML.16
RMI Structure
Make Method Callable by Declaring Signature in
Interface
Compile Class and Interface and Generate Stub and
Skeleton
Stub
Client Object
Skeleton
Server Object



CSE333
DOC/UML.17
RMI Flow of Events



CSE333
DOC/UML.18
Server - Goals
Handle Multiple Virtual Connections
Have Multiple User Types, With Varying
Privileges
Provide the Financial Services
Use of Database
Select Design Elements havent Been Coded
Server-Server Connection to have Hierarchy of
Servers
Use of Distributed Database
Persistency of DB (Object Serialization)



CSE333
DOC/UML.19
Server - Transaction Objects



CSE333
DOC/UML.20
Server - Transaction Interfaces



CSE333
DOC/UML.21
Server at Runtime - Login



CSE333
DOC/UML.22
Server - Login Method
switch (db.validateUser(u, p)) {

case User.ATM: {
atmTransaction = new ATMTransaction(this);
addTransaction(atmTransaction);
return (atmTransaction);
}
case User.MANAGER: {
mgrTransaction = new MgrTransaction(this);
addTransaction(mgrTransaction);
return (mgrTransaction);
}
case User.TELLER: {
tellerTransaction = new TellerTransaction(this);
addTransaction(tellerTransaction);
return (tellerTransaction);
}
case User.SERVER: {
serverTransaction = new ServerTransaction(this);
addTransaction(serverTransaction);
return (serverTransaction);
}
default: {
System.out.println("unsupported user type");
return null;
}




CSE333
DOC/UML.23
Server - Database
Designed to
Support
Persistency
Via Object
Serialization

Associations
Are Vectors;
Not Intuitively
Displayed in
Rose



CSE333
DOC/UML.24
Server - Hierarchy



CSE333
DOC/UML.25
Server - The Big Picture



CSE333
DOC/UML.26
Application Functionality
Adding a New Customer to the Bank
Customer Profile Information Transferred
From Client to Server Transaction Object
Customer Information Extracted From the
Customer Profile Object
Server Function Invoked to Add Current
Customer to List of Customers
Display Information About Existing Bank
Customers
Opening One or More Accounts for Customers.
Two Types of Accounts - Savings, Checking
Customer Can Have Any Number of Accounts
Can Have More Than One Type of Account
With the Same Account Number



CSE333
DOC/UML.27
Server Application Hierarchy
Customer
User
UnicastRemoteObject
UnicastRemoteObject()
readObject()
clone()
exportObject()
(from server)
Acct
accno : int
balance : float = (float)0.0
CustomerProfileForm
CustomerAccountForm
Database
Server
-db
Vector
(from util)
-customers
-users
#customers
-transactions
Customer
#account
SavingsAccount
CheckingAccount
TheCustomerAccount
AccountNumber : int
+TheSavingsAccount
+TheCheckingAccount
UTILITY CLASSES
AND FORMS
BANK ACCOUNT AND
CUSTOMER
INFORMATION
REMOTE
SERVER



CSE333
DOC/UML.28
Sample Code
Add a Customer to the Bank

protected boolean addCustomer(Customer c) {
System.out.println("Server.addCustomer()");
Object obj = null;
for (int i = 0; i < customers.size(); i++) {
obj = (Customer)customers.elementAt(i);
if (obj.equals(c)) {
System.out.print("customer already
exists");
return false;
}
}
customers.addElement(c);
return true;
}




CSE333
DOC/UML.29
Sample Code
Open an Account for Customer

public int createAccount(AccProfileForm apf)
throws RemoteException {
Acct account = null;
switch (apf.type) {
case AccProfileForm.SAVINGS: {
account = new SavingsAccount();
break;
}
case AccProfileForm.CHECKING: {
account = new CheckingAccount();
break;
}
default:
}
account.balance = apf.initialDeposit;
account.accno = server.accNoGen();
account.type = apf.type;
server.addAccount(customer, account);
return account.accno;
}




CSE333
DOC/UML.30
Sample Code

protected boolean NewAddAccount(int customerNumber,
TheCustomerAccount a) {

// get a reference to current customer object
System.out.println("entering NewAddAccount()");

Object obj = null;
Object accObj = null;

for (int i = 0; i < customers.size(); i++) {
obj = (Customer)customers.elementAt(i);
if ( ((Customer)obj).custNumber ==
customerNumber ) {
System.out.println("customer found");




CSE333
DOC/UML.31
Sample Code
// Check for Duplicate account numbers

for (int j=0;j<((Customer)obj).accounts.size();j++)
{
accObj = (TheCustomerAccount)
((Customer)obj).accounts.elementAt(j);

if (((TheCustomerAccount)accObj).AccountNumber
== a.AccountNumber)
{
System.out.println("Account is duplicated");
return false;
}
} // end for int j
System.out.println("Account Number: " +
a.AccountNumber + " Successfully Added.");




CSE333
DOC/UML.32
Sample Code

System.out.println("Account Number: " +
a.AccountNumber + " Successfully Added.");

Add the account to the customer

((Customer)obj).accounts.addElement(a);
return true;

} // end if == cust number
} // end for i

System.out.println("Customer Not Found");

return false;
}






CSE333
DOC/UML.33
Distribution Issues Relating to OOM
Problems Relating to Distribution.
How to Distribute the Different Parts of the
System
How to Find the Distribution Objects
How to Decide Clusters of Objects
How to Distinguish High and Low Read/write
Ratios Between Objects
How to Find the Operations Which Changes
the Object States



CSE333
DOC/UML.34
UML Support For DOC
Component Diagrams
Shows the Structure of the Code
Graph of Components Connected by
Dependency Relationships
Shows Dependencies Among Software
Components
Deployment Diagrams
Shows the Structure of the Run-time System
Used to Depict Which Components May Run
on Which Nodes
Migration of Components From Node to Node
May Also Be Shown.




CSE333
DOC/UML.35
Softmodeler - A Next Generation UML
Modeling Tool
Supports three Important Technological Trends
Software Components
Distributed Computing
OO Technology
Supports the Basic UML Constructs
Use Case Diagrams
Object Diagrams
Class Diagrams
Sequence Diagrams
No Support for
State Diagrams
Activity Diagrams



CSE333
DOC/UML.36
Features Supporting DOC
True Component Design
Distribution Modeling With Support for RMI and
CORBA Distribution
Code Generation of Enterprise Java Beans and
Java Beans
Simulation of Models During the Analysis and
Design Stages



CSE333
DOC/UML.37
Component Design and Distribution
Provides Special Notation for Defining
Components
Supports Component Distribution Modeling
Allows Reuse of Existing Models of Components
Automatic Generation of Enterprise Java Beans
and Java Beans Code
Creation of Visual Graphical Component Models
From Existing EJB and JB Source Code.
Produces Required Distribution Code in Either
Corba or Java RMI



CSE333
DOC/UML.38
Component Notation
Components Are Special Classes That Define a
Higher Level of Encapsulation
Possess an Extra Interface Layer of Remotely
Accessed Methods
Belong to a Certain Component Framework Such
As JB or EJB
Have an Optional Distribution Method(rmi,
CORBA) for Accessing Their Remotely Accessed
Interface



CSE333
DOC/UML.39
Component Diagram - An Extension to the
UML Notation




Different From a Class Diagram in the Following
Component Scope - Can Be a Components
Class or a Set of Classes and Interfaces
Components Interface - a Set of Methods and
Properties Which Allow Remote Access.
Component Framework- Java Beans ,
Enterprise Java Beans , COM
Components Distribution Method -
CORBA,RMI



CSE333
DOC/UML.40
Class Diagram - An Enhancement to UML
Field
Property
Method
Softmodeler Differentiates Between Regular Fields
and Properties of a Class
Property is a Field With Access Rights
Set/get Methods for the Property Fields Generated
Automatically



CSE333
DOC/UML.41
SoftModeler vs. Rational Rose
Component Diagrams
Provide Facilities for
Specifying Distinct
Local & Remote
Methods
Specifying Distribution
Method Required
Support for the Simulation
of Models During Analysis
and Design Phase.
Allows Specification of
Properties With Access
Rights Within Classes.
Does Not Support State
Diagrams and Activity
Diagrams.
Extensive Support for
Component Diagrams Not
Supported




Not Supported


Not Supported

Supports All Constructs
Defined in the UML
Notation.



CSE333
DOC/UML.42
Component Creation



CSE333
DOC/UML.43
ObjecTime Developer
Product of Objectime Limited
Http://www.Objectime.Com/
Versions for C, C++
Consider Themselves as the Leading Provider of
Software Engineering Tools
Middleware for Developers of Distributed
Systems
Product Has Been Incorporated in Rational Rose


Realtime
Uses Extensions on UML to Incorporate Real-
Time Aspects, Methodology Call ROOM
Bought Out by Rational - Now Rose-RT Product



CSE333
DOC/UML.44
ObjecTime Developer - Features
Different Levels of Views for Developers and
Customers
Executable Modeling Capability for
Understanding Complex, Real-Time Systems
Tracing Messages Visually and Debugging
Using Graphics
Supports Ability to
Build Model From Design
Load Model to Target Platform
Control & Animate Model From the Development
Platform
Generates Entire Applications by Using Formal
Methods That Allow Automatisation



CSE333
DOC/UML.45
ObjecTime Developer - Features
Integrates Smoothly with Other Developement
Tools and Operating Systems
Especially Real-time Operating Systems
Stated on Their Web Page:
ROOM Forms the Basis for UML-RT
Contains a Set of Real-time Extensions to
UML
Will Soon to Be an OMG Standard for General
Purpose Software Development



CSE333
DOC/UML.46
UML-RT components
Capsules Represent
Complex,
Potentially
Concurrent and
Also Distributed
Active Components
Port is Physical Part of Implementation of
Capsule
Mediates Interaction of Capsule With
Outside World
Includes Interface and Protocol
[Signals]



CSE333
DOC/UML.47
UML-RT components
Connectors Capture Key Communication
Relationships Between Capsules
Relationships Have Architectural Significance
Relationships Identify Which Capsules Can
Affect One Another Other Through Direct
Communication




CSE333
DOC/UML.48
Research Of UML Tools -Paradigm Plus
Enterprise Component Modeling (ECM: Share and
Reuse of Components Across Projects)
Models Business Processes
Object Repository for Component Sharing and
Reuse and to Reverse Engineer Legacy Software
Fully Integrated Business Process Modeling,
Object Modeling, and Physical Database Modeling
OOCL (Object Oriented Change and Learning)
Business Managers Capture, Model, and
Communicate Corporate Strategies to
Development Teams by Mapping Business
Requirements Directly Into Use-case, Object, and
Physical Database Models



CSE333
DOC/UML.49
Paradigm Plus - Business Process Model



CSE333
DOC/UML.50
Paradigm Plus - Physical Database
Modeling



CSE333
DOC/UML.51
Paradigm Plus - Component Based
Development



CSE333
DOC/UML.52
Paradigm Plus And Uml - Class Diagram



CSE333
DOC/UML.53
Paradigm Plus And Uml -
Use Case, State, and Object Diagrams



CSE333
DOC/UML.54
Paradigm Plus And Uml -
Sequence And Component Diagram



CSE333
DOC/UML.55
Paradigm Plus And Uml -
Phys Database And Collaboration Diagram



CSE333
DOC/UML.56
Paradigm Plus And Uml -
Project And Deployment Diagrams



CSE333
DOC/UML.57
Paradigm Plus
Enhancements To UML for Doc
Use Case Diagram
Communication Types
Sequence Diagram
Timing Related Interactions
Deployment Diagram
Additions to Physical Components
Project Diagram
Not Directly Related To DOC
Useful in Project Management Activities For
Team Leaders and Middle Management
ECM
Not Directly Related To DOC. Could Be Used
in Software Systems Engineering.



CSE333
DOC/UML.58
Together


Product of Object International, Inc.
Http://www.Oi.Com/
Together/j & Together/c++
Combined to Together Control Center
President and Founder Peter Coad
Coad Conducts Workshops and Performs
Corporate Consultations
Publishes Books on Modeling
Provides Extensions to UML
Tries to Propagate His Own Model Called
Coad Object Model and Archetypes




CSE333
DOC/UML.59
Together

- Features
Supports C++ and Java
Round-trip Engineering
Works Directly With Source Files, Thus No
Intermediate Repository Necessary
UML Diagrams, Coad Object Models
Generation of System Documentation
Configurability of Reverse Engineering and Code
Generation
Rational Rose Import/Export
Import Relational Schema (Oracle, Access, etc.)
Open API for Extensibility
Availability on Multiple OS Platforms
Supports IDL for CORBA and COM



CSE333
DOC/UML.60
Together - Screenshot

You might also like