Sun Microsystems has been busy working on its next-generation Integrated Development Environment (IDE) for Java-based applications for some time now. Scott McNealy first publicly announced Project Rave last year at JavaOne. Rave is the cornerstone of Sun's strategy to reach 10 million developers worldwide. Sun's current estimates put the Java developer community at 3 million. So the primary function of Project Rave is to make Java more attractive to 7 million non-Java developers and particularly to Microsoft Visual Basic (VB) developers. Project Rave aims to accomplish this by making development faster and easier. Its emphasis is on application assembly and visual programming.
With its first Technology Preview release of Project Rave, which was unleashed in December of 2003, Sun changed the name for Project Rave to Sun Java Studio Creator. The focus of this first release is two-tier Web applications that either talk to databases directly or consume Web services. Sun is also quick to point out that Java Studio Creator is targeted not at the enterprise market (note the two-tier vs. n-tier distinction) but rather at the corporate developers. For the enterprise market, Sun will offer the Sun Java Enterprise System, which I will cover in a future column.
A Standards-Based Foundation
Even from the early whitepapers on Java Studio Creator, Sun had the right idea to build this new tool on existing standards. To that end, Java Studio Creator relies heavily on NetBeans, JDBC RowSets, Web Services, and JavaServer Faces (JSF). If you think of an application as being built out of bricks, mortar, and plaster, then NetBeans are the bricks, the basic structure that everything else is built upon. JDBC RowSets and Web Services are the mortar that holds the bricks together. JavaServer Faces is the plaster that makes it all look nice to the end user. Web Services are the most critical piece of the building. For applications to be truly assembled from pieces, we must decouple the tiers of implementation as much as possible, keeping the database and business rules safely tucked behind formalized interfaces such as Web Services.
Java for the Masses
Although Java Studio Creator has gotten much of the focus of Sun's goal of 10 million Java developers, there are other key technologies to Sun's initiative. For example, the Scripting Java Specification Request (JSR 223) is aimed at luring in developers who are currently using popular scripting languages such as PHP. Another critical part of the initiative is Sun's creation of the Java community and developer Web site portal java.net, which was the focus of a previous "Java Journal" column.
Making Development Faster and Easier
Was there ever a tool that wasn't supposed to make development faster and easier? The key here is to look at the obstacles that slow developers down and remove them. As mentioned previously, the current Technology Preview release of Java Studio Creator is all about two-tier Web applications, specifically either those that connect directly to a database or those that consume Web Services. These two flavors of applications are suitable solutions for most corporate application needs. So let's look at what common tools, frameworks, and tasks are utilized when developing applications like these and then see how Java Studio Creator addresses each of these needs.
Let's start with the user interface. I'm a big fan of the visual editors, especially those with good drag-and-drop capabilities and synchronization between source code and diagram. If I make a change to the visual representation of the code, the code itself should change and look no different than if I had edited it manually. Most Java IDEs have a mechanism for doing this, but all seem to have their quirks when dealing with the intricacies of Swing. However, since Java Studio Creator is currently all about Web-based applications and uses JSF, it gets to avoid all the Swing issues for now. Instead, we are provided with a simple, familiar-feeling Web canvas onto which we can drag and drop our favorite JSF components.
Most applications are structured around some form of Model-View-Controller (MVC) design pattern. So for the user interface, we are clearly talking about the View aspect of the pattern. Views need to able to do three things: validate, convert, and display. Let's look at each of these.
Although some would argue that data validation should take place in the Control, I find that for pragmatic reasons it usually migrates its way closer to the user; if somebody inputs something incorrectly, we want to do as little processing as possible on it. Apparently, the creators of Java Studio Creator agree, and they provide some simplistic validators for length and range checking on user input. I would definitely say this clears an obstacle. Developing your own validation mechanisms can consume significant resources, and since validation is always part of the application's user interface, the tools for building the interface should support validators.
Next, we need adapters. Take any significant-sized application and look at how much data type conversion goes on. For example, consider the theoretically simplest of all basic data types, the Boolean. To the user, it may simply be a check box, but to the developer, it may be represented as an instance of a Boolean primitive type, a char primitive type, a Boolean Class, or even a String Class. It can get even more complicated when you talk about chars and Strings because then you have to account for the domains. Is true represented as "t" or "T" or even "Y"? In the case of Strings, it could even be "true," "True," "TRUE," "yes," "Yes," or "YES." Worst of all, we are still talking about the simplest data type there is, so once we get into dates and times, everything gets exponentially more complicated. In general, the best way to combat this type of entropy is to isolate it. In the case of MVC architecture, we isolate it to the View layer and keep the Model and Control layers to a single representation. In the case of dates and times, this means that all representations in the Model and Control layers are consistent. However, in the View layer, the user may interact with a date as a text string or even a visual calendar GUI component, time may or may not be included, and you might even have to deal with time zone issues. So in design pattern terms, what we need is an "Adapter pattern," which is simply a class that sits between two interfaces and allows them to interoperate. The perfect analogy is electrical plug adapters for foreign outlets. By inserting an adapter between the known interface of my shaver and the known (although often scary-looking) foreign power outlet plug interface, I can still use my shaver. For Java Studio Creator, Sun has implemented a Converter, a lightweight version of the Adapter pattern.
Finally, the View layer needs to be able to display data and take user input. This is where JavaServer Faces (JSF) comes in. JSF itself is built upon JavaServer Pages (JSPs), which were also covered in a previous "Java Journal" column. In addition, JSF incorporates a standard API for handling component state, validation (as discussed above), page navigation, and internationalization. Again, Sun is leveraging its existing tools and APIs to create a reusable application framework.
Using Java Studio Creator
The overall look and feel of Java Studio Creator is crisp, much more so than I would expect from a Technology Preview release. As can be seen in Figure 1, the interface is broken down into six main windows as well as a standard menu and a toolbar. Most of the windows have multiple tabs, so each window can be docked or undocked at will. I think this is important because I like to spread things out over a couple of monitors when I develop.
Figure 1: Welcome to Java Studio Creator. (Click images to enlarge.)
Let's briefly talk about each of the windows.
Server Navigator: You use the server navigator to add or browse database servers and/or add Web Services to your projects. In addition, you use this window to manage and configure your deployment servers.
Palette: The Palette manages your JSF Standard Components, Validators, Converters, and Clips, which are code snippets.
Properties and Dynamic Help: This is your stand IDE properties panel, which displays data on the currently selected component. The Properties window also has a tab called Dynamic Help, which links you to a number of help sources based on the currently selected component. I found this to be one of the more innovative features of the whole application. I'm rather tired of the typical contextual help systems that rarely if ever actually provide you with an answer.
Portfolio Navigator: This is where all of your project-level resources are organized. It contains a tree-like structure that manages your project's Web forms, navigation, Java source files, and other resources, including the jar files your project depends on. The Portfolio Navigator can be viewed in either a logical or file system-based perspective.
Editor Pane: This is the tabbed pane in the center of Figure 1. When you first launch Java Studio Creator, you are presented with the Welcome window, which has a list of all your current projects as well as a button for creating a new project. Once you select a project, the Editor Pane will change to a tabbed pane where you can edit either visually or using text, depending on the tab chosen. Figure 2 shows the visual editor pane for a JSP for one of the sample applications, and Figure 3 shows Query Editor for a RowSet from the same application. I have yet to find a query editor, including this one, that was worth the effort. Either a query is trivial enough that you can just type it straight out faster than you can bring in all the tables in the query editor or it is complicated enough that it has a subquery, union, or outer join, in which case the query editor is of no use.
Build Output Window: This window is created when you first compile a project. It contains typical compiler output, such as number of files compiled, targets for your jar files, as well as any compilation errors that are encountered.
Figure 2: This is the visual editor pane for a JSP for one of the sample applications.
Figure 3: This is the Query Editor for a RowSet from the same application.
So You Want to Try It Out
If you are interested in getting access to the Technology Preview release of Java Studio Creator, you can sign up for it at Sun's Web site. Sun has closed off access for the current release, but your best chance of being included in the next one is to sign up as soon as possible.
Cost
So what will it cost? Well the Technology Preview editions are free of course, but then again, you probably wouldn't want to use them for anything other than prototyping anyway. All that Sun has committed to so far is that the cost will be competitive.
System Requirements
Windows system requirements are P4 1 Ghz, 512MB RAM, Win 2000 (Service Pack 4) or XP Pro or Home (Service Pack 1a), 375MB disk space, Java Web Services Developer Pack 1.2, and Database PointBase 4.6 Restricted Edition. Note that Java Web Services Developer Pack 1.2 and PointBase 4.6 Restricted Edition are bundled with Java Studio Creator.
Roadmap
So when will it be ready? Well, here are the official release roadmap and code names as stated in the Sun Java Studio Creator FAQ:
- Hammerhead, the first release, will be based on the initial Project Rave technology demo shown at JavaOne 2003. The plan is to release a Hammerhead product sometime in mid to late 2004.
- Mako will focus on other client targets, like rich clients, portals, and mobile devices, along with a higher level two-way visual design and modeling center for the application components and their interactions.
- Great White will follow Mako. It will focus on separating the business logic from the presentation layer and will support more robust n-tier application architectures.
Overall Impression
Considering that the product is a prerelease, I must say that I was impressed. It lives up to what is trying to do and doesn't lose sight of what the goals are. Java Studio Creator is not an IDE for enterprise development, but rather for corporate developers who have a little more flexibility. I ran through every tutorial on the Web site and even slapped together a few samples of my own without any problems. I have had worse first experiences with IDEs that I paid for. Even though there is a lot going on, the user interface is nicely organized. The synchronization between the visual editor and text editor was flawless. I can't begin to stress how important this is. Anyone out there who has ever had the unfortunate experience of having to do development in Oracle Forms--where sometimes it is easier to throw away an entire form and start over again than to make a programmatic change to the generated code--will confirm the importance of this feature. It is also important when teams will be collaborating on a project. Some people simply are more efficient at programming visually, and some are more efficient at slinging code. If your tool forces you down one path over the other, somebody on your team will not be working in the most efficient manner, and thus, one of the primary goals of the tool will not be met. All this said, there are definitely areas Sun needs to work on to bring Java Studio Creator up to the standards of other IDEs. Advanced editing features and integration with JUnit and UML modeling are now expected to be included in all commercial-grade IDEs. Whether these features make it into the final release version or not, Sun has certainly made a more approachable development environment, and ultimately it will be up to some 7 million potential Java developers to determine if Sun succeeded. Also, it should be noted that Sun is practicing what it preaches: Java Studio Creator is written in 100% Java.
Michael J. Floyd is the Software Engineering Manager for DivXNetworks. He is also a consultant for San Diego State University and can be reached at
LATEST COMMENTS
MC Press Online