During the past year, Java vendors have heard an increasingly insistent drumbeat emanating from developers: simplify enterprise Java. J2EE, the rich but extraordinarily complex set of Java server technologies, is proving intractably complicated. As a result, developers are finding alternative Java solutions to their enterprise needs.
Recently, however, some new technologies — informally referred to as J2EZ — have appeared, demonstrating that vendors are beginning to get the message. One of the first tools to deliver easier enterprise development is Sun’s JSC (Java Studio Creator), which, although narrowly focused on the client-facing portion, provides conspicuous productivity benefits. IBM’s Rational Developer and M7’s NitroX offer similar functionality but Sun’s product has important distinguishing features.
A look back
Ever since computers became an integral part of commercial business activity, tool developers have sought to make programming easy. The earliest efforts, such as Cobol, pursued the goal of enabling end-users to write their own programs or at least to write the software to generate their own reports. When this proved impractical, vendors shifted towards tools that made programming easier for professional developers. High-level languages, CASE tools, code generators, scripting languages and drag-and-drop programming were all part of this effort. Any ground gained by these tools, however, was soon lost to the complexity of new technologies. This pattern has been especially true of enterprise Java.
The client-facing portions of enterprise Java applications went from HTML to JSP and servlets, to Struts and, most recently, to JSF (Java Server Faces) — a standard approved last year by the JCP (Java Community Process). In theory, JSF provides an easier way of creating web interfaces to Java applications. It has been warmly embraced by IBM, Oracle, Sun and other Java vendors.
Sun’s use of JSF is particularly evident in JSC, a tool that helps developers tie great web interfaces to EJBs and databases. I examined the seventh update to the 2004Q2 version of JSC.
This release has a distinctly rapid application development feel to it. Starting JSC puts you in a development environment that caters to interactive design of UIs. A central window supports drag-and-drop placement of components from a palette. A separate window enables the developer to modify the properties of a component easily. A server pane presents various available database connections. By clicking one you open metadata to reveal database fields you can connect to interface components — again by dragging and dropping.
In the background, these actions are generating code. A single mouse click and the generated code is compiled and run on the included Java application server. This produces a true iterative prototyping cycle.
A step ahead
This functionality is a baseline that several products meet. JSC goes beyond it by adding consumable web services and EJBs to the palette of components. This step is important as it enables the easy creation of true enterprise applications that leverage existing software assets at your site. JSC reads and parses WSDL files and generates the needed Java code to access SOAP-based procedure calls. It also has nifty features such as email functionality. A forthcoming release also supports visual design of portlets.
For apps that require multiple linked JSPs, JSC presents a view in which individual pages are graphically connected and flow as needed. Remarkably, all this capability is simple to use. Sun has done an excellent job of making JSC intuitive and productive. Despite this simplicity, Sun provides good easy-to-follow tutorials on its website.
The generated code includes everything needed at deployment: Java, JSPs, HTML, XML and SQL. JSC builds and tests the files, and then bundles the files into an EAR (Enterprise Application Archive) or WAR (Web Application Archive) file. Versions 1.3 and 1.4 of J2EE are supported and the apps will run without change on most J2EE-certified servers. Developers can modify the generated code. A forthcoming release adds re-factoring support, integration with version control systems and a style sheet editor.
JSC includes a copy of NetBeans for all this code-level work. Code changes made to JSPs are immediately reflected in the drag-and-drop interface and vice versa. The default installation of JSC includes a copy of Sun’s Java System Application Server Platform Edition 8 and the PointBase embedded database to simplify testing of the generated code.
Although the elegance of Sun’s design impressed me, I noticed a few shortcomings. JSC accesses databases through JDBC rowsets only. If you use Hibernate, JSC can’t see the data. Additionally, JSC does not support Struts; you use JSP and JSF or nothing.
Sun encourages new projects to use JSF instead of Struts, and I suspect much of Struts will eventually migrate to JSF. Nonetheless, Struts support would be useful in the interim.
In addition, the build-deploy cycle on JSC is occasionally slow, cutting the frequency with which I would test prototypes. Finally, the product screams to be a plugin to Eclipse and NetBeans. At only US$99 per year, per developer, however, it’s hard to complain about any of these drawbacks. JSC is a terrific value: it’s easy to buy and use.
JSC goes head-to-head with NitroX for JSP from M7, a strong, more expensive competitor that has many similar intuitive features. JSC also competes with the JSF capabilities in IBM’s Rational Developer products. IBM’s offerings, however, are oriented more towards pure development: they invite code twiddling, which JSC wisely discourages.
If you can live without Struts, and if most of your data is accessible via JDBC, then you’ll find Java Studio Creator delivers a remarkably productive and intuitive tool at a terrific price.
Java Studio Creator 2004Q2 Update 7
Sun Microsystems, 09-976 6800
Cost: US$99 per year, available only as part of Sun Developer Network Standard Subscription
Platforms: Windows, Linux, Macintosh, Solaris (Sparc and x86)
Bottom line: This well-designed, easy-to-use graphical environment is great for constructing ready-to-run enterprise Java apps. Graphical elements, database access, web services, and numerous other functions are built-in and simple to use. It only lacks Struts support and a plug-in implementation for major Java IDEs.