Friday, May 17, 2019

Rational Rose Manual

image with sensible bundle couturier take a leak and diversify a UML 2. 0 model into reckon aptitude Level Introductory Eric recollective (emailprotected ibm. com) computer software Engineer IBM 21 Mar 2006 thinking(prenominal) software package couturier virtu altogethery teems with visual tools to handle a number of development tasks. Of most interest to developers are UML modeling, image normals, and UML-to-code transformations. After completing this tutorial, you leave behind know how to work a UML model, apply a number pattern to that model, and, finally, transform the abstract model into genuine code. Section 1. Before you startrational package interior designer provides developers, architects, and analysts visual tools for a wide variety of software development tasks. This tutorial introduces a few of these powerful visual tools UML modeling, blueprint patterns, and UML transformations. About this tutorial Learn how to execute, edit, and analyze UML model s using cerebral computer software fashion designer. This tutorial demonstrates the following clear-sighted software Architect capabilities UML modeling consider with apt computer software Architect copyright IBM friendship 2006. all in all rights reserved. Trademarks Page 1 of 22 developerWorks ibm. com/developerWorks objective patterns UML transformations This tutorial is intended for software developers, architects, and analysts interested in study about keen-witted Software Architects visual modeling capabilities. If you want to learn how to transform high-level UML models into unquestionable code without even knowing a particular programming language, this tutorial is for you. Objectives After completing this tutorial, you will know how to use Rational Software Architect to create UML witnesss and models, apply design patterns to those models (new or alive), and transform UML models into source code or into a different type of model.Prerequisites This tutori al assumes that you have some fellowship of umber programming, and design patterns. Knowledge of UML models is helpful, but not required. System requirements To run the examples in this tutorial, install Rational Software Architect. If you dont have a copy of Rational Software Architect, download a free ravel version. altogether of the prerequisites for Rational Software Architect are located in the Resources section of this tutorial. Section 2. Create a UML modeling bulge out To get started, you need to do some initial set up. First, create a UML project and model. StepsCreating a UML modeling project is very easy stick out with Rational Software Architect Copyright IBM breadbasket 2006. wholly rights reserved. Trademarks Page 2 of 22 ibm. com/developerWorks developerWorks 1. 2. 3. 4. 5. 6. 7. Open Rational Software Architect. Open the standarding perspective by selecting Open Perspective rideing from the Window menu. Make convinced(predicate) all of your open projects are closed. Select New Project from the archive menu. Ensure the read All Wizards box is checked. Expand the Modeling folder. Select UML Project. go through 1. The New Project window 8. 9. come through Next.Name your project DWorks archetypeProject. Figure 2. UML Modeling Project window Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 3 of 22 developerWorks ibm. com/developerWorks 10. Click Next. 11. Fill in the Create a UML project wizard as follows Select UML Modeling for the File types. Select Blank Model for the Templates. Enter PatternModel for the File name. Leave the remaining defaults. The wizard should look like this Figure 3. Create UML Model window Visualize with Rational Software Architect Copyright IBM Corporation 2006.All rights reserved. Trademarks Page 4 of 22 ibm. com/developerWorks developerWorks 12. Click Finish. 13. The Model explorer take in contains your UML Project, DWorksDesignPatter n and your blank UML model, PatternModel. emx. Figure 4. Current Model Explorer view Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 5 of 22 developerWorks ibm. com/developerWorks See, wasnt that easy? Now, on to the more exciting part of the tutorial. Lets build the model using RSAs user-friendly visual tools. Section 3. Model a design patternNow its time to select a design pattern, apply that design pattern to a model, observe all relationships of the pattern, and confer attributes and operations to the model. Design patterns in RSA Rational Software Architect comes incase with support for all of the Gang of Four design patterns. You also have the ability to import and create your own design patterns. Select a design pattern 1. 2. Select Show View another(prenominal) from the Window menu. Expand the Modeling folder and select Pattern Explorer. Figure 5. Select Pattern Explorer Visualize with Rational Software Arc hitect Copyright IBM Corporation 2006.All rights reserved. Trademarks Page 6 of 22 ibm. com/developerWorks developerWorks 3. 4. 5. Click OK. In the Pattern Explorer view, enlarge Design Patterns Behavioral. Select the percipient pattern. Figure 6. The Observer Design Pattern Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 7 of 22 developerWorks ibm. com/developerWorks 6. 7. 8. To learn about the pattern, toggle between the Overview and Short Description tabs at the bottom of the Pattern Explorer view. In the Pattern Explorer view, drag-and-drop Observer onto DesignPatterns blank diagram.The editor should contain an instance of the Observer Design Pattern that looks like this Figure 7. Observer Pattern Instance Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 8 of 22 ibm. com/developerWorks developerWorks Apply a design pattern 1. In DesignPatterns edit or, hover over ConcreteObserver and select Enter argument name/value. Figure 8. Enter argument 2. Name the parameter Shopper, then infatuation Enter. The Observer instance now has a concrete observer named Shopper. Lets add a parameter using a different approach.From the Palette (right of diagram), pervade to expand the Class Diagram section. Figure 9. Palette 3. Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 9 of 22 developerWorks ibm. com/developerWorks 4. 5. 6. Select Class and click anywhere in the diagram (do not click on the Observer instance). Name the newly created class dress and press Enter. Drag-and-drop Order onto ConcreteSubject in the Observer instance. Figure 10. Drag-and-drop ConcreteSubject Visualize with Rational Software Architect Copyright IBM Corporation 2006.All rights reserved. Trademarks Page 10 of 22 ibm. com/developerWorks developerWorks 7. Your diagram should look similar to this (you mi ght not hold endure all of the relationships youll fix that in the next section). Figure 11. Observer instance Observe the design pattern relationships 1. Right-click on any element in the DesignPattern diagram. Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 11 of 22 developerWorks ibm. com/developerWorks 2. Select Filters Show Related Elements from the context menu.Figure 12. Show relationships 3. Select Show All Relationships from the Custom Query list. Figure 13. Show/Hide Relationships Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 12 of 22 ibm. com/developerWorks developerWorks Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 13 of 22 developerWorks ibm. com/developerWorks 4. 5. Click OK You can see all of the elements and relationships represented in this model Figure 14. Observer pattern 6.Now you are ready to add some elements to your blank Observer design pattern model. number methods and attributes to a model Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 14 of 22 ibm. com/developerWorks developerWorks 1. 2. In the PatternModel editor, right-click the Order concrete subject. Select Add UML attribute. Figure 15. Add attribute 3. 4. 5. 6. 7. 8. 9. Type -orderNum String (the - makes the attribute private). touch Enter. Repeat the same steps on Shopper, but name the attribute -custID String.In the PatternModel editor, right-click the Shopper concrete subject. Select Add UML operation. Type +makeOrder() (the + makes the operation public). PatternModels editor should now look like this Figure 16. Observer pattern Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 15 of 22 developerWorks ibm. com/developerWorks favourable work Yo u have stainless your model (a very simple model) and can use Rational Software Architects tools to transform this model into actual code. Section 4. Transform your model into Java codeNow that you have a completed model within your UML project, you are going to transform that model to actual code. Rational Software Architect supports the Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 16 of 22 ibm. com/developerWorks developerWorks following model-to-code transformations out of the box UML - Java UML - EJB UML - XSD UML - CORBA UML - C++ However, if you would like more options, there are integral tools and wizards that let you create custom transformations in Rational Software Architect.You are going to transform your existing model into Java. Transform a UML model to Java code 1. In the Model Explorer view, expand DWorksPatternProject. Figure 17. Expanded project 2. 3. In the Model Explorer view, select both O rder and Shopper. Right-click on either of the selected objects and select Transform Run innovation UML Java. Figure 18. Run transformation Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 17 of 22 developerWorks ibm. com/developerWorks 4.In the Run this Transformation window, click Create new Target Container. Figure 19. Transformation window Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 18 of 22 ibm. com/developerWorks developerWorks 5. In the New Java Project window, name the project DWorksTransformedJava. Figure 20. New Java project Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 19 of 22 developerWorks ibm. com/developerWorks 6. 7. Click Finish.Now that you are back in the Run this Transformation window, click Run. RSA transforms the model into Java source code. The Model Explorer view should contain this Java project Figure 21. Transformed Java project 8. Double-click Order. java to see the modify code. The code should look like this Figure 22. Transformed Order class Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 20 of 22 ibm. com/developerWorks developerWorks Try running a different transformation from UML-to-C++ and explore the results. Section 5. Conclusion CongratulationsIn this tutorial, you covered the creation of a UML project and model, selecting and applying a design pattern to a model, adding and editing attributes and operations to a model, and transforming that model into actual code. You did all of this without even writing a line of code It is easy to see (even with this simple tutorial) how visual UML modeling tools simplify code development. At this point, you might want to explore some of the links in the Resources section of this tutorial. Visualize with Rational Software A rchitect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 21 of 22 developerWorks ibm. om/developerWorks Resources Learn Visit the developerWorks Rational zone to expand your Rational skills. Exposing Design flaws in your code Part 1 (developerWorks, August 2005) details the visual tools available to run internal code reviews in Rational Software Architect. Visualize with Rational Application Developer (developerWorks, February 2006) details the visualization capabilities of Rational Application Developer. shine IBM Rational visual tools for application development (developerWorks, February 2006) covers all of the different visual tools available in the Rational Software Development Platform. Stay current with developerWorks good events and webcasts. Get products and technologies Download a free psychometric test version of Rational Software Architect. Build your next development project with IBM trial software, available for download directly from dev eloperWorks. Discuss Participate in developerWorks blogs and get involved in the developerWorks community. About the author Eric Long Eric Long is a Software Engineer in the IBM Developer Skills Program. Eric graduated from The University of Texas with a degree in computing device Science.He joined IBM in July of 2004 and currently works in Austin, Texas. As a Software Engineer, he provides technical information to developers on open source and industry trends and technologies through speaking engagements, web content, and faculty consultations at IBM Academic Initiative member universities. His work also includes technical courses, demos, articles, and tutorials available at http//www. ibm. com/university and http//www. ibm. com/developerworks. Visualize with Rational Software Architect Copyright IBM Corporation 2006. All rights reserved. Trademarks Page 22 of 22

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.