Title: Use of starUML
1Use of starUML
2Outline
- Managing Project
- Creating a new element
- Modeling with UseCase Diagram
- Modeling with Sequence Diagram
- Modeling with other Diagram
- Generating Codes and Documents
3Managing Project
- In order to work on a new software development, a
new project must be created. - You may start with
- a completely empty project
- a new project that has been initialized according
to a specific approach.
4Procedure for Creating New Project
- New Project
- Select the File -gt New Project menu.
- Select New Project Dialog Box
- Select the File -gt Select New Project menu.
- In the dialog box, you can set the default
approach. - Approach is applied in the beginning of the
project to determine the initial model structure.
5Approach For Rational Software
- Rational Rose is organised around the following
views of a software project - Use Case
- Logical
- Component
- Deployment
6Approach For Rational Software
Use case view
- The use-case view helps you to understand and use
the system. - This view looks at how actors and use cases
interact. - The diagrams in this view are
- Use-case diagrams
- Sequence diagrams
- Collaboration diagrams
- Activity diagrams
- This view contains a Main diagram by default.
Additional diagrams can be added throughout the
analysis and design process.
7Approach For Rational Software
Logical view
- The logical view looks at classes and their
relationships. - The diagrams in this view are
- Class diagrams
- Statechart diagrams.
8Approach For Rational Software
Component view
- The component view addresses the software
organisation of the system. - This view contains only component diagrams.
9Approach For Rational Software
Deployment view
- The deployment view shows the mapping of
processes to hardware. This type of diagram is
most useful in a distributed architecture
environment where you might have applications and
servers at different locations. - This view contains only the deployment diagram.
10Other procedures for project management (1)
- Opening Project
- Select the File -gt Open menu.
- Saving Project
- Select the File -gt Save menu. (.uml)
- Closing Project
- Select the File -gt Close menu
11Other procedures for project management(2)
- Importing a Framework
- In order to use a framework in a project, the
framework must be loaded. Once a framework is
loaded, all the elements contained in the
framework can be used. - Procedure for Importing Framework
- Select the File -gt Import -gt Framework
menu. - At the Import Framework dialog box, select a
framework to import and click the OK button. - The Select Element dialog box appears, to
determine which element will contain the
framework to import. Select an element (package,
model, subsystem, or project) to contain the
framework and click the OK button. - The framework is added to the selected element.
12How to manage a project separately by each
developers
- Procedure for Creating New Unit
- Only Package, Model and Subsystem elements can be
saved as units. - Select an element (package, model or subsystem)
to make into a unit, then use the menu.
13Procedure for Merging Unit
- If the elements in a unit no longer need to be
managed as a separate unit, the unit file can be
merged with the project. - Select from the model explorer an element
(project, model, package or subsystem) that will
contain the unit to import. - Right-click and select the Unit -gt Uncontrol
Unit menu. - The unit is merged with the selected project or
parent unit. - Note
- Merging a unit does not automatically
delete the unit file (.UNT). Please delete it
manually if no longer required.
14Procedure for Saving/Saving as Unit
- Select the unit to save from the model.
15Creating a new element(1)
- create a new element in the diagram from the
pallet. - Select an element type to create from the pallet.
- Click a location in the diagram area to create
the element. (Drag the mouse to select an area to
specify the size of the new element. If creating
an element that connects two elements together,
ensure that the connection is made accurately.) - Note
- Click one element twice to create multiple
elements. - Click the the item in the pallet when
creating elements is complete
16Creating a new element(2)
- Besides creating a new element in the diagram
from the pallet, view elements can also be
created for existing model elements. - Select from the model explorer a model to be
represented by the new view element. - Drag the model element and drop it in the diagram
area to create a view element (In this case, the
connections to all the related elements are
automatically displayed).
17Creating a new element(3)
- Elements can also be created by using the
shortcut Generation Syntax. - Select from the diagram area the view.
- Run Quick Dialog as selecting Enter.
- Enter a syntax that is element in the quick
dialog.
(see ltCreating Element by using ShortCut
Generation Syntaxgt in help file.)
18Organizing Model Structure
- Creating Model Element
- Select from the model explorer an element to
contain the new model element. - Right-click and select the Add menu and select
an element type from the menu. Or, select the
Model -gt Add menu from the main menu. - The new model element will be created under the
selected model. - Deleting Model Element
- Moving Model Element(drag)
- Modify Model Element Order
- Model Alignment
19Modeling with UseCase Diagram(1)
- Can change element's view style
- select Format -gt Stereotype Display menu.
- select Decoration item in combo
button on toolbar
20Modeling with UseCase Diagram(2)
Use the properties view to edit the properties of
an element
Right click an element and click collection
editor menu
21Use the Format menu
22Modeling with Sequence Diagram(1)
- If the class has been existed, create object from
class - Drag the class icon in the model explorer into
the sequence diagram - If you want existing class to be assigned to
object, click button in object's
classifier property, and select class to be
assigned to object at the Select a model
element dialog.
- If the class does not exist until now
Add class
The class will be added, and it can be seen in
the model explorer.
23Modeling with Sequence Diagram(2)
To create operation of class as stimulus's
receiver from object and assign it to stimulus
To assign existed operation to stimulus
Enter the stimulus name at the quick dialog and
press Enter key
testMessage not added to the class
24The ActionKind property of stimulus should be
assigned to one of five sort as following. To
change ActionKind property, select stimulus and
select the ActionKind property on the
properties window.
25Modeling with Sequence Diagram(3)
Change interaction operator in the properties
26Modeling with Sequence Diagram(4)
27Modeling with Sequence Diagram(5)
- Convert sequence diagram to collaboration diagram
- Convert collaboration diagram to sequence diagram
28Modeling with other Diagram
- Modeling with Class Diagram
- Modeling with Statechart Diagram
- Modeling with Collaboration Diagram
- Modeling with Activity Diagram
- Modeling with Component Diagram
- Modeling with Deployment Diagram
- Modeling with Composite Structure Diagram
Note the properties of each element.
29Generating Codes and Documents(1)
- Generating Artifacts
- Select Tools-gtStarUML Generator... Menu
- In the Select templates for generation Page,
Check templates to generate in the ListBox and
Click Next Button.
If you want to generate a set of artifacts at
once, you can make a batch that used to generate
a set of artifacts and can run the batch without
selecting a set of templates. Create a new batch
containing selected templates In the Select
templates for generation Page, check templates,
to make as a batch, in List of templates tab,
and click Register to Batch button.
30Generating Codes and Documents(2)
- Installing and Uninstalling Templates
- Templates are installed under the folder
"ltSTARUML_INSTALL_PATHgt\modules\staruml-generator\
templates" - Batches are under the folder "ltSTARUML_INSTALL_PAT
Hgt\modules\staruml-generator\batches". - In general, one template matches one folder and
the folder contains all files associated to the
template. A template includes at least two files.
The first is template description file (.tdf) and
the second is the template document (.cot, .doc,
.xls, .ppt, ...). Batch includes one file that is
batch file (.btf). - Installing templates Simply copy the template
folder to the folder 1 - Uninstalling templatesDelete the template folder
under the folder 2
31Generating Codes and Documents(3)
Be sure the profiles you needed has been included
in.
32Generating Codes and Documents Generating code