Ziff-Davis Enterprise 
DevSource: Microsoft Developer Resource
Add OnsArchitectureLanguagesTechniquesUsing VSForums
 
Home arrow Languages arrow Java Is Well-Suited for Open-Source Projects
Java Is Well-Suited for Open-Source Projects
By DevSource

Rate This Article:
Add This Article To:
With its ease of running code in many environments, the Java platform attracts a large share of open-source development interest.

With its ease of running code in many environments, the Java platform attracts a large share of open-source development interest. The SourceForge.Net open-source project repository, for example, included as of this writing more than 1,400 multiplatform projects in Java that were classified as being aimed at developers and as having reached a production level of stability.

Click here to read more about open-source development tools.

ADVERTISEMENT

Many of these projects illustrate the collaborative energy that goes into open-source efforts and the sophistication of the results. One such project is PMD, a Java source code analyzer. (Don't bother asking what "PMD" means; the project's Web site includes a page explaining that the authors "just think the letters sound good together," offering what the site dubs "backronyms" such as "Project Mess Detector" for those who insist on a spelled-out name.)

Managed by Tom Copeland, a developer at the consultancy of InfoEther LLC, in Herndon, Va., the PMD project reached milestones of 1 million page views and more than 75,000 downloads last July.

PMD uses modular and extensible rule sets. Some of its rules reflect conventional wisdom, such as the rule that detects method names not conforming to normal practice. Others detect code that seems to have no reason to be there and help developers streamline code. One rule, for example, notes opportunities to return a logical truth value directly rather than going through a cumbersome if ... then ... else syntax to define it.

Among the most valuable PMD rules are those that detect code very likely to produce bad behavior—for example, the rule that detects a code block with a catch clause that does nothing, preventing higher-level code from being warned that an exception has occurred and doing nothing to resolve the problem.

PMD illustrates several benefits of the open-source approach to toolmaking: portability, extensibility and continual improvement. And it goes wherever developers find it useful: It can be run from a command line or installed as a plug-in to integrated environments including Eclipse, NetBeans, JBuilder, JDeveloper, IDEA or the seemingly immortal Emacs editor.

One planned future PMD development is the ability to look across multiple files at a single time. Also in the works is data-flow analysis, already implemented in early form, to do useful things like detect expressions that are inside a code loop but do not change during those repetitive cycles.

Open-source interest in Java development could take on still more vigor with the prospect of Sun Microsystems Inc.'s placing the entire Java stack under its open-source Common Development and Distribution License. With Sun's Java Enterprise System running on Sun's own Solaris and Red Hat Inc.'s Red Hat Enterprise Linux since last summer, and with Open Source Initiative approval of CDDL at the end of last month, the stage is set for even more open-source work using Java technologies—and for tools like PMD to Prevent More Damage.

This article was first published on eweek.com.




Discuss Java Is Well-Suited for Open-Source Projects
 
>>> Be the FIRST to comment on this article!
 

 
 
>>> More Languages Articles          >>> More By DevSource
 



DevSource video
Devsource Video Series
Manipulating Society through Technology
Jeremy Bailenson, Director of the Virtual Human Interaction Lab at Stanford University, talks about virtual reality, avatars, Moore's law, how real world behaviors influence online reality, and societal manipulation through technology!
>> Play video
>> Read article
>> See all videos
DevLife Blog

Julia explores the Robotics Studio! (It's for more than you think.)

MSDev Blog

Messages for Bill Gates!

Make it Work
.NET makes runtime type checking a breeze. See what Peter has to say about it in this week's tips!
News
Microsoft Counts on App Support for Vista
Microsoft has taken pains to demonstrate that Windows Vista will have ample application support.
DevSource RSS FEEDS
XML Want an easy way to keep up with breaking tech news? And the Get DevSource headlines delivered to your desktop with RSS.