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 1, Code Review

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 Code Review tools within Rational Software Architect. This tutorial uses a sample application to show you how to use the Code Review rule engine to highlight low-level and high-level coding and design issues, including those that are specific to Enterprise Java. This is the first in a two part series: the second in the series explores the same sample application with Rational Software Architect's Architectural Discovery tools.

View more content in this series

Date:  08 Aug 2005
Level:  Intermediate PDF:  A4 and Letter (1258 KB | 41 pages)Get Adobe® Reader®

Activity:  4129 views
Comments:  

Before you start

About this tutorial

This tutorial is the first in a two-part series about components within IBM® Rational® Software Architect that are dedicated to the following tasks:

  • Automatic detection of bad design in your code
  • Support (and sometimes automated enforcement) of coding standards

Both tutorials in the series take the same flawed Java™ 2 Platform, Enterprise Edition (J2EE) application as their starting point. This first tutorial subjects the application to analysis by the Code Review tools in Rational Software Architect. The second tutorial in the series uses the architectural discovery tools to expose design flaws and features in a visual way.

Anybody involved with the design of Java or J2EE applications -- architect, designer, or developer -- has a stake in the code review and architectural discovery tools. Both tutorials show you how to use the tools to help assure the quality of the designs and code under your control.

This first tutorial focuses exclusively on Code Review. As well as using Code Review to expose coding and design flaws, you also learn how to make corrections (often automatically with the Quick Fix feature) and have the opportunity to re-run code reviews and see the feature's findings diminish.


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 is complementary to two tutorials -- "Running a Code Review" and "Running a Structural Analysis Code Review" -- already built into Rational Software Architect. These tutorials are excellent for gaining familiarity with the products, and the second one in particular covers areas not covered in this tutorial (and vice versa). However, it isn't necessary to take those tutorials before this one. See the Resources section for more information on how to access these additional tutorials included with Rational Software Architect.

To complete the steps in this tutorial, you need:

  • Rational Software Architect. Download a trial version at no cost. Rational Software Architect runs on Linux™ and recent Microsoft® Windows® platforms. Check the system requirements link from the download page for detailed information.
  • AntiPatternWeb1.zip. Download this file, which contains the Web archive (WAR) file with the sample application used in this tutorial.

1 of 10 | 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=134310
TutorialTitle=Exposing design flaws in your code: Part 1, Code Review
publish-date=08082005
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.