Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Open Source Forte for Java


October 2000 Product Review: Open Source Forte for Java

Earlier this year, Sun Microsystems announced that it would release the source code of the Community Edition of Forte for Java under the Mozilla Public License model. The Community Edition is a basic version of the soon-to-be-released (and not open source) Internet Edition and the Enterprise Edition Java 2 development environments.

Proclaiming that you will unveil source code is a popular way to generate press and attract the attention of developers these days. It can also be a disaster. Free software proponents are certain to pick apart your particular interpretation of open source and declare it to be hogwash—or worse. Aware of this predilection, Sun has left ample time between its announcement and the actual release of the source code so that it can address the problems that are bound to come up. An extensive description of the license under which the software will be released is available at www.sun.com/forte/tools4dotcom/opensource.html.

In exchange for your contact information (it’s still true that there is no free lunch), you can download the binary version of Forte for Java from Sun’s Web site.

The Forte for Java IDE is based on the NetBeans IDE, which Sun bought at about the same time as it acquired Forte. The source code for the Forte for Java development environment is currently available for download from www.netbeans.org. Sun is not releasing the source for the compiler or the browser that comes with the product.

Through its acquisition of Forte software, Sun has taken a huge leap into the enterprise development tools market. Other products in Sun’s Forte product line include Forte C++, Forte 4GL, Forte Fusion, Forte Fortran and Forte C. Collectively, these products are known as Forte Developer 6 and have replaced Sun’s Workshop tools for Solaris development.

Figure 1. Forte for Java's GUI Editing Workspace

The editing workspace, while cluttered, offers Forte's main windows (tools, explorer, properties and editing) plus the Component Inspector and the Form Editor.

In the Mode

Forte for Java has a typical multi-window interface, similar to that of Microsoft Visual Studio.

The top window contains a plethora of drop-down and tabbed menus and toolbars. Nearly every aspect of Forte for Java can be customized. You can change the position and order of items in menus and toolbars, add new menus and alter the commands contained in contextual menus. Forte also allows macro recording.

Through Forte’s Explorer window, you can browse packages, objects and files in a hierarchical view. Below the Explorer window is the properties window, which, of course, provides access to the properties of components.

The workspace tabs allow you to switch between Forte’s five modes: editing, GUI editing, browsing, running and debugging. On the right-hand side of the top menu window is a palette of components that can be dropped into the GUI editor.

Forte for Java’s default mode is editing. A typical source code editor, it features color-coding, search and replace, and the ability to set break points and watches. In addition, you can use Forte’s dynamic code completion function, which will suggest full expressions based on the first few letters that you type. Unlike some IDEs, Forte does not show a list of possible classes, methods and variables every time you pause while typing. If you want to use code completion, press control-space and a list of the possibilities will appear. In this way, code completion is there for developers who need it, but developers who don’t want to be bothered with it don’t need to figure out how to turn it off.

Although Forte was on to a good idea with the key combination for code completion, there are still bugs to be worked out. Once you’ve summoned the code completion list, you can only get rid of it by selecting something. If you ask for code completion, then decide that you’d rather just type the rest of the expression yourself, the code completion list sticks around until you complete the expression, or until you switch to a different window. This is not quite as annoying as it sounds, but a simple "close window" box on the code completion list would help, at least psychologically, even if it’s never used.

The GUI editing workspace consists of Forte’s main windows (tools, explorer, properties and editing) plus the Component Inspector and the Form Editor. If you’re starting to wonder whether things are getting a little crowded, you’re right. As do most IDEs, Forte favors clutter.

The Component Inspector is simply a hierarchical list of the components being used by your application. The selected component’s methods, properties and events appear in the lower half of the window.

To create user interfaces, open the Form Editor. Components can be added to the GUI by selecting them from a palette and placing them in the Form Editor. As each component is added to the Form Editor, code is generated in the editing window. Code generated by placing components in the Form Editor is shaded in the editing window and cannot be altered.

Forte’s browsing workspace contains an object browser and a properties window. The browsing window allows you to view the packages, objects and members (methods, variables and constructors) in your program. As you select objects, properties appear in the properties window. Using the object browser, you can easily open files for editing, edit properties or simply view information about the objects that make up your project.

The "Running" workspace attempts to execute your application. If there are errors, they will be shown in the output window; otherwise, your application will be launched.

The debugging workspace allows you to set breakpoints, watch variables and monitor threads. Breakpoints are highlighted in the editing window.

Getting Started

Forte for Java works very much like other single-developer Java IDEs. You begin developing an application by dropping GUI components into the Form Editor. Properties and events can be specified in the component inspector.

As you specify events, listener code and event methods are added in the editing window along with placeholders for your custom event-handler code. Changes and additions that you make using Forte’s windows and menus are instantly reflected in the other windows.

The first step in developing an application in Forte for Java is to select a container using the template chooser. The templates provided by Forte include Abstract Windowing Toolkit forms, beans, classes, Swing applications, Java Server Pages (JSP), dialog boxes and HTML files. Each template has a description that you can view while browsing through the template chooser.

After selecting a template, you choose a layout manager from the component palette. These are Java classes that guide the position and size of the components in the Form Editor. Forte for Java includes quite a few options for specifying the layout of components in your application’s GUI, depending on how much control you require over the look of your application.

There are seven possible layouts:

• border layout, which divides the form into north, south, east, west and center,

• grid layout, which allows you to specify rows and columns,

• card layout, which is basically a tabbed window,

• flow layout, which arranges components in rows—from upper left to bottom right—like a page of text,

• the Swing API’s box layout, which allows you to place multiple components along either the horizontal or vertical axis, but not both,

• gridbag layout, which allows you to visually adjust the placement of objects using the customizer dialog box (see Figure 2), and

• absolute layout, which allows you to specify fixed positions for components in your interface.

Figure 2. Forte for Java's Gridbag Layout

The gridbag layout allows you to visually adjust the placement of objects using the customizer dialog box.

Because visual components in applications that use the absolute layout are in fixed positions no matter what platform they run on, this layout manager is not recommended for production applications. In addition to the included layout managers, you can also use the specifications in the Forte for Java Layout Manager API to create custom layout managers.

Forte for Java includes considerable documentation in HTML, including a quick start guide, a tutorial and a full user’s guide. One particularly annoying feature of the documentation, though, is that it opens in a Java Web browser that is included with Forte. There isn’t a good reason for the documentation to use this browser, because everyone (and especially anyone who is developing Java applications) already has at least one preferred Web browser, and it isn’t this particular one. Forte’s documentation is plain HTML, and should, therefore, simply be displayed in a user’s default browser.

More annoying though, is the fact that the documentation is only displayed in the mode in which you specifically open it. For example, imagine that you are editing a GUI and you open the online help to find out how to debug your application. When you switch to the debugging mode, the help window will disappear. I spent quite a bit of time switching between modes so that I could read the help in one mode while I was working in another mode. It was only after several hours of switching back and forth that I figured out that I could open a separate instance of the online help browser in each mode of the application. Still, an application’s help functionality ought to be persistent across all of its modes.

A Modular Design

Perhaps the most unique aspect of Forte for Java is that it comprises several independent pieces of software working together, namely the object browser, the forms editor, the user’s guide, an HTTP server and the editor. Other modules that are included with the free version of Forte for Java provide integration with the CVS version control system, a Java platform debugger architecture (JPDA) debugger, JSP support and automatic documentation generation (Javadoc). Expanding the IDE’s capabilities, therefore, is as easy as plugging in additional modules. This is the brilliance of Sun’s open source plan. By releasing the code to the core set of modules and making them freely available, Sun will encourage the development of third-party modules and thereby increase the value of the versions of Forte for Java that aren’t open source. By giving away this commercial-quality, albeit limited, Java development environment, Sun also hopes to get developers hooked on Java in general and its development environment in particular. Sun’s strategy is borrowed from the shareware (or Microsoft) model. Give away a functionally limited version, then sell the user an upgrade once they see how much they need it.

The next step up from the Community Edition is the Internet Edition. This version has all of the core community components plus support for database development, Enterprise JavaBeans, CORBA, Remote Method Invocation and Java Naming and Directory Interface (JNDI).

The next level above Internet Edition is the Enterprise Edition, which, when released, will feature support for team development of sophisticated, scalable e-commerce applications. In addition to the modules included with the Internet Edition, the Enterprise Edition will include modules for application assembly, automated deployment, collaborative deployment and distributed debugging, component building EJB wizards, a CORBA wizard, database EJB wizards, and dynamic Binding. Sun also plans to integrate the Enterprise Edition with the iPlanet (formerly the Sun-Netscape alliance) deployment server to simplify and speed deployment and maintenance.

Sun has acquired a great deal of Java application server technology and knowledge in the last couple of years (from Netscape and NetDynamics), which it has rolled into the iPlanet Application Server (IAS). When it is released, the Enterprise Edition of Forte for Java will be tightly integrated with IAS, but it will also allow you to develop applications for any other J2EE-compliant application server.

Sun has learned from its past attempts at Java development environments. The Community Edition of Forte for Java is based on an excellent entry-level development environment (the aforementioned NetBeans), contains the best features of Sun’s Java Workshop (without all of the performance problems) and integrates with Sun’s other Fusion tools. The result, once the Internet and Enterprise Editions are released, will be a development environment that can fit both the needs of the beginning Java developer and the most demanding enterprise.

Bringing Order to Open Source
Firm adapts application service provider model to freeware.

OpenAvenue’s Oasis (OpenAvenue Source Infrastructure System) is an integrated tool set for Web-based collaborative development. OpenAvenue hopes to bring order to open source development by providing central repositories and code catalogs for open source projects.

OpenAvenue, in Scotts Valley, California, has adapted the application service provider model of outsourced applications to distribution and submission of open source software. Using Oasis’ Web interface, you can browse, download and search the latest baseline code for numerous open source projects. Registered users of Oasis’s have access to additional functionality, such as the ability to submit code, browse previous baselines, participate in discussion forums and monitor projects through a personal "project dashboard." Registered Oasis users will also be able to download the binary version of Sun’s Forte for Java, Community Edition.

OpenAvenue’s code indexer and search engine, CodeCatalog, can be integrated into Forte for Java using an add-in module that is currently available on OpenAvenue’s Web site at oasis2.openave.net/servlet/ProjectMemberDashboard.jsp?p=222.

— Chris Minnick

Forte for Java, Community Edition


Sun Microsystems


901 San Antonio Road


Palo Alto, CA 94303


Tel: (800) USA-4SUN

Online: www.sun.com

Price: Free (user must supply contact information).



Software Requirements:
Solaris, Linux or Windows OS with a Java VM installed.



Hardware Requirements:
For Intel Architecture platforms: Intel Pentium II processor with a 300-MHz CPU, 128MB of memory and 30MB of disk space. For Solaris on Intel, 256MB is recommended.
For SPARC platforms: Sun Ultra-SPARC 5 system with a 270-MHz CPU, 256MB of memory and 30MB of disk space.

RATING: ****

The Rate Sheet

Pros:

1. It's free and open source.

2. Modular structure allows you to upgrade your IDE when you need to without having to throw away what you already know.

3. Good support for Java 2.

Cons:

1. The help system is confusing and uses the JavaHelp browser.

2. Features for SML development not built-in.

3. Forte for Java, Community edition has very little support for team development. See the sidebar on OpenAvenue's Oasis for an example of a tool that does allow collaboration for Java projects, including Forte for Java.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.