This review is about Java Studio Creator from Sun, but before I go into details of the product I would like to give some background into the reason my company got interested in Java Studio Creator in the first place. The reasons for making this decision are, in my opinion, as important as the experiences we have had with the tool itself.
Around October last year I was involved by several teams at my company to help choose a replacement for the technologies they were using on their projects, namely VB6, ASP and VBDs, which were being replaced by Microsoft in the form of .NET
Naturally .NET was being considered, but within some of these teams and other teams within the company, we already had a large investment in Java technology for the server and middle-tier applications, and faced with the issues of connecting Java and .NET, and also with the prospect of largely re-writing much of our code base on these ASP/VB6 projects, we decided to look for other options.
Around the same time I had been following some of the hype surrounding Sun's Project Rave, later to become known as Sun Java Studio Creator. We were lucky enough to get on the early access program and start assessing the new software. As well as Java Studio Creator, we started looking into other Java solutions.
In time it became clear that using Java instead of .NET was attractive for several reasons. For one, connecting to our existing Java code base would be easier; for another, we already had Java skills within the company, and also our focus on the Oracle database made Java and J2EE attractive, since that is clearly the tool set of choice for Oracle.
Java and J2EE
I imagine that the above scenario sounds familiar to other engineers in other companies than ours. The replacement of VB6, ASP and VBDs with the .NET tools means that many companies are facing the prospect of either falling behind the current technology or re-writing large portions of their existing code. Our experience with Java on the other hand has been one of largely straightforward backwards compatibility, with major revisions of the Java language requiring only modest changes to the code, if any.
We had already built some applications using the J2EE platform and had experience in that technique; however, with that experience came the knowledge that a full-blown J2EE approach with EJBs, JMS and all the other trimmings, while flexible and powerful, was overkill for many of the simpler projects we had. The complexity of EJBs in particular was a worry for many of our existing engineers.
This is where Java Studio Creator fits in nicely. For many of our projects, we do not need anything more complex than a GUI around an existing J2EE server/middle tier or a database. For these needs, Java Studio Creator provides an easy and quick way to either connect to existing Java code (Java-to-Java communication is easy) or bind database data into a Web GUI.
For new projects requiring more flexibility we could still organize the project around a full J2EE server/middle tier and Java Studio Creator as the front end to quickly put together a good looking Web interface.
On to Java Studio CreatorThere are several aspects to Java Studio Creator that this review covers. These are:
- The IDE itself
- The technologies Java Studio Creator is based upon, particularly:
JSF (JavaServer Faces), the Web UI technology
JDBC Rowsets, an extension of straight JDBC (Java Database Connectivity)
The Application Server, and alternative App Servers
- Java Studio Creator from a VB6 perspective
The Java Studio Creator IDE
Installation on Windows or Linux is relatively straightforward. Linux users with a 2.6 kernel should make sure they obtain the latest version of Java Studio Creator due to an issue with the JVM and Kernel 2.6. Apart from this, the IDE can be installed without needing root privileges and is a familiar point and click installer (although not an RPM installation). Windows is likewise a familiar point and click installer.
Running Java Studio Creator
Java Studio Creator is built around the NetBeans IDE. The application looks good both on Windows and Linux. The layout of the IDE is unsurprising (let's face it, IDEs tend to have a pretty consistent look and feel, with a code editing window in the middle, panels for components and navigation to the sides, toolbars and menus above, and status messages below). Java Studio Creator delivers what you would expect in this regard. (See Figure 1.)
The editor has intellisense, templates, dynamic syntax checking and other features you would expect from a modern IDE. The palette includes JSF components and validators, as well as an area for custom components. There is a server navigator that lets you set up and explore databases and Web services, and drag and drop is available to bind data and Web services into pages within your application.
A nice feature of the IDE is the code-clips section in the upper right pane. Code-clips are really just glorified templates, but a little more user friendly and also easy to customize and add your own. For someone new to Java, code is provided in the code clips for common language constructs like conditionals, loops, casting and array handling. This could save time for folks new to Java and who don't want to keep delving into books. Higher-level functions are also included in the clips as well, like sending email, accessing session and application attributes in the servlet engine, database access and manipulation and so on. Adding a new clip is as simple as putting some code into the copy/paste buffer, then choosing a menu option to add it to the clips using a given name.
For a given underlying server or middle tier, you could create custom code clips to perform common operations to ease development in the same way that javadoc and intellisense help. The aim of the product is rapid application development, and code clips have proven to be a useful tool for obtaining that rapidity.
The most obvious aspect to the IDE; however, is the visual build environment. This has long been a weakness for Java tools, particularly when creating Web applications. The visual environment will feel very familiar to users of the Visual Studio products, or perhaps Microsoft's Web-matrix product for .NET development. Components can be dragged and dropped on to a page, sized and positioned in an absolute manner, and an event model is exposed for interacting with those components. For example, double-click on a button and you will be dropped through to an action event for that button, double-click on a dropdown menu, and you will be taken to a code event representing a value-changed event for that menu.
The data binding is also what you would come to expect from a modern visual environment. Drop a table component onto a page, then open your database server explorer, navigate to a database table, and drag it over the table component. The database table data will be bound to the table component on the page. You can then right click and customize the data displayed. At the same time when you bind the data, a rowset definition will be added to the page model and will show up at the bottom of the edit pane. Selecting this lets you refine the query, join tables, change query criteria and so forth in a way that will seem immediately familiar to anyone who has used VB or Access for database applications. (See Figure 2.)
This is, I feel, a key point to the Java Studio Creator product. Functionality has been added in a way that should be familiar to developers coming from Microsoft tools like VB and Access. For example, the query refinement view will be immediately recognizable and familiar.
There are too many other features to cover in any detail here, but suffice to say that the IDE is well featured and usable. While the editing environment is not as extensively featured as eclipse, it does provide all of the features you come to expect of a modern IDE. Add to that the visual page editor and query editing and you have a very productive tool.
JavaServer Faces (JSF)
Many of you will be familiar with JSF already, still more will likely be familiar with Struts as a way of building Web GUI applications.
In a nutshell, JSF has much in common with Struts (like XML based navigation configuration and a model 2 architecture for MVC) but has a greater emphasis on events and data binding. Having used both JSF and Struts now, I can honestly say that there are features of both that I prefer, and indeed there are strategies for actually combining the two technologies to complement one another. For the sake of this review though I will concentrate on what Java Studio Creator gives you for using JSF as an out-of-box experience. (See Figure 3.)
One thing that I think many people will like is the navigational editing for JSF. This allows pages to be represented by icons, and navigation links to be represented by named arrows between the icons. This provides a very easy to visualize relationship between pages and helps to create and validate flow throughout your Web application.
In practice JavaServer Faces is faster to construct Web GUIs with than Struts is, mainly because of the visual tools provided in Java Studio Creator, and also the data binding facilities. The Struts model is more flexible when you need to move further from direct data bindings, although Struts-like data modeling is still available when you need this flexibility, allowing you to create Java beans and bind them to components rather than going directly to database tables. By the time most developers hit this need, they will hopefully be familiar enough with the tool that such things will be of a manageable complexity and not overwhelming.
JSF also succeeds in mapping an event model onto essentially non-event based HTTP without introducing too much complexity or mess. When running, round-trips to the app server are generally fast enough not to disturb the flow of the user experience.
The focus with JSF in Java Studio Creator is simplicity and speed of development. The combination of JSF and the IDE support for it succeed well in this area.