Newsletter sign-up
View all newsletters

Sign up for our Enterprise Java Newsletter

Enterprise Java

Improve the quality of your J2EE-based projects

Effective tools, gates, and accountability can help ensure your system's success

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 2 of 7

Maintainability involves the complexity associated with understanding the code or modifying the code, whether it is a bug fix or an enhancement. Well-documented code that follows known coding standards and industry design standards is easier to maintain than code with sparse documentation that doesn't follow any known standard development practices. Highly maintainable code allows changes to be introduced more quickly, thereby permitting the business to respond more rapidly to new requirements or change requests, and ultimately reducing the overall cost of both new features and ongoing maintenance.

Reliability indicates whether a method adheres to its contract and can be executed successfully. Unit tests are used to exercise a method's contract, thus verifying the reliability of the code segment. The quality of the unit tests, in turn, is verified via code coverage analysis. Many approaches are available for measuring code coverage, including, but not limited to, statement, decision, condition, path, and call analysis. The type and amount of coverage necessary to provide absolute reliability of a method is a popular discussion topic. For this article's purpose, simply note that reliability increases as the amount of code coverage increases.

Method reliability within a system is of the utmost importance as it represents, to some extent, a system's stability. Other problems, such as performance or scalability issues, could arise, which may not be as readily found even with extensive unit testing and coverage analysis. Thus, unit testing and coverage analysis are by no means a be-all, end-all solution to ensuring system stability; however, the ability to reliably execute methods consistently represents a good measuring stick of the system's reliability.

Performance is typically measured on a per-unit-of-time basis. A system's ability to process numerous requests, to the amount of information sent over the wire, to the response time of a particular system call, are all performance criteria measured based on a unit of time. It is important to know, to some extent, how the system will perform. To ensure this understanding, one could measure all major service methods or potential problem areas with expected high usages, long call stacks, or those pieces that represent the most common paths through the core architecture. Each approach provides a varying level of comfort with regard to performance. For large-scale systems, performance should be continually maintained and monitored during development to identify snags early and avoid unforeseen problems in production environments.

Let's now examine how the use of Eclipse and its plug-ins can help a development team, measure the maintainability, reliability, and performance of any Java- or J2EE-based system.

Code generation: Maintainability

Code generation is one of the best ways to ensure consistency and quality for repeatable code that differs based on type. XDoclet is currently the industry standard for generating Java source code. XDoclet is an open source, free library that parses the codebase, looking for custom Javadoc tags (metadata) that it then uses to generate other Java source files. XDoclet contains a set of Javadoc tags that may be used to generate most of the repeatable code found in the majority of Java/J2EE-based systems, such as JavaBeans and home and remote classes for Enterprise JavaBeans, even providing specific information for Borland Enterprise Server, JBoss, Orion, Resin, Sun Java System Application Server, WebLogic, and WebSphere. It also supports many other technologies such as Hibernate, JDO (Java Data Objects), and Castor. If that isn't enough, XDoclet is extensible, allowing developers to create their own custom tags for generating homegrown code. By employing XDoclet and letting it generate code for you, you can reduce unnecessary coding errors and bugs found in repetitive code.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.