Columns

Sun Java Studio Creator: The VB of Java?

Sun Java Studio Creator (JSC) brings GUI technology to JSP-based Web applications using JavaServer Faces (JSF). Like VB, JSC and JSF have attracted a growing crowd of third-party component vendors, including Ilog, Orbeon, Otrix and Oracle. And Sun has managed to duplicate the scatter-plate documentation that characterized VB’s early editions.


JSC is built on top of NetBeans, so it starts with a very good text editor with folding, syntax coloring, smart-coding tips and very productive active-code parsing. Code parsing can become too active; the editor will flag a syntax error solely because the edited line is incomplete. (I could not find the setting to turn off this feature.) To this, JSC adds code templates or clips, expanded abbreviations, and several drag-and-drop converters and validators. NetBeans 4.0 refactoring does not appear to have made the cut.

Because of its NetBeans heritage, JSC also does debugging well. When fatal exceptions occur, JSC spits out an intimidating, multipage dump, but then helps users by pinpointing in the editor the offending line in the source code. However, full breakpoint/watchpoint, line-by-line, step-in/step-out, examine-the-variables, see-the-call-stack debugging is also available and worked well for us.

JSC has some other nice IDE touches: If you get an unresolved symbol warning in the editor, press the ALT+SHIFT+I keys and a wizard will set the correct Java import code. Also, there are two ways to add CSS styling in JSC: Declare the CSS classes in the JSC file stylesheet.css, then add the CSS classes to specific components through its styleClass property. You can add a 'style=' CSS statement in the JSP file, or use the Style property to add a direct CSS style statement.

JSC expands the idea of a NetBeans properties sheet with new or improved Project Navigator, Server Navigator and Application Outline tabs. The Server Navigator lets users see database and app servers, Web services and connections in tree outline format. Drilling into the database sources, users see databases, tables and columns, while the Web services provide ServicesSites, Services and then the methods a Service supports.

This is a strong interface aided by wizards for adding database sources, creating database queries or adding new Web service providers. It’s a solid foundation for easy-to-use and updatable services through the always context-sensitive property sheets for all the various resources and Servers used by JSC.

However, there are some vexing problems. Out of the box, JSC supports only five databases: DB2, Oracle, SQL Server, Sybase Adaptive Server and the Pointbase server included with JSC. Second, Sun Java Application Server 8.0 is directly supported in JSC on the application server side only. Third, this reviewer and dozens of JSC forum users have been unable to get the Add DataSources routines to work for such popular databases as MySQL, Informix, Cloudscape, Postgres and other JDBC-compliant databases. Finally, JSC docs do not describe how to add other deployment servers or transfer a completed JSP app to such popular app servers as JBoss, OracleAS, Tomcat, WebLogic and WebSphere. JSC’s lack of database and app server interoperability tarnishes a product that is otherwise solid.

This version of JSC is focused on introducing JSF while making the process of creating JSP-based Web apps simpler. Consequently, there is no AWT, Swing or J2ME capabilities in this edition. If you need to build applets, desktop apps or mobile J2ME products, look to Borland, IntelliJ and other Java IDEs.

That said, Sun gets points for being devoted to bringing fast and relatively easy JSF development to Java and JSP projects. NetBeans 3.6 users may be familiar with its limited visual development tools (the GUI source code is locked down). In contrast, JSC maintains two-way updates between the drag-and-drop design screen and the underlying code. Because there are two pages of code for each screen, synchronizing the source code to the visual design page is far from trivial.

The JSP and Visual Design screens are kept in lockstep, but the corresponding Java page is sometimes left out of the loop. For example, if we added a JSF GUI component, the Page1.java file was also updated. However, if we deleted the button, any previously declared handler code for the button was left in the Java program -- even when we had the Java Source Synchronization option set. This can lead to some hard-to-detect errors.

Otherwise, JSC has done a good job of bringing drag-and-drop GUI design to JSP. More than two dozen JSF components and many others are available from third parties and open source. Most components are database-aware, able to use CSS styles and respond to JavaScript coding events.

While JSC has simplified the creation of database JSP apps, this version lacks support for EJB entity beans, has no provision for EJB container setup, and its support for Query Building and Database design is not up to the capabilities of VB’s Visual Studio.NET tools.

Performance is an issue. All tests for this review were run on a Toshiba portable running Windows XP. The machine had a 2.8GHz, 433MHz bus; a 60Gb hard drive with 45Gb free; and 512Mb of memory. When running the Pointbase database examples, the program averaged 10 to 30 seconds to compile and run. When we switched to either Oracle or SQL Server databases, response time increased by a factor of eight to 10, or about two to three minutes for a compile and run.

We could not get JSC to run with any of the more modestly sized databases to test response time with a mid-sized database. And I observed another phenomenon: Memory usage would drift upwards even though all our test projects remained small.

For $99, Sun has provided a major improvement over NetBeans, Eclipse, and even IntelliJ or JBuilder for quickly creating JSP applications that use JSF. In addition, Sun has shown a lot of savvy in using CSS and JavaScript to enhance the potential for Web applications to do more local processing, requiring less network round tripping, and thus improving response time while reducing the processing load on central servers.

The most disconcerting thing for this reviewer was the lack of interoperability in Java Studio Creator. Only one app server is effectively supported: Sun’s. And not all JDBC databases are supported. It’s this combination of incomplete EJB support and disappointing interoperability that force us to give a very promising product a less-than-perfect rating.

Sun Java Studio Creator
Sun Microsystems
Santa Clara, Calif.
800-555-9786
www.sun.com

Rating: 4 out of 5 stars
Bottom Line: Sun has designed Java Studio Creator to be the Visual Basic of Java and J2EE Web development. It’s not there yet, but JSC is a major improvement over NetBeans, Eclipse, and even IntelliJ and JBuilder for quickly creating JSP applications that use JavaServer Faces. There’s still a lot to be implemented in EJBs, which Sun has promised to do, and there are disappointing interoperability problems between JSC and some popular databases. Despite these problems, this is a great tool for JSP with JSF Web projects.

Pros:

  • Builds on excellent NetBeans 4.0 base by offering drag-and-drop GUI design with database-aware components. 
  • True two-way GUI and code synchronization. 
  • Basic Web services and Session Bean wizards and generators. 
  • Clever reuse of JavaScript and CSS in GUI. 
  • Good value at $99.

Cons:

  • Scattered documentation. 
  • No EJB entity beans or containers supported. 
  • Query Builder and Two Synchronization fall short. 
  • Missing database support for MySQL, Cloudscape and PostgreSQL, among others. 
  • App server support is limited to Sun’s App Server 8.0.

About the Author

BIO: Jacques Surveyer is a trainer, consultant and Web developer. See his graphics tips at thePhotoFinishes.com.

Featured

Most   Popular
Upcoming Events

AppTrends

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.