Home arrow Spotlight arrow The Agile Developer arrow Open Source Tools for the Agile Developer
Open Source Tools for the Agile Developer PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Kirk Knoernschild   
Wednesday, 03 May 2006
A defining characteristic of agile development is to keep moving forward, recognizing working code as the primary measure of valued software. Undoubtedly, there is no way to judge a software system until you have a system to judge. Yet, experienced developers recognize that requirements frequently change and traditional methods have achieved very little success in stabilizing requirements early in the lifecycle. Instinctively, we may feel change impedes progress, but agile developers embrace an attitude where change is viewed as an opportunity to improve the system. A variety of open source software tools  can enable important agile practices, allowing you to keep moving forward so long as you are willing to embrace change.


Agile Practices
Embracing change without applying proven practices to support change is difficult. Proven agile practices embracing change exist, and each impacts and supports the others in subtle, yet significant, ways. Experienced agile developers enhance and tune their individual practices over time. The following practices begin to define an agile developer and form the foundation of an agile development process:

  • Continuous Integration. Maintaining an error free and functional codebase is critical. Teams must synchronize changes with a source code repository and integrate modifications incrementally to ensure that the application is always functional. Adding changes to an already broken codebase provides no value. When agile developers encounter a compile error or a failed unit test, they fix the problem immediately. This practice ensures that small issues are resolved before they become large. Initially, it may seem this approach impedes progress since development appears to move along at a slower pace. But delaying integration is delaying risk, and so continuously integrating code promotes a more sustainable rate of progress over time. An automated and repeatable build is the cornerstone of a robust continuous integration strategy.

  • Test-driven Development. A robust suite of tests offers two significant advantages. First, it gives agile developers the courage to refactor their code.
    Advertisement
    Second, tests have a positive impact on the design of the application. Since robust unit tests focus on verification of individual classes, they encourage the use of abstract classes and interfaces to decouple design. Mock objects are often used to help test granular units of functionality in isolation.

  • Refactoring. Applications require constant attention and care to ensure that they remain easy to maintain. The purpose of refactoring is to improve the structure of the design. Neglecting to improve the design impedes progress as the application grows. Another common reason to refactor is to eliminate duplicate code. Constant feedback helps identify areas that are good candidates for refactoring, and a robust suite of tests provides the courage necessary to verify changes.

  • Constant Feedback. Without feedback, it is difficult to identify the areas of the application that require care. A robust build process generating metrics on test coverage, coding techniques, and design resiliency provides valuable feedback. A functional application offers the opportunity for frequent client demonstrations, as well.

  • Eliminated Waste. Redundant tasks are a productivity drain. Incorporating manual tasks into an automated and repeatable build is one way to avoid repetition. Obtaining frequent feedback without automation is unlikely due to the manual effort required. Unnecessary documentation required by process conformance is also wasteful, since the documentation is rarely used and infrequently updated. Agile developers also avoid duplication by choosing to refactor their code.

The Open Source Model
Open Source development is a license-driven model not defined by a method or process. To an extent, open source and agile development are largely orthogonal. Yet, there is a natural tendency on open source projects to use agile techniques and tools. Open source software development typically begins with early and frequent product releases, and requirements are largely emergent. Teams of developers, often working separately and independently, rely upon constant and continuous feedback in order to ensure a stable product. Change is typically rampant and encouraged, so many of the techniques espoused by traditional methods, such as development plans, projects plans and design models are not practical. In this sense, open source development must be adaptive and demands an agile process.

It is no small coincidence that many tools supporting agile techniques are open source tools. There is great synergy between the open source model and agile methods. While often viewed as independent and unrelated, each camp consists of passionate developers motivated by little more than making a small contribution to improving their craft. Agile presents the proven techniques, and open source provides the tools.

Open Source Tools and Frameworks
Tools used by agile developers aid their effort to keep moving in a positive direction. To be useful, such tools must be non-invasive, easy to use, responsive, generally lightweight and somewhat flexible to fit the developer's style of working. Listed below are some commonly used tools on the Java platform that support the agile practices listed above. The list is certainly not complete, yet it offers a solid foundation as an entry point to agile development. Many other tools are available, and peer tools are typically available in alternate programming languages.

  • JUnit is a unit regression testing framework that allows agile developers to gain confidence in the quality of their source code. JUnit facilitates Test Driven Development, and provides the ability to test code in isolation without external influences affecting the results. Certain types of tests, such as testing container or data-dependent classes, prove difficult . Because of this, other unit testing frameworks have surfaced, such as HttpUnit and DbUnit. TestNG is a newer unit testing framework inspired by JUnit that addresses some of its shortcomings. TestNG requires Java 1.5 or Java 1.4 JavaDoc annotations.

  • Ant is the de facto standard Java build tool that allows agile developers to create a repeatable build process. Teams should avoid executing a series of manual steps to produce the final product due to the increased likelihood of inconsistencies and errors. Ant uses a consistent XML syntax for defining the build script, and is relatively easy for newcomers to learn quickly. There are a number of tasks available that support integration with other tools including JUnit, CVS or Subversion, and many source code analyzers. Ant is a great tool for eliminating waste by automating manual tasks.

  • CruiseControl is a framework supporting continuous integration. There are numerous plug-ins available that facilitate team collaboration, as well as a Web interface providing information on current and previous builds. CruiseControl integrates well with Ant, and offers great flexibility in defining a custom automated and repeatable build process that serves as a cornerstone of an agile team development process.

  • CVS and Subversion are source configuration management tools that allow developers to track historical changes to code artifacts and maintain a single repository of all artifacts, including source code. Placing artifacts in a single repository ensures that team members always know where they can obtain the most recent version of an artifact. Each offers seamless integration with a variety of Integrated Development Environments (IDEs), as well as Ant. Since neither locks modified files, developers should frequently synchronize code to avoid conflicts. Subversion addresses many of the shortcomings of CVS, such as the ability to perform atomic commits.

  • EMMA is a toolkit for measuring and reporting code coverage. EMMA helps track the comprehensiveness of a test suite by determining the percentage of methods and classes that are exercised by tests. EMMA integrates well with Ant, and the HTML output produced is easy to comprehend. Unlike many static code analyzers, EMMA gathers its information while the tests are run, offering a unique and slightly different perspective. Developers should strive to achieve 100% test coverage on behaviorally meaningful classes. Ignoring coverage on less interesting classes is acceptable, and EMMA accommodates omitting certain classes for instrumentation via configuration.

  • JDepend and JarAnalyzer are static source code analysis tools that offer objective feedback on design quality. JDepend focuses on package relationships whereas JarAnalyzer emphasizes the relationships between .jar files. Each is helpful in avoiding the maintenance, reuse, and testing issues inherent with excessive dependencies. When used judiciously, the metrics produced by JDepend and JarAnalyzer can help identify areas of the application that are good candidates for refactoring.

  • PMD is a static source code analysis tool that identifies potential problem areas within source code. It serves as a form of automated code review and can highlight potential defects, overly complicated code, dead code, and more. PMD rules are customizable, allowing developers to implement rules that conform to coding standards. PMD integrates well with Ant, and a variety of plug-ins are available that help integrate PMD with numerous IDEs Using a stricter set of rules in an IDE ensures that potential problems are caught immediately. In the event rule violations are ignored, more critical errors can be flagged as part of the build process.

These tools are utilities that aid development, but frameworks used to compose an application also impact the ability to remain agile. Heavyweight frameworks and specifications, such as EJB,  that restrict testability and hinder maintenance are not an agile developer's ally. The inability to run outside of a container is one characteristic of a heavyweight framework. Frameworks that can be deployed and reused independently, separate from a container, are typically favored by agile developers since they tend to encourage many of the agile practices, such as unit testing and refactoring. Examples of such frameworks include Spring or Hibernate.

Conclusion
Agility is an attitude toward software development. The Open Source community leads in the use of agile practices. Tools help, but success requires openness to change and adoption of proven practices. Unlike traditional methods where change is discouraged, agile developers employ techniques that encourage change. Initial skepticism is common as the development rate early in the lifecycle may seem slow. But over time, agile practices make change more tolerable, and facilitate a long term sustainable pace that is more rewarding than the short sprints followed by stagnation that accompany less agile approaches. Therefore, it is not surprising that Open Source tools are having such a significant impact on agile projects' successes.


About the Author
Kirk is Chief Technology Strategist at QWANtify, where he leads based on his firm belief in the pragmatic use of technology. In addition to his work on large development projects, Kirk shares his experiences through courseware development, teaching, writing, and speaking at seminars and conferences. Kirk has provided training to thousands of software professionals, teaching courses on UML, Java J2EE technology, object-oriented development, component based development, software architecture, and software process.

Error, missing joomlaboard config file!

 

Comments (0)add feed
Write comment


Write the displayed characters


busy
 
< Prev






Lost Password?
No account yet? Register

Video News

 
Copyright © 2006 - 2008 CMC Media, Inc. All rights reserved. All marks are trademarks of CMC Media Reproduction in whole or in part in any form or medium without the express written permission of CMC Media, Inc. is prohibited  
 
 CM Yellow Pages | ALM Expo | CM Today | Configuration Management Journal | CM Crossroads