Advanced interactive programming environments, such as LISP machines or Smalltalk workstations, were admired during the late 1980s for their extraordinary productivity, but they were also tarred with the brush of being impractically lavish in their demands for processor power and memory capacity and were considered suitable only for research environments.
Moores Law trends during the past 20 years have brought those formerly futuristic visions close enough to hold in a developers hand, with the Java platform as heir apparent to the benefits of those efforts.
Notable at this years JavaOne conference, for example, was the award of a "Dukie"—that is, a Dukes Choice award, named after Javas distinctive red-nosed mascot—to Agitar Software Inc., of Mountain View, Calif., for its products that offer automated support for rigorous software testing.
Following the conference, eWEEK Labs spoke with Agitar Chief Technology Officer and Engineering Vice President Alberto Savoia, who talked about the need for such tools to give him "a fighting chance, as a manager and a developer, to make things right."
Doing in minutes what would take even a skilled developer several hours, Agitars Agitator workbench quickly showed us the defects in manually written tests—for example, where they had failed to exercise execution paths. Agitators automatically generated assertion statements allowed us to inspect and confirm intended conditions.
When a special case was added to the code, a rerun of the Agitator testing sequence quickly showed which of our previous assertions were no longer valid . At the same time, Agitator automatically extended the list of test scenarios and data values to include the special case and the neighboring off-by-one cases that often harbor simple but serious bugs. Agitators milestones of coverage (all code exercised), outcome (no unexpected exceptions) and assertion (high-level statements about how the code should behave) were systematically catalogued on-screen as the tests progressed.
Savoia explained the strengths of Java that enabled Agitar to build a tool of this kind. "It takes a language like Java with introspection, a security manager and no pointers—plus 1 or 2GHz on the laptop—to make this feasible," he said.
Savoias comments echo the observations of eWEEK Labs in its reviews of the latest updates of several Java programming environments, including Borland Software Corp.s JBuilder X, Oracle Corp.s JDeveloper 10g or the latest versions of tools based on the open-source Eclipse environment.
With constraints such as the exclusion of arbitrary pointers to data or to executable code, Javas designers have made it possible for automated tools to use theorem-proving techniques to understand the limits of what a piece of code might do.
Without a security manager to limit the destructive power of software under test, "Id never feed semirandom data to a method that deletes files," Savoia said. In JDeveloper 10g, to note another example, a pop-up menu can offer a list of the error-handling structures that might be wrapped around a method—a list thats impressively correct and complete, thanks to the precise knowledge available to the tool.
These aids are doing a lot of work for the programmer. As Savoia observed, laptop processor speeds in the gigahertz range are by no means excessive. Development teams may find it a challenge to acquire step-up hardware in a time of constrained capital budgets for IT and in a climate where some head offices believe offshore labor is a more cost-effective option. Its up to those teams to make the case that testing is better done by a cheap, tireless computer, with rigorous logic and plenty of spare time, than by a deadline-driven outside developer with limited understanding of an application domain.
Relating to XML
while agitar helps developers get their logic right, other toolmakers are enhancing Javas access to structured and readily repurposed data in XML repositories. Entering beta testing this fall will be DataDirect Technologies Corp.s DataDirect XQuery, an embeddable module that integrates conventional relational databases with XML data sources using the emerging standard XQuery language and the XQJ XQuery API for Java .
"Creating XML from relational databases is like report writing," said Jonathan Robie, XML program manager for DataDirect Technologies, of Bedford, Mass., while briefing eWEEK Labs at JavaOne. Records are best presented to people with HTML but best exchanged among processes with XML, Robie said.
The flip side is that "XML data has hierarchy and sequence; relational data has neither," said Robie. Integrating data from these two worlds is a challenge developers would do well to start considering now because its clear that most new projects will be XML-based but that legacy SQL data and established SQL skills will persist in the community for decades to come.
Further enriching Java developers opportunities will be this falls language extensions in the Version 5.0, "Tiger" release of J2SE (Java 2 Platform, Standard Edition). Unleashed in beta at the end of last month, J2SE 5.0 was described by Sun Fellow Graham Hamilton at a JavaOne general session as "the biggest update to the core platform since the original 1.0 release."
Developers with long memories might recognize echoes of not only LISP and Smalltalk but also of COBOL, REXX or Ada in some of the forthcoming Tiger additions. J2SE 5.0 expands capabilities of the guaranteed-precision BigDecimal numeric data type and provides concurrent utility interfaces and classes to improve developers access to Javas multithreaded programming capabilities.
But even as Java catches up with the capabilities of yesterdays most advanced workstations, it also needs new facilities for development in domains, such as handheld devices or embedded systems, that lack traditional programmer comforts such as screens and keyboards. Management extensions in J2SE 5.0, including secure remote links for monitoring and management, will apply Java developers rising productivity to ever-more-diverse opportunities to add value with code.
Technology Editor Peter Coffee can be reached at email@example.com.