Sun: Server-Side Up

Forte for Java 2.0 capably develops Web applications.

Sun Microsystems Inc.s upcoming Forte for Java 2.0 Internet Edition updates and expands the companys midlevel Java development tool to focus on the tasks Web application developers face.

eWeek Labs tested a release-candidate version of the $495 package; its scheduled to ship in early January. New features in this release include extensive support for the Java-based JSP (JavaServer Pages) Web scripting language and a number of new database browsing and programming tools to make building database applications in Java simpler.

Especially notable are two new database features that will attract Web page designers and object-oriented developers, respectively: a set of JSP tags that simplifies the JDBC (Java Database Connectivity) connection and the looping code needed to output database information in a JSP page, and an object-relational database-mapping layer that removes the need to write any SQL in application code.

The new JSP tags for database access provide a series of database connectivity and iteration tags that perform the same action (such as printing the record) on every row in a result set. Sun is releasing the code for these tags as open source in the hope that they become JSP standards. Certainly, the scripting language needs tags like this.

Despite its focus on server-side development, Forte doesnt yet support EJB (Enterprise JavaBeans), the linchpin in Javas server-development strategy. Sun will be releasing an Enterprise Edition of Forte for Java 2.0 in the summer of 2001 that will support EJB authoring. EJB (as well as JSP) support is common among other Java authoring tools such as Inprise Corp.s JBuilder and IBMs VisualAge for Java (although in versions that cost a few thousand dollars, compared with Fortes $495 price).

Forte requires Windows NT 4.0, Suns Solaris 7 and 8, or Red Hat Inc.s Red Hat Linux 6.2 (Windows 2000 is not supported). A free version, Forte for Java 2.0 Community Edition, will be available as a Web download next month as well (it provides JSP support, but not Internet Editions object-relational mapping or JDBC wizards).

Forte for Java 2.0 Internet Edition also includes an evaluation version of PointBase Inc.s PointBase Embedded Server (a small database server), Suns Forte TeamWare source-control versioning system and the Apache Groups Tomcat JSP engine.

Database Programming

Forte for Java 2.0 Internet Edition will have special appeal to object-oriented programmers because it provides a set of code libraries and mapping tools that wrap database fields with object interfaces.

Using these classes, we could manipulate sets of records as native Java objects (for example, we could use the Java iterator and the get and set methods to loop through, retrieve and update database information).

We tested Forte for Java 2.0 Internet Edition with Oracle Corp.s Oracle8i 2.0 database and were able to browse a schema and choose the tables for which Forte should generate object wrappers. Primary keys were required and foreign keys were helpful for the mapping process because they enabled Forte to then generate mapping code that allowed us to reference data in related tables using normal Java object-member dot-style notation. This is an elegant programming model for developers steeped in object-oriented design.

Sun officials cautioned that using mapped objects can cause a performance hit if developers dont design the mapped objects class structures to match as closely as possible the kinds of queries and joins they will need.