Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Adobe Photoshop 7.0 Serial

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

15-413

Lecture Notes on
CASE-Tools: Together/J
David Garmire
Carnegie Mellon University
2

Slides developed by Geunter Teubner


Technische Universitaet Muenchen
Institut fuer Informatik

23 September 1999

David Garmire 15-413 Software Engineering Fall 1998 1


Outline of the lecture

❖ What is CASE?
w Typical components of CASE tools
❖ Major goals and concepts
w Lifecycle support
w Roundtrip engineering
❖ Working with Together/J
w The windows of Together/J
w Creating and modifying class diagrams
w Handling complexity with packages
w Code and documentation generation

David Garmire 15-413 Software Engineering Fall 1998 2


What means CASE?

❖ The acronym CASE stands for


w Computer
w Aided
w Software
w Engineering

❖ The term CASE tool covers tools supporting the software


engineering process. In reality, often even tools which
support only one particular part of this process (such as
compilers, editors, UI generators) are called CASE tools.
❖ Our definition is: CASE tools are browsers and editors for
models in graphical and textual form.

David Garmire 15-413 Software Engineering Fall 1998 3


Typical components of CASE tools

❖ Typical functionality
w browsing and editing with a graphical user interface
w automatic code generation
w documentation generation
❖ Project repository
w persistent storage of all development documents
w integrated version control system
w concurrent, distributed modeling
❖ Interface to other tools
w software development tools
w process and workflow modeling tools
w offering a scripting language

David Garmire 15-413 Software Engineering Fall 1998 4


The goal: Full lifecycle support

❖ The goal behind CASE is to support all the activities of


software development with a single tool.

Analysis Design Implementation Testing Maintenance

David Garmire 15-413 Software Engineering Fall 1998 5


Current situation: Quality of support differs

❖ Not all aspects of the software engineering process are


supported by today’s CASE-tools !
❖ Good support for
w requirements analysis (class diagrams, use cases, etc.)
w implementation
❖ Moderate support for
w system design
w testing
w maintenance
❖ Poor support for
w requirements elicitation

David Garmire 15-413 Software Engineering Fall 1998 6


Quality of CASE support today

Quality of support (according to Ian Sommerville)

Excellent

Good

Moderate

Poor

Requirements Formal Function Data Object-oriented Programming Testing Maintenance Management


definition specification oriented modeling design
design

Activity
David Garmire 15-413 Software Engineering Fall 1998 7
Level of integration

❖ not integrated
w separate CASE tools exist for different parts of the software
engineering activities
w each tool has its own set of project documents and a unique
user interface
w the user works with multiple tools
❖ integrated
w all tools are working on the same project documents
w a tool can trigger activities of other tools (e.g. start an formal
integrity check after a model has been changed)
w the tools share one common user interface
w the user has the feeling of working with one tool

David Garmire 15-413 Software Engineering Fall 1998 8


Advantages and promises of CASE tools

❖ Integrated development environment


w unique user interface
w automation of tedious tasks (e.g. code generation)
❖ Guidance in developing
w common language for all developers
w correct use of description techniques
w methodical developing steps
❖ Consistency between model and documentation
w documentation is generated out of the model instead being
written separately.
❖ Reuse of existing models for new systems

David Garmire 15-413 Software Engineering Fall 1998 9


Problems and disadvantages of CASE Tools

❖ Long learning curves


w complex functionality
w confusing user interfaces
❖ Limited to
w one notation
w one language
❖ Multi-User support is weak
w “merging” of models is poorly automated
❖ Costs
w CASE tools belong to the most expensive tools in SE
w CASE tools require high administration effort

David Garmire 15-413 Software Engineering Fall 1998 10


Impact of CASE technology

❖ CASE technology has resulted in significant


improvements in quality and productivity.
❖ However, the scale of these improvements is less than
was initially predicted by early technology developers

w Many project management problems are not amenable to


automation.
w CASE systems are still not integrated.
w Adopters of CASE technology underestimated the training
and process adaptation costs.

David Garmire 15-413 Software Engineering Fall 1998 11


Forward Engineering

Employee
❖ Forward engineering is the
generation of skeleton code
out of the analysis or design
models. The developer still has Staff Professor
to write the bodies of the
methods.

❖ Typical flow of events


Create or modify an object
model for a system
w Generate the code for this
public class Staff extends Employee
{
model }
.......

w Allow external modification public class Professor extends Employee


of this code {
.......
}

David Garmire 15-413 Software Engineering Fall 1998 12


Reverse Engineering

public class Staff extends Employee


❖ Reverse engineering is the {
.......
recreation of an analysis or }
design model from existing public class Professor extends Employee
code. {
.......
}

❖ Typical flow of events

w Scan a set of already existing


source code files
w Generate the object model Employee
for these files
w Allow now modifications on
this object model
Staff Professor

David Garmire 15-413 Software Engineering Fall 1998 13


Roundtrip Engineering

Employee

Object Model
Reverse Engineering
Staff
Slave Professor
Master

public class Staff


Slave extends Employee
{
.......
} Forward Engineering
Code
public class Professor
Master extends
extends
Employee
Employee
{
.......
}

David Garmire 15-413 Software Engineering Fall 1998 14


Why roundtrip engineering?

❖ Automatic code generation out of the models developed


during the design phase is easier, faster and error free
than doing it manually.

❖ Developers can use specialized tools for editing and


debugging that allow faster and easier editing and
shorter turnaround cycles during debugging.

❖ With reverse engineering, existing code can be


discussed and modified on a better manageable basis.
Reverse engineering also allows developers to create
models for old, never modeled systems.

David Garmire 15-413 Software Engineering Fall 1998 15


Reverse engineering vs. Reengineering

❖ Reverse Engineering
w means analyzing existing software with the purpose of
understanding its design and specification.
w may be part of a reengineering project but may also be used to
respecify a system for reimplementation.

❖ Reengineering
w means restructuring or rewriting parts or all of a legacy
system without changing its functionality.
w involves adding effort to make it easier to maintain. The
system may be restructured and redocumented.

David Garmire 15-413 Software Engineering Fall 1998 16


David Garmire 15-413 Software Engineering Fall 1998 17
Together/J

❖ supports UML 1.1


❖ supports Java, C++ and Object Cobol
❖ supports forward and reverse engineering
❖ supports generation of documentation from the model
❖ is written in 100% Java

❖ A free version (whiteboard edition) can be found under


www.togetherj.com

David Garmire 15-413 Software Engineering Fall 1998 18


Working with Together/J (continued)

❖ Together/J supports
w class diagrams
w sequence diagrams
w collaboration diagrams
w use case diagrams
w state transition diagrams

❖ Diagrams can be modified in two ways:


w Graphically: by drawing lines (associations, ...), rectangles
(classes, packages, ...) in the diagram pane.
w Menu-based: by selecting an entity in the diagram pane and
using the options in the inspector pane to change its
properties.

David Garmire 15-413 Software Engineering Fall 1998 19


Model management in 15-413

❖ Many models will be created during 15-413


❖ Together/J doesn’t have a configuration management
system

➭ A model management strategy and has to be defined for


PAID to avoid conflicts. This is to be done by the
architecture team and includes the following topics:
w which models should be created for PAID
w how are the models organized (e.g. by subsystems)
w where are the models stored
w who is allowed to access different models
w selection of a configuration management system

David Garmire 15-413 Software Engineering Fall 1998 20


Skills expected from you

❖ Handling the windows of Together/J


❖ Creating and modifying classes
❖ Creating and modifying attributes
❖ Creating and modifying associations
❖ Creating and using packages
❖ Creating and using logical packages
❖ Handling the other diagram types
❖ Creating documentation
❖ Code-Generation

David Garmire 15-413 Software Engineering Fall 1998 21


Together/J’s windows

❖ After starting Together/J, the main window appears


w it contains all project-wide commands such as “Open ...”,
“Save...” and “Exit” as well as the menus for creating
documentation or calling scripts.
➭ There is exactly one main window for the project.

v When you open a project, a browser window appears


w it shows one diagram from the project. The user can modify
this diagram in the browser window.
w the first browser window always displays the top-level object
model of the project.
➭ The user can then open and work with multiple browser
windows for different diagrams simultaneously.

David Garmire 15-413 Software Engineering Fall 1998 22


The main window
The
Themain
mainwindow
windowcontains
containsall
all
standard menus plus the some
standard menus plus the some
features
featureslike
likedocumentation
documentation
generation
generationininthe
the“Tools”
“Tools”menu.
menu.

David Garmire 15-413 Software Engineering Fall 1998 23


A browser window of Together/J

❖ shows exactly one diagram of the project


❖ is split into 5 parts
w The navigation pane: a hierarchy tree representing the package
hierarchy of the project. It is used to switch to other diagrams.
w The diagram pane: a drawing area containing the diagram
itself. Allows graphical modifications of the diagram.
w The toolbar. It contains different buttons for each diagram
type.
w The text pane: shows the source code for a class that is selected
in the diagram pane. Is not visible for other diagrams than
class diagrams.
w The inspector pane: an area where specific attributes of the
currently selected item can be edited. The contents of this area
changes when you click on different elements of the diagram.

David Garmire 15-413 Software Engineering Fall 1998 24


Elements of a browser window

Toolbar
Toolbar

Navigation
Navigationpane Diagram
pane Diagrampane
pane

Text
Textpane
pane
Inspector
Inspectorpane
pane

David Garmire 15-413 Software Engineering Fall 1998 25


Starting or opening a project

❖ Select “New Project ...” or “Open Project ...” from the


“File” menu of the main window.

❖ Give your project a name and enter a path for all the
files which are produced while you are modeling your
system.

❖ When you click on the “Advanced” option, two text


areas appear where you can specify additional paths for
your class files (sourcepath) and directories with Java
classes (classpath) which you want to use in your project.

David Garmire 15-413 Software Engineering Fall 1998 26


Starting a new project
Every
Everyproject
projectmust
musthave
haveaaname
name
and
andaadirectory
directorywhere
whereall
allproject
project
files
files and the Java sources arestored.
and the Java sources are stored.

You
Youcan
canspecify
specifyalternative
alternativesource
source
paths
pathsand
andadditional
additionalclasspaths
classpathsfor
for
your
yourproject.
project.
David Garmire 15-413 Software Engineering Fall 1998 27
Creating classes

❖ To create a new class


w select the “New Class” button in the toolbar
w draw a rectangle in the diagram pane
w change the default name for the class to the proper one
w use the inspector pane to modify other properties of the class
(author, version, etc.)

❖ You can always change the properties of the class later.

David Garmire 15-413 Software Engineering Fall 1998 28


Creating classes (example)

Select
Selectthe
the“New
“Newclass”
class”button
buttonin
inthe
the
toolbar
toolbarand
anddraw
drawaarectangle
rectanglein
inthe
the
diagram
diagram pane. You can then insertthe
pane. You can then insert the
name of your new class.
name of your new class.

David Garmire 15-413 Software Engineering Fall 1998 29


Adding and editing attributes

❖ To add an attribute
w right click on the class in the diagram pane
w select “New attribute ...” from the context menu
w enter the name of the attribute

❖ To modify an attribute
w click on the attribute in the diagram pane
w use the inspector pane to change to change to properties of the
attribute

David Garmire 15-413 Software Engineering Fall 1998 30


Adding and editing attributes

Click
Clickon
onthe
theattribute
attributein
inthe
thediagram
diagrampane
pane
and use the inspector pane to modify the
and use the inspector pane to modify the
attribute.
attribute.

David Garmire 15-413 Software Engineering Fall 1998 31


Generalization (Inheritance)

❖ To define a generalization
w click on the “Generalization” button in the toolbar
w draw a line from the subclass to the superclass. You don’t
have to hit certain points of the rectangles; it’s enough when
you start the line within the subclass and release the mouse
button in the superclass.

❖ To change a generalization
w click on one end of the arrow and drag it to the new subclass
respective superclass.

David Garmire 15-413 Software Engineering Fall 1998 32


Generalization (Inheritance)

Select
Selectthe
the“Generalization”
“Generalization”button
buttonin
inthe
the
toolbar and draw a line from the subclass
toolbar and draw a line from the subclass
(“Student”)
(“Student”)totothe
thesuperclass
superclass(“Person”).
(“Person”).

David Garmire 15-413 Software Engineering Fall 1998 33


Mastering complexity with Packages

❖ Large systems can easily lead to ravioli models which


are nearly unreadable.
w Example: The system architecture of StarNetwork (next slide)

❖ UML packages are organizing constructs on project level


w they are hierarchical (a package can contain other packages)
w a UML package can correspond to
– a Java package (such as java.util, java.math)
– a PAID subsystem
w during code generation every package becomes a directory.
Together/J parses all packages recursively.

David Garmire 15-413 Software Engineering Fall 1998 34


StarNetwork
Systemüberblick
Zentrale
Eingabe
Start durch Werkstatt ID übergabe
Browser (JAR File Werkstatt ID WWW-Server
Auswahl)
CGI
dynamisch generierte HTML-Seite

verschiedene Systeme
User Login User überprüfen,
Authentifizierung &
(=Startapplet) Startkonfiguration
Startkonfiguration

Start
Übergabe Userinfo,Startkonfiguration Service Konfigurations-
Service
Supervisor & frontend für
Service anfordern
Kopierschutz Werkstatt
Manager
Konfigurations-
Konfigurationsdaten
Start, Konfigurationsdaten service
auslesen

77 ±± 22 == 41
für Servicelocationen
StarManager Lizenzschlüssel

41 ??
& Dienste abrufen Konfigurations-
(Druckdienst, Lizenzkontroll
frontend in
Copy & Paste) Service
Zentrale
Start,Übergabe
Start,
Abfrage Nutzung StarBus, Benutzer
Integration
in Oberfläche registrierter Koordination der
Start der Server beim Händler
Applikationen, Datenbeschaffung
Startklassen falls vorhanden
Nutzung Dienste
und Übergabe Service Manager holen
der Lizenzinfo Service
Nutzung DataBus Service Supervisor &
Tools StarBus
Kopierschutz

DataBus Tracing
Server Service
Steuerung
StarBus-Service

StarList
Verbindung zu
DMS für
Shoppinglisten
Steuerung löschen
Bookmark-
verwaltungs-
service
Auslesen
Auftragsinfo
Is
Is this
this UML
UML ??
lesen/schreiben
bearbeiten Händlersystem
Client Händlersystem
Zugriff über
"Backend"
Shoppinglist-
Interface
StarIdent Auslesen
Shopping-Liste(n) Shoppingliste
Service

StarNavigator
FDK auslesen
über FIN,
Daten
Teilerecherche

Teilerecherche ISBI-Backend
What
Whatdoes
doesthis
this
arrow
arrowmean
mean??
manuelle Service (ISBI++) "Voyager"
Zugriff über Identifikation
Navigator-
interface
manuelles Feedback Feedback Feedback-
StarFeedback
(vom Benutzer ausgelöst) Service Backend
Registration am GUI,
Applikationswechsel
Nutzung von Navigations-
Diensten, information FDK FDK-Backend
Zugang zu StarBus, auslesen Service (Fdok)
Verwaltung
Paßwort überprüfen Bookmarks

Zugriff über Fahrzeug-


Feedback- identifikations-
Interface service
FDK

Navigationsdaten Daten manuelle


Service Identifikation
Anwendungen im Auslesen der Konfiguration Konfiguration
StarNetwork
lesen/schreiben Shoppinglist
StarBookmark StarBroadcast StarBroadcast
auch
Nutzung StarBus StarBus
Empfänger Rückkanal Sender
automatisches
Feedback
Feedback

StarBroker Teilerecherche
Updatemanager auf
Service Anstoß bestimmter Aktionen zentralem
Händlersystem
anfordern mittels Kommandoschnittstelle Server
Auslesen spezieller
FDK
Fahrzeuginformation StartParts
gemeinsame andere
Erzeugen und Test auf Service
Bibliotheken StarParts Bookmarkverwaltung Datenquellen
Existenz von Vorgängen
(auch für Tools)

Tool Interfaces
Oberflächenelemente StarWorkshop
Layoutmanager Service
StarWorkshop
Standardobservables
Internationalisierung
David Garmire Model/View/Control
Collection-Classes
15-413 Software Engineering Fall 1998 35
Standardalgorithmen
Hot Keys
Creating packages

❖ Packages are created in the same way as classes are:


w select the “New Package” button in the toolbar
w draw a rectangle in the diagram pane
w change the default name for the package to the proper one
w use the inspector pane to modify other properties of the
package (author, version, etc.)

❖ To organize classes and interfaces into packages simply


drag the class/interface into the package.

David Garmire 15-413 Software Engineering Fall 1998 36


Mastering complexity with Packages
Create
Createaapackage
package

The
Theproject
projectconsists
consistsof
ofnine
nineclasses
classesand
andoneone
interface.
interface.Humans
Humanscontains
containsfive
fiveclasses,
classes,
Institutions
Institutionscontains
containsfour
fourclasses.
classes.

David Garmire 15-413 Software Engineering Fall 1998 37


Providing different views: Logical packages

❖ TogetherJ allows you to create additional views on your


project. These views are called logical packages but have
nothing in common with the UML or Java packages.
❖ You can use this feature to layout the same class
diagram in different ways
❖ To create a logical package simply create a new class
diagram within a package. This diagram gets the suffix
“.vfClass” and can be manipulated just like every other
class diagram.
❖ You can now simply drag some classes into this new
logical package or create new classes, associations, etc.
there.

David Garmire 15-413 Software Engineering Fall 1998 38


Logical packages: An example

❖ In this example we create a new class diagram called


“WhoTeachesWhom” in the package “Humans”.
❖ We then drag “Professor”, “Staff” and “Student” into
this new view and create an association between the
classes “Professor” and “Student”. We also add a little
note that a professor does not teach staff members.
❖ Note that the new association is handled as if it has
been defined in the default view on the package
“Humans” but it is visible only in our newly created
logical package “WhoTeachesWhom”.

David Garmire 15-413 Software Engineering Fall 1998 39


Inside a logical package

The
Thelogical
logicalpackage
package“WhoTeachesWhom”
“WhoTeachesWhom”
can
canbe
behandled
handledlike
likeevery
everyother
otherclass
class
diagram but the classes in this package
diagram but the classes in this package
are
areonly
onlyreferences
referencestotothose
thoseoutside
outside
in the package “Humans”.
in the package “Humans”.

David Garmire 15-413 Software Engineering Fall 1998 40


Creating and navigating through diagrams

❖ To create a new diagram


w right-click on the package name for which you want to create
a new diagram
w select “New Diagram ...” from the context menu
w select the diagram type and give the diagram a name

❖ To switch to another diagram


w right-click on the name of the diagram in the navigation pane
w select “Browse ...” to open the new diagram in the current
window
w select “Browse in new window ...” to open a new browser
window

David Garmire 15-413 Software Engineering Fall 1998 41


Creating and navigating through diagrams

The
Thecurrently
currentlyselected
selecteddiagram
diagramisisthe
thestandard
standard
view (“Default.vfPackage”) but the package
view (“Default.vfPackage”) but the package
“Institutions”
“Institutions”also
alsocontains
containsaasequence
sequence
diagram
diagram(“GetCourseList”)
(“GetCourseList”)and
andaause
usecase
case
diagram (“HowToContact”).
diagram (“HowToContact”).
David Garmire 15-413 Software Engineering Fall 1998 42
Creating documentation

❖ You can create documentation in HTML format either


for one diagram or for the complete project.
❖ To do this, select “Create documentation” from the
menu “Tools” of the main window. Together/J creates
clickable images containing the class diagrams as well
as textual descriptions for all packages and classes.

➭ Hint: Separate the documentation directory from your project


directory. Otherwise the documentation folder(s) will appear
as (sub)packages in your project when you open it the next
time. (This is a side-effect of the recursive directory scan
which is always performed when you open a project)

David Garmire 15-413 Software Engineering Fall 1998 43


Generate HTML documentation for the whole project

Select
Selectan
anappropriate
appropriatedirectory
directory
and
and the “multi-frame”option
the “multi-frame” option
for the documentation. You
for the documentation. You
might
mightalso
alsowant
wanttotolaunch
launchthe
the
browser
browserimmediately
immediatelyafter
afterthe
the
documentation has been
documentation has been
generated.
generated.

An example for automatically generated


documentation can be found on the next slide!

David Garmire 15-413 Software Engineering Fall 1998 44


David Garmire 15-413 Software Engineering Fall 1998 45
Generating code

❖ Together/J automatically creates the files with the Java


source code for all classes in a project when you safe the
project. By default, the source files are in the same
directory hierarchy as the project files are.
❖ The code contains comments with Together/J-specific
information. These comments are used when you open
the project again. No developer should modify or delete
them.

David Garmire 15-413 Software Engineering Fall 1998 46


Automatically generated code (example)

These
Theselabels
labelswithin
withincomments
commentsare are
used by Together/J to re-create the
used by Together/J to re-create the
model.
model.Do
Donot
notmodify
modifyor ordelete
deletethem!
them!

David Garmire 15-413 Software Engineering Fall 1998 47


CASE Tutorial in SE Lab

❖ Split into groups (1 machine has 1 group composed of many people).


w Donut – Workflow
w Viennese – Authoring
w Brazilroast – Model
w Konablend – Inspection
w Bluemountain – Augmented Reality
w Java – Repair
❖ Go to the Software Engineering Lab.
❖ Follow the instructions on the handout.
❖ If you have questions, I will be along shortly to help.

David Garmire 15-413 Software Engineering Fall 1998 48

You might also like