Sun’s ‘Creator’ Is a True Contender

hen it first announced the nascent product then known as Project Rave, Sun said Java Studio Creator would be the carrot to finally attract corporate developers to Java. It would be a Visual Basic-like drag-and-drop development environment, and it would attract not only current Java developers, by simplifying Web development tasks, but also developers from organizations that want to move their applications off of one-platform .NET and into cross-platform-capable Java.

Jim Inscore, Product Marketing Manager for Java Studio Creator (Creator) says Sun targets the tool at corporate developers who need to:

  • build Web (especially intranet) applications quickly
  • prefer to work with a visual design tool, are currently using ASP, ASP.NET, ColdFusion, or another tool
  • need access to databases

Judging by the early access version, released to the public earlier this month, Sun has taken this mission to heart. Java Studio Creator is slick and flexible, standards-based, easy-to-use, has a built in application server and relational database server, and outputs standard J2EE and JSP code.

First, a disclaimer: I’m not a hard-core Java programmer, but I think I’m at least somewhat representative of Sun’s target audience. I want to build Web applications quickly; I prefer visual design tools for building UIs; I build database-driven applications; and I’ve used ASP and ASP.NET extensively. Therefore, I’ll take an ASP.NET-centric approach to Java Studio Creator (Creator), looking for similarities and differences between Creator and the Visual Studio IDE. Those who primarily work in other environments are likely to have differing opinions about the relative importance of various features.

Sweet Installation, Slow Startup
I downloaded the early access version of Java Studio Creator from Sun’s site, which consisted of a single 140MB installation file. Executing the file ran the installation perfectly on my Windows XP Pro-based test machine. Sun has been paying attention to details, and it deserves credit for that.

The installation asked me to choose or enter an installation folder. I chose to install to a folder that didn’t yet exist?and that was it?the install went merrily on its way. I got:

  • No irritating questions about how my installation folder didn’t exist.
  • No manual tweaking of settings or classpaths
  • No questions about Web servers, preferred ports, or data sources
  • A nice finishing screen that let me launch the newly installed IDE

The install added a PointBase SQL database server (version 4.8RE) to my machine, which rather irritatingly opens a command window and leaves it open while you’re working in the IDE (see Figure 1). If you close the command window, the PointBase server shuts down, so you have to learn to live with that extra window on your desktop. The setup automatically adds the PointBase server to a list of data sources available through a VS.NET-like Server Navigator panel. That’s a nice touch, because you can use it to get started learning how to build data-driven sites immediately, without worrying about connecting to your particular database..

Author’s Note: The early access release contains a JDBC connector only for the PointBase database, but other connectors (such as DataDirect’s Connect for JDBC) let you use Creator with other databases. Sun’s Inscore said the release version of the product will include connectors for other databases as well.

 
Figure 1. The PointBase Server Window: The PointBase server opens a command window when it starts. If you close the window, the server stops?meaning you have to learn to live with the window open while developing with Creator.

The install also adds an application server, Sun Java System Application Server Platform Edition 8. The IDE autodeploys projects to the application server whenever you want to test your project.

You can manually start and stop both PointBase and the application server using menu items added to your Start Menu. Unfortunately, the application server also opens a window?this one minimized so that you can’t see any content, nor can you resize it (see Figure 2). You can minimize it, but it doesn’t minimize to the System Tray, it minimizes to the desktop toolbar; you just have to learn to deal with this extraneous third window, along with PointBase’s command window, and the Creator window itself.

 
Figure 2. Application Server Domain Window: This useless window (you can’t resize it) appears the first time you run your application from Creator, and then remains on your desktop thereafter.

Startup
After installation, when you launch the IDE, you’ll see a splash screen that lists various actions the IDE performs as it loads. While the information is relatively meaningless, consisting largely of messages such as “preparing modules,” “loading modules,” and “loading parts of modules,” you’ll be glad Sun saw fit to put something on the screen, because launching the IDE takes very nearly as long as installing it. That’s understandable when you look at the memory usage for this tool: Bearing in mind that this review covers the early access version, without any project loaded, the IDE uses nearly 80MB of memory. That’s considerably more than even Visual Studio, which requires less than 30MB with no project loaded. One can only hope that Sun will optimize the memory usage and improve the launch time before releasing the product.

What You Get
It’s obvious that Sun has made every effort to make .NET programmers feel comfortable?and that effort shows in both the selection and arrangement of the default panels visible in the IDE. The tool opens on a Welcome screen that eventually fills up with a list of links containing the titles of recent projects (see Figure 3). Clicking a link opens that project. The two buttons above the project list let you create a new project or open an existing project.

 
Figure 3. The Welcome Screen: The Welcome screen maintains a list of links to recent projects and buttons for creating new projects or opening existing projects.

Edit area: The large center area consumed by the Welcome screen in Figure 3 changes to become the editing area when you create or load a project (see Figure 4).

The editing area adapts contextually as you load and select different types of files into the IDE. For example, when you first create a new project or a new page, the editing area functions as a canvas on which you drop both visual and non-visual controls to build a UI. Similarly, when you open a code file, the editing area functions as a code editor.

 
Figure 4. Java Studio Creator: : This screen capture shows the central design editing area surrounded by a number of specialized resizable docking panels.

Around this central editing area are docking panels containing support functionality. You can rearrange and hide them to your heart’s content, but by default, moving clockwise from the top right in Figure 4, the panels are:

  • A Properties panel, which also serves as a Dynamic Help panel. You switch back and forth between those two panel functions using the tabs below the panel. The Properties panel is exactly what you’d expect?it contains a list of properties for the currently selected item (control or form) in the editing area, along with editable fields, dropdown lists, and sometimes-complicated property editors for that item.
  • A Project Navigator panel, which shows both a “Logical View” (see Figure 4) containing pertinent items in your project arranged by function, and a “FileSystem View” (see Figure 5) containing all the project’s files (automatically generated configuration and deployment files included) arranged by folder. Unfortunately, unlike the Properties panel, the Project Navigator panel doesn’t have tabs to switch the view; you must do that manually, by right-clicking on the top-level project item (not just any blank area of the panel) and selecting “Show FileSystem View” or “Show Logical View” from a popup menu.
  •  
    Figure 5. The Project Navigator FileSystem View: The FileSystem view available from the Project Navigator panel shows you all the files that make up your Creator application.
  • A Document Outline panel, which shows you a hierarchical view of the items on your .jsp page.
  • An Output panel, which shows comiler output, error messages, and functions as the output area for any console messages, and pulls double duty as the Debugger panel when you launch your application in debug mode. In debug mode, the panel shows the call stack, local variables, and watched values by default, but has a complex set of other debugging-related information that you can display by clicking icons at the left of the panel.
  • A Palette, which holds various controls and widgets. The Palette, via the Clip tab at the bottom, also functions as a code clip library. On the widget side, the Palette is pre-populated with all the common visual Web controls, such as text fields, output fields, buttons, list and combo boxes, a grid control, and so forth as well as non-visual validator and converter controls. On the clip side, Creator ships with a small number of pre-built clips. You will eventually be able to add user-defined controls (a feature not available in this prerelease version) and code clips (available now) to the Palette.
  • A Server Navigator panel, which shows you the database servers, Web services, and deployment servers available from your development system. You can browse database tables, views, and stored procedures, and drag-and-drop database objects onto controls in the visual UI editor to bind controls to data.

Building Web Pages Visually
In Creator, you build projects, which contain the HTML files, code files, class files, and other files that make up the project. Typically, you don’t need to see all the files, and Creator hides them from you in the Project Navigator in the default Logical View. When you create a new project, Creator gives you a blank “template” .jsp page, and replaces the Welcome screen with the design view of that page. This visual design surface functions as a “canvas” onto which you drag components from the Palette.

For example, the first sample application builds a simple login screen simulation, containing a text field to hold a username, an outputText field to hold the server’s response, and a button that submits the form to the server (see Figure 6). After dropping each control onto the page, you can click on it to move or resize it using a standard set of resizing handles. To select multiple controls, you hold the Shift or Ctrl key down while clicking each control. Alternatively, you can click on the page design surface and drag a nicely shaded rectangle around the controls you want to select using the mouse.

 
Figure 6. Central Editing Area: This view of the central editing area shows the design surface for the Page1.jsp file. The tabs at the top of the window switch from file to file, changing the editor appropriately for each file type.

Unfortunately, some convenient design features are missing. For example, you can’t move controls around using the keyboard; you can’t select multiple controls and then align or size them all at one time; and you can’t copy and paste controls you’ve already placed on the page. None of these are terribly serious omissions, and at least one (copy/paste controls) is already being worked on. The documentation discusses copying and pasting controls even though this build didn’t enable that feature.

Using the Properties Window
Whenever you select one or more controls the Property panel reflects the properties of the selected control(s), which you can then change. For simple properties, such as text, numbers, and pick lists, you can change the property right in the property window. By default, when you click a control that accepts a Value property, such as a text field, the documentation states that the Value property will be the default, and you can simply start typing to set the property value. That’s a convenient feature, but it didn’t always work in this early access version.

More complex properties, such as CSS settings for a grid control or the list of items for a List control, use a button that, when clicked, displays an appropriate property editor.

Working with the Code Editor
Double-clicking on a control takes you to the code editor and automatically inserts a “stub” for the most commonly coded event for that control. For example, when you double-click on a text field, you’ll see something like this:

   public void textField1_valueChangeListener(      javax.faces.event.ValueChangeEvent vce) {      // Add your event code here...   }

Some control event handlers return a value?even if the value is null. For example, when you double-click on a button, you get this event-handler stub for the button’s action() event:

   public String button1_action() {      // Add your event code here...      return null;   }

This early access version sometimes has problems with inserting the stub code or positioning the cursor in stub code it creates, but the code itself was fine. The IDE checks for code syntax errors whenever your cursor leaves an altered line, and marks problems with syntax highlighting?a wavy red underline and a small asterisk-type icon to the left of the line containing the problem (see Figure 7).

 
Figure 7. Code Syntax Highlighting: The figure shows a line of “bad code” in the editor, after the syntax checker has marked it with a red wavy underline.

The code editor also features “code folding,” which lets you “roll up” code you don’t want to see into a single line. You expand or contract code by clicking the plus (+) or minus (-) symbol next to the folded or unfolded code. The editor also features the Sun equivalent of Visual Studio’s Intellisense, a must-have feature for any modern code editor, but it was both incomplete and buggy in this early access version. One nice feature is that you can see the documentation for any class or keyword in a popup window by placing your cursor in the desired word and pressing Ctrl-Shift-Space.

You can get to the code editor by double-clicking on a control or the design surface as described earlier, or by right-clicking and selecting to “View Java Class” from the popup menu?an item that conveniently appears first in the menu, whether you right click a control or the design surface.

Page Navigation Feature
One of Creator’s unusual features is Page Navigation, which uses a drag-drop visual design metaphor that lets you quickly create and define ways for users to navigate through the application’s pages. To define the navigation, you draw arrows from page to page showing the navigational paths through the app, providing a name for each path, and then attach the return value from a button action handler to specific navigational paths (see Figure 8). The Page Navigation feature is convenient for beginners and for small quick projects, but becomes progressively less useful as your expertise increases and as the number of pages in your application grows.

 
Figure 8: Page Navigation Feature: This feature lets you define navigational paths through the application, and connect each path to an action.

Performance and Prognosis
It’s not fair to make hard performance comparisons between the release version of Visual Studio and this early access version of Creator, so I’ll avoid doing that, and just use this review as a heads-up warning to Sun that the current performance is not acceptable. I’m running the product on a dual Pentium IV 2GHz machine with 2GB of RAM, and it’s still slow. The code editor can take up to several seconds to check code syntax after your cursor leaves a line, even in very small code files. When you’re ready to test your project, the IDE compiles and deploys your code to the application server and launches a browser. For the IDE to function well as a rapid application builder, that edit-test cycle should be very fast?preferably nearly instantaneous, but in this version, it takes far too long?often thirty seconds or more. As optimization is (rightly) a task performed at the end of projects such as Creator, one can hope that the release version won’t suffer from the performance problems of this early access version.

The IDE includes a toolbar that purportedly shows you the IDE’s current memory usage. Clicking on the toolbar display forces a garbage collection. However, the figure displayed in the toolbar doesn’t jibe with the Task Manager memory usage figures, which show that the “runide.exe” (Creator’s executable file) process consistently uses over 96MB of RAM, even with very small projects loaded. The toolbar consistently displays much smaller memory usage values.

Overall Impressions
So, does Java Studio Creator meet the expectations of current .NET developers? Will it lure them away from Visual Studio to take advantage of Java’s broader platform support?

That depends. Creator certainly has the potential to lure .NET developers to Java because it offers many of the features that can help wean them away from Visual Studio. As an ASP.NET developer familiar with Visual Studio, if I had to deliver applications to a mixture of Windows and non-Windows platforms, this tool would be among my top choices. It’s instantly familiar, and Sun has done a good job of hiding functionality that you don’t always need to build typical corporate database-driven Web applications.

But much of Creator’s potential is as yet unrealized. First and foremost, the planned release version of Creator doesn’t target desktop applications; it can only build Web applications. Desktop application development is planned for a future version (code named “Mako”) which will target not only Web applications, but also desktop and mobile-device applications, using a “develop once, deploy everywhere” model. That version will be far more similar to Visual Studio’s current capabilities than is Creator in its current form. When that happens, the two products will become more equal, with the nod toward Creator because it outputs standard Java code, which isn’t limited to Windows machines or PocketPC devices.

Second, although Sun’s done a good deal of the work to create a viable competitor to Visual Studio, ColdFusion, and other Web application IDEs, it’s not going to attract that audience unless the release version of the product is considerably less buggy and faster than this early access version. Now, Sun needs to focus on solving problems, improving Creator’s performance, reducing its memory requirements, and adding the missing convenience features that, more and more, differentiate one IDE from another.

Sun wouldn’t provide a price for the release version of this product, but Sun’s Jim Inscore did say that it would be competitive with similar development tool offerings from other companies. Inscore also said Sun plans to release the product in late June at JavaOne.

Overall, Creator, in its current implementation, is a slick, if slow, IDE that offers ASP.NET developers an environment that immediately feels comfortable and familiar while simultaneously giving them an easy path to target platforms other than Windows in the future.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: