Before you start
If you completed the first tutorial in this series, you saw how useful the code review tools in IBM® Rational® Software Architect can be for examining all kinds of code issues, small and large. This second tutorial in the series turns to the architectural discovery feature in Rational Software Architect. This tool gives a different -- and complementary -- perspective on design issues in your code. In particular, you will learn how architectural discovery exposes "antipatterns," or design choices that can make your code breakable, fragile, and less maintainable. You will produce (very rapidly) several diagrams that go straight to the heart of antipatterns in the example application you worked with in the first tutorial.
This tutorial is the second in a two-part series about components within Rational Software Architect that are dedicated to examining application-design issues. Both tutorials take the same flawed J2EE application as their starting point. The first tutorial subjected the application to analysis by Rational Software Architect's code review tools. This tutorial uses the architectural discovery tools in Rational Software Architect to expose design flaws and features in a visual medium -- namely, through class diagrams.
Anyone involved with the design of Java™ or J2EE applications -- architects, designers, or developers -- has a stake in the code review and architectural discovery tools included with Rational Software Architect. These tutorials show you how to use the tools to help assure the quality of the designs and code under your control.
In this second tutorial, you work exclusively with architectural discovery. In addition to using architectural discovery to expose design flaws, you will also see the effect of refactoring the design and have the opportunity to re-run architectural discovery to generate an improved diagram of your application.
Some familiarity with Java and J2EE programming is assumed. This tutorial does involve some optional programming elements. However, the main focus is on showing how you can use Rational Software Architect to identify and diagnose bad design techniques. This tutorial also assumes that you have reasonable familiarity with Unified Modeling Language (UML) -- in particular, class diagrams.
It is helpful but not essential to have completed the first tutorial in this series. You can take this second tutorial independently, but you must at least complete the first section of the first tutorial, entitled "The bad application." This section takes you as far as loading and running the example J2EE Web application in Rational Software Architect.
The software prerequisites are similar to those for the first tutorial. If you are taking this tutorial in isolation, however, here's what you need:
- Rational Software Architect. You can download a trial version at no charge. Rational Software Architect runs on Linux™ and recent Microsoft® Windows® operating systems. Check the system requirements link from the download page for detailed information.
- AntiPatternWeb2.zip. Download this file, which contains the two Web archive (WAR) files necessary for this tutorial.
AntiPatternWeb2.zip contains AntiPatternWeb.war, which is the sample application used in this tutorial before any amendments were made. This file is the same version as that used in the first tutorial. (Note that if you made code changes to this original version of the application in the first tutorial, be sure to revert to the unchanged version before starting the second tutorial.) AntiPatternWeb2.war contains the WAR file with the same sample application after amendments have been made. This version of the application is used later in this tutorial if you don't want to make your own code changes.


