Improving your J2EE-based projects

Many people incorrectly judge Java/J2EE-based systems on problems associated with maintaining the code base, the number of bugs or inconsistencies in functionality, or poor performance. Fortunately, these problems have less to do with the Java/J2EE technology itself and more to do with the lack of a process focused on the quality of the system. To ensure success of large-scale Java/J2EE projects developed by a sizeable team, or across multiple teams, a team lead must use tools that can measure quality.

Importance of tools

Have you ever heard of a construction company attempting to build a house without a power saw, electric drill, or a tool as fundamental as a hammer? True, a house could be built without today’s new-fangled equipment. However, construction would take much longer, and the same level of quality would prove nearly impossible to achieve.

Today’s developers are no different — tools are essential, both for increasing productivity and for enhancing quality. The tools developers use must enable them to produce the highest quality code possible in the shortest amount of time, which means that today’s IDE is no longer simply a tool used to write, debug, and compile code. Rather, it must help developers identify whether they are following proper coding conventions and known design patterns, if they are in compliance with industry standards such as Web services, if their code adheres to its contract, and if it performs per the requirements. In addition, when developers are not given the environments necessary to achieve continuous builds and automated testing, an IDE’s capabilities become even more important to ensuring the system’s quality.

Enter the Eclipse IDE, an open, extensible IDE that provides built-in capabilities. When used with several plug-ins, Eclipse can help increase the quality of both the code base and the system. With an open source, free and fully customizable Java development environment, Eclipse both enables and promotes the addition of new capabilities via open source and commercially available custom-built plug-ins. Using Eclipse along with a key set of plug-ins makes it possible for a developer and a team to measure the quality of any J2EE- or Java-based system.

Key areas to monitor

Controlling the quality of a system is impossible if you cannot measure and monitor it. It is important to understand the key areas in a system that warrant measurement: maintainability, reliability and performance.

Maintainability involves the complexity associated with understanding or modifying the code. 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 increasing business response times to new requirements or change requests, and ultimately reducing the overall cost of 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.

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. They 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, typically measured on a per-unit-of-time basis, tracks a system’s ability to process numerous requests, the amount of information sent over the wire and the response time of a particular system call, among other things. To determine system performance, 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.

Two issues from now, I will examine how using Eclipse and its plug-ins can help a development team measure the maintainability, reliability and performance of any Java- or J2EE-based system.

Jimmy Jarrett is an enterprise architect with The Cobalt Group, a Seattle software development firm.

Quick Link: 054139

Related Download
3 reasons why Hyperconverged is the cost-efficient, simplified infrastructure for the modern data center Sponsor: Lenovo
3 reasons why Hyperconverged is the cost-efficient, simplified infrastructure for the modern data center
Find out how Hyperconverged systems can help you meet the challenges of the modern IT department. Click here to find out more.
Register Now