Some off-topic tools to speed up your webapp and clean up your code
A couple of interesting tools have been mentioned on some of our internal lists recently... they didn't really suit the Java Today section as front-page items, but they might be of use to many Java developers.
The first, mentioned by Mike [bondolo] Duigou on the Community Leaders list, is YSlow, a performance tool that analyzes web sites from a performance point of view. As described by its announcement, "YSlow measures web page performance based on the best practices evangelized by Yahoo!'s Exceptional Performance team. Since many of these best practices focus on the frontend, YSlow is integrated with Joe Hewitt's Firebug, the web development tool of choice for frontend developers."
Meanwhile, Google has released a Java static analysis tool called the Google Singleton Detector, which detects several types of global state: not just singletons, but some variants which Google engineers have given funny names to: mingletons, hingletons, and fingletons. And once you find them, you're supposed to eliminate them.
Say what? Everyone uses singletons, right? Well... not so much anymore, according to Google's Why Singletons Are Controversial:
The use of singletons is actually a fairly controversial subject in the Java community; what was once an often-used design pattern is now being looked at as a less than desirable coding practice. The problem with singletons is that they introduce global state into a program, allowing anyone to access them at anytime (ignoring scope). Even worse, singletons are one of the most overused design patterns today, meaning that many people introduce this possibly detrimental global state in instances where it isn't even necessary.
The document goes on to claim that this introduction of global state complicates testing (which in turn thrwarts agile development), and hides dependencies.
So while the Yahoo tool is focused on performance (and limited to webapps), the Google tool prescribes better programming practices to encourage testability and maintainability. They're two very different approaches to improving your code.
In Java Today,
JSR review balloting is underway for JSR-317 (Java Persistence API 2.0) and JSR-318 (Enterprise JavaBeans 3.1). JPA 2.0 intends to add additional object/relational mapping functionality and query language capabilities, a criteria-based query API, and to standardize features that are currently optional. Meanwhile, EJB 3.1 aims to simplify the EJB architecture, with a focus on the core session bean and message-driven bean component models and their client API. Balloting for both JSR's ends on Monday, July 30.
The cq3G project is a suite of 48 tests based on 24 Test Cases for GSMNA Test Specifications for JAVA Micro Edition, Revision 1.0.3 February 20, 2007. The tests in the cq3G test suite are based on the Java Requirements of the Global System for Mobile Communications North America (GSMNA) - 3G Americas (3GA). This set of requirements delivers a defined and verifiable platform for the wireless community in the Americas.
The JDJ article Effective Development of Java Conformance Tests Meta-programming presents a case study of the use of meta-programming in Java compatibility testing. It shows how parts of the source code can be shared between different products and modified to generate programs targeting specific functions and describes the approach Sun Microsystems has used for building Technology Compatibility Kits (TCK) for more than five years.
Today's Weblogs kicks off with showing how to make a Java Dock (Launch Bar).
"With the timing framework and the glass panel, you can create almost any UI component. Offering cool and complex behaviors. In this blog I present a version of a launch bar (Dock)."
Nigel's Law? Nigel