[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci Dept] / [R J Botting] / [Samples] / uml3
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Comment/Contact] [Search ]
Tue Sep 18 15:27:24 PDT 2007

Contents


    Using Rational Rose 4.0

      This is part of the notes on the Unified Modelling Language [ uml.html ] that describes how to use Rational's own CASE tool to help you develop object-oriented software.

      Go to [ stud_edition.jtmpl ] to download a student edition evaluation copy of Rational Rose for Windows.

      See Hints to find out more about using Rational Rose in general.

      Access to Rose from a UNIX Workstation

        This is no longer available.

      . . . . . . . . . ( end of section Access to Rose from a UNIX Workstation) <<Contents | End>>

      Using Rational Rose

        Introduction

        There is more to Rose than drawing diagrams! It is set up to be a way of completely describing a set of problems and their solutions. In addition to the diagrams a model also contains a variety of specifications and documentation. Indeed objects can be modeled in Rose that do not appear in any diagram. The delete key, for example, removes a box from the diagram but leaves it, hidden, in the model.

        Hints

          Buttons on Mouse

          Use the left-hand button on the mouse to click on a tool and then click on the drawing ... and it will create the icon from the tool bar. You can now type its name.

          Use the left hand button to select objects and drag them around the screen.

          Click with your left button on an icon and some little black boxes appear that are called handles. You can now use the left hand mouse button to drag a handle. This resizes the icon.

          The Right Button pops up a menu for the object you click. It lets you change the visible contents of boxes and links, and also the invisible details held in the objects Specification.

          The Browser Window

          The Browser window shows you all the different parts of you model. IT is a MicroSoft style hierarchic list. Click on a + in a box to see what is inside its item. Click on a - in a box to hide the context.

          In your Browser window is the outline of all the documentation needed for a real life project. Use the Left-hand button on the mouse to open and close objects in the browser. Clicking with the right hand button opens up a meno of useful short cuts. One of the quickest ways to put a class on file or to create a new diagram is to click the place in the browser where it fits with the Right hand button and select New->... You can then type in its name. Use the left hand button to select a newly named object and you can describe it in simple English in the documentation window. Use the Left hand button to drag symbols from the browser onto diagrams.

          The browser will show you items that are deleted from diagrams but are still in the model. You can drag items from place to place inside the hierarchy. This means that a picture of the object appears in the diagram -- complete with its connections to other objects etc.

          To completely remove an object from your model use the right hand button to pop up a short cut menu and select Delete.

          Creating Things

          With the Left button select a button from the tool box of square buttons to the left of the diagram and right of the browser. Then click on the diagram where you want the icon to appear. Type in the name of the box (or text for a comment etc). This also adds the new ico to the browser.

          Naming Things

          Follow these conventions: Class names (boxes) begin with a uppercase letter but other things start with a lowercase letter. Always take a little time to choose a good name for a new item. Only reuse a name if you actually want the old object! If to things have the same name then Rose treats them as being the same thing... even in different diagrams! Check the spelling!

          Views

          The Views menu (at the top of the Rose window) has some useful features. Firstly it has the Refresh entry to tidy up any half exposed images that are sometimes left on the screen. Secondly, it lets you show or hide two special windows: the Browser and the the Documentation. Hide them when you have a big diagram!

          Documenting things

          Documentation is a piece of text that can be added to any box or line on the diagram. When the exposed the Documentation widow appears at the bottom left of the diagram. When you select an item in the diagram its documentation appears in the documentation box and you can then edit it. It is easy to create a new box and then click and type in the documentation into the documentation box. Use this to explain what the item means to you in simple natural terms.

          Specifying Things

          Rose attaches a detailed specification to every class, operation, component, actor, use-case, etc that you create. This is done by using the right hand button of the mouse to click the icon in the browser or a diagram. Then select Specification in the menu of short cuts. See Specifications below.

          Making Connections

          To connect icons... select a tool that shows a link and then click in one icon, and drag, slowly, slowly to the other.

          By releasing the button while drawing a link you can make the link "turn a corner" on it's way to the other box.

          Change Appearance of Link or Box

          To change the displayed form of an icon put the cursor on an object and hold down the right hand button. Pick the change you want from the menu of commands will appear. You can suppress or display different pieces of information: the operations, the attributes, the signatures, etc etc.

          To change the appearance of an Icon, select it with the left hand button and use the Edit menu at the top of the window. This is good for fonts, colors etc.

          To change the appearance of an link, select it with the left hand button and use the Edit menu at the top of the window. This is good for changing from slanting to rectilinear lines!

          Changing Details

          To change the contents of an icon put the cursor on an object and hold down the right hand button. Pick "Open Specification" item.

          Specification

          A Specification supplies lots of relevant details. It is very like a Windows95 Properties dialogue. By opening different "tabs" you can give a general description, details, and list the operations and attributes.

          To insert and delete operations and attributes open the matching "tab" and use the Ins and/or Del keys. If you don't have these keys, try clicking with the Right-hand Button on the mouse and selecting Insert or Delete from the pop-up menu.

          Often the items listed in a "tab" also have a specification that you can get to by using the righthand button on the mouse.

          Changing Properties of Links

          To change the detailed meaning, cardinalities, multiplicities, roles, visibillities etc etc of a link hold down the right hand mouse button at the correct part of the link and select a suitable item from the pop-up menu.

          In a specification there are several "tabs" each with special fields. There may be a special large field for a list of things (attributes, operations, relations, etc). You can add a new line by tapping the "Insert" button on your keyboard... or by using the righthand button of the mouse with the cursor in this area. You can even open a second specification to edit the details on a line in one of these tables.

          Deletion

          In Rose you can use the backspace and DELete keys to edit text in the normal way. You can remove a link or box from a diagram by selecting it and tapping the DELete key. However Rose keeps a record of boxes and some other items in the "Browser" window (see Views above). You can remove a box from a model completely and permanently by selecting it, holding down the CTRL key and tapping the "D" key. This will check that you want to remove the item before doing so.

          Notice that deleting a box or link by tapping the Del key does not remove it from the model! It becomes invisible but is still in the specifications. There is an item under the Edit menu to do this: Delete from model. You can delete relation between classes by opening the specification selecting the Relationships Tab, clicking the unwanted relation and then tapping 'Del' or using the right hand button to pop up a menu that includes Delete.

          Cut and Paste

          You can use the scissors (cut Icon) in the tool bar (or the Edit->Cut menu item) to cut things and save them on a clipboard... you can also Copy and Paste them. This gives you two images of the same thing. Change one and both will be updated.

          The Browser Menu

          The Browser menu is used for switching between different diagrams. For example you can move from the default main class model to a main USeCase model or sequence diagram via this menu.

          Printing

          You should be able to print out diagrams using the File Menu -> Print Diagrams. The File->Print Specification menu prints outs a complete list of all the class and links and their specification. This is only useful when you want a permanent record of a model with many complex specifications.

          If this print does not work use the File->Print Setup dialogue to set the printing to produce a PostScript file with some name or other, say rose.ps. Then File->Print Diagrams. Orion should be able to print these files in the Printer room:

           		lpr rose.ps

          If this does not work.... Then you need to transfer the file to your work station. See the section on the File Transfer Protocol program FTP below. A file on your workstation can be printed in your lab(JB358 or JB359) by this command:

           		lpr rose.ps
          In the graphic file manager, if you double click the file you will be able to preview it before printing!

          Saving

          Don't forget to File->Save before you File->Quit. It puts the information into a file with suffix ".mdl" but it fits the American Standard Code for Information Interchange(ASCII). You can open a saved model in an editor if you want, and you can easily transfer it to floppy disks or other computers.

          Moving Models Across the Internet

          You can download *.mdl files through Netscape by 'shift-clicking' their link and Saving as....->Source. You can publish models on the web in the normal way [ publishing ]

          You can also move them around using the FTP protocol below.

        . . . . . . . . . ( end of section Hints) <<Contents | End>>

      . . . . . . . . . ( end of section Using Rational Rose) <<Contents | End>>

      Example Models

        The following are some models that you can download (shift+click in Netscape) on a machine with Rose and then view with Rose.

        CS201/CS202

        [ lab01.mdl ] [ Stack.mdl ] [ elist.mdl ] [ family.mdl ] [ family.mdl ] [ mem.mdl ]

        A package defining parts of C++ that can be imported and used in other models: [ c++.ptl ]

        Larger: [ CSciNetwork.mdl ]

        CS320

        [ http://csci.csusb.edu/dick/cs320/handouts/ ] [ http://csci.csusb.edu/dick/cs320/sebesta/ ]

      . . . . . . . . . ( end of section Example Models) <<Contents | End>>

      Glossary

    1. FTP::=File Transfer Protocol,
    2. ftp::program=file transfer program. This is how you move a file from Orion to your own home directory:
       	$ ftp
       	ftp> open orion
       	Connected to orion.
       	220 orion FTP server (UNIX(r) System V Release 4.0) ready.
       	Name (orion:dick):
       	331 Password required for dick.
       	Password:
       	230 User dick logged in.
       	ftp> get rose.ps
       	local: rose.ps remote: rose.ps
       	200 PORT command successful.
       	150 ASCII data connection for rose.ps (139.182.38.68,1308) (48190 bytes).
       	226 ASCII Transfer complete.
       	49818 bytes received in 0.0634 secs (7.7e+02 Kbytes/sec)
       	ftp> quit
       	221 Goodbye.

    3. CASE::= Computer Added Software Engineering.

    4. DISPLAY::= A shell variable that names the machine and the the VDU on the machine where windows etc will appear.

    5. Orion::=An upgraded Sun Server with 4 parallel high speed Reduced Instruction Set Computers -- SPARKS.

    6. orion::=the name used on the csci.csusb.edu network to refer to Orion

    7. shell::= any program that interprets commands input by a user or from a file.

    8. Sun::=Short for: Stanford University Network -- Now the name of a popular manufacturer of workstations.

    9. VDU::=Visual Display Unit.

    10. rlogin::UNIX_command=Remote Login, it allows you to use one computer to do work on another computer. It lets you use a computer anywhere on the Internet where you have an account.
    11. slogin::UNIX_command=a secure form of rlogin, only works when both machines have the facilities else defaults to rlogin.
    12. exit::UNIX_command=Terminate session/shell.
    13. hostname::=UNIX_command=outputs name of the machine the command is executed by.
    14. xhost::X_windows=add machine to access control list(ACL) for this machine.
    15. rose::local_command=start Rational Rose processes.
    16. thorn::local_command=stop rational Rose processes.

    17. one_line_summary::= xhost; slogin; rose; use_it; thorn; exit.

      Alternatives

      We have negotiated a partnership with Rational. They will be supplying a MSWindows version of Rose that will run on the workstations

    . . . . . . . . . ( end of section Using Rational Rose 4.0) <<Contents | End>>

End