Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Exposing design flaws in your code: Part 2, Architectural discovery

David Bridgewater (dbridgewater@jbridge.co.uk), Freelance writer and trainer, Studio B author
David Bridgewater
David Bridgewater, a Studio B author, has a long career in application development and spent some of his happiest professional years helping a large UK retail company embrace Java technologies. Now, he works as a contract Java/WebSphere® trainer for IBM as well as a Java author and mentor. He is a regular contributor to technical journals, focusing on Web application development with Java, J2EE, and supporting IBM technologies such as WebSphere software.

Summary:  Learn how to identify design problems in your code with the architectural discovery tools in IBM Rational Software Architect. This second tutorial in a two-part series uses a sample Java 2 Platform, Enterprise Edition (J2EE) application to show you how to use architectural discovery to visualize design problems in your code.

View more content in this series

Date:  16 Aug 2005
Level:  Intermediate PDF:  A4 and Letter (943 KB | 32 pages)Get Adobe® Reader®

Activity:  2929 views
Comments:  

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.

About this 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.


Prerequisites

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.

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=134138
TutorialTitle=Exposing design flaws in your code: Part 2, Architectural discovery
publish-date=08162005
author1-email=dbridgewater@jbridge.co.uk
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.