HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML

Teamstudio Analyzer for Java

What is every Java developer's nightmare? Maintaining code, even if he or she has written it. Code is often chaotic and incomprehensible, mostly due to nonuniform coding styles.

For decades, premier software vendors realized that uniformity in projects cannot be assured without additional inspections during development. Teamstudio is one of these software vendors. The company has made a name for itself with its software tools for Lotus Notes and Domino; now it also develops software tools for Java. Teamstudio Analyzer for Java automatically inspects your code and provides control over a uniform coding style within your projects.

Product Description
Teamstudio Analyzer for Java is a plug-in that supports most of the popular Java IDEs. It inspects Java code based on 192 predefined rules, and produces a number of reports with coding style violations. The tool can also auto-fix problems according to preconfigured patterns. The 192 predefined rules are Java and J2EE best-practice patterns. The rules are configurable and settings can be exported to, or imported from, a file. Users can configure the existing rules to their needs and also write their own rules, e.g., project specific rules, as desired.

Installing and Using Teamstudio Analyzer for Java
Teamstudio Analyzer for Java is available for download from www.teamstudio.com. You'll need to register (at no cost) in order to gain access to the download page. Next, you can obtain an evaluation copy from Teamstudio's Web site (www.teamstudio.com/javaj). My personal experience with this was very good. Their customer service is excellent and the contacts are pleasant. Teamstudio always answered by e-mail within two hours.

Installation is very simple. Start the downloaded setup file and follow the wizard. After a few simple questions, you're equipped with the tool in less than one minute. Teamstudio Analyzer for Java version 2.1 currently supports the following IDEs:

  • Eclipse release 2.0.x
  • JBuilder releases 7, 8, and 9
  • Oracle9i JDeveloper release 9.0.3
  • NetBeans release 3.4.x and 3.5.x
  • Sun ONE Studio 4
  • WebSphere Studio Application Developer (WSAD) for Windows release 5.x
You can also use this tool with Apache Ant (1.4.-1.5.3), binding it to its build script. I used Analyzer for Java within Eclipse 2.0, JBuilder 6, WSAD, and Ant.

Teamstudio has also written some good, detailed installation documentation.

Teamstudio Analyzer for Java is ready to use immediately after installation. It's user friendly so you don't need any special knowledge about best practices, coding patterns, or how to carry out any complicated configuration steps. The 192 predefined and totally preconfigured rules encompass both Java coding patterns and best practices, and Java language and J2EE specifications. Based on my experience, this totally suffices for most J2EE and Java projects. However, if you still require additional rules, Teamstudio gives you full control over user-defined rules. You can extend the com.teamstudio.analyzer.user.JavaUserRule class and fill it with your own functionality. You can also use all features of Analyzer within your rules, e.g., you can build your own GUI for configuration.

Teamstudio Analyzer for Java possesses extensive configuration possibilities; Figure 1 provides an example. You can combine your personal set of rules for code inspection from different rules or rule categories. Rules are configurable over a GUI.

The settings can be stored in a file and/or imported from a file. This makes teamwork simple because, once done, the settings can be problem free, spread over as many team members as desired.

Of course, there's detailed help at every stage of installation, configuration, and use. Teamstudio provides good documentation, which is available as a PDF file or as context-help within the IDE.

Once analysis is complete, the tool builds a report with messages about the found violations of the selected rules (see Figure 2). This report appears as warning messages in the message UI of the IDE, so that with a mouse-click you can immediately jump to the relevant place in the code where a violation of a rule has been asserted.

The reports can also be exported into an HTML or XML file. HTML reports are very intelligible and deliver all necessary information, including statistics and a complete list of violations.

An additional feature of Analyzer for Java is an autofix mechanism. If you let the tool run over the code of a middle-sized project (about 200-500 classes) for the first time, you normally get thousands of warning messages. Of course, usually only a few of these violations are critical to your project and the remaining you'd probably like to automatically correct. You can do this with Analyzer for Java. For some predefined rules you can let the tool automatically correct the violated code using the autofix function, so that they correspond to the given patterns. The autofix function does have some deficiencies. First, it's not enabled for all of Analyzer's rules. User-defined rules cannot be automatically fixed and the configuration possibilities of autofix patterns are very limited at the present time.

The tool is well suited for any Java developer because it doesn't demand any special knowledge, but rather mediates it. If a programmer constantly develops with the support of such a tool, his or her coding style will become better. Teamstudio wrote a very intelligible and detailed description (also with code examples) of all predefined rules, so that no rule remains unexplained. This tool is very effective if used in the programming process. Even the most experienced Java gurus can learn some patterns, not to mention the beginners who will use best practices from the start, in spite of their inexperience.

Summary
We used Teamstudio Analyzer for Java for different reasons during development and we were always absolutely satisfied with it. The quality of this tool is excellent. Analyzer for Java is an ideal product for both quality checks and an inspection of the finished code. If you develop with Java, check out Teamstudio Analyzer for Java. I'm sure that the advantages you'll get from this tool are definitely worth the time and the money you'll invest in it.

Teamstudio, Inc.
900 Cummings Center
Suite 326T
Beverly, MA 01915
Web: www.teamstudio.com
E-mail: [email protected]
Phone: 800.632.9787 (U.S.)
Phone: +44 (0) 1487 772200 (Europe)

Specifications
Platforms: Windows 98, 2000, XP, NT 4.0, and ME with JDK 1.3.x or 1.4.x and one of the supported IDEs, and Linux and Solaris as supported by your IDE

Pricing: $295 offer includes one year of maintenance. Additional years available.

Test Platform
1.6 GHz Intel Pentium IV, 21GB Disk, 768 MB RAM, Windows XP w/o Service Pack, Sun JDK 1.4.1, Eclipse 2.0.

Snapshots
Target Audience: Java programmers, managers

Level: Beginner to advanced

Pros:

  • Low price
  • Good documentation
  • Feature-rich product
  • User friendly
  • Good quality product

    Cons:

  • No significant cons

    Author Bio
    Maxim Chpakov is a senior software engineer with DaimlerChrysler Technology, Services & Solutions, and is a valued member of the DC-TSS quality control team. Working for many years as a software developer, Maxim believes that one of the important preconditions for the success of every project is ensuring a uniform coding style. [email protected]

    All Rights Reserved
    Copyright ©  2004 SYS-CON Media, Inc.
      E-mail: [email protected]

    Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.