Introduction
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 Creator
There 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
Web Services - Java Studio Creator from a VB6 perspective
The Java Studio Creator IDE
Installation
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.
JDBC Rowsets
JDBC is the underlying technology for most of the higher-level J2EE database connectivity solutions, and is itself a relatively simple and well-scoped standard. JDBC rowsets is an extension of JDBC that adds functionality to the underlying JDBC to allow handling and editing of tabular data through any JDBC compliant implementation as long as it conforms to the basic JDBC 2.0 specification. The extensions are designed to allow scrolling through results sets so that not all results need to be returned in one big transfer from the database, updating of the data in a particular row, and other easy row manipulation on row-sets (creation, removal, etc.).
In my role as system architect for my company, I have dealt with many different types of database persistence and object/relational mappers, including ODMG, BMP and CMP, and more recently JDO. I am also one of the apparently small crowd that sees value in Entity EJBs. That said, I also believe in using the right tool for the job.
For large systems, JDO, EJBs and other full O/R mapper solutions form an important part of the overall architecture. Frameworks built around these standards offer all sorts of extras for free like middle-tier caching. However sometimes you just want to get in an access data in tables. This latter scenario is what JDBC rowsets excel at. The upside of this is the speed with which you can put together some kind of Web front end for editing data in database tables; the downside is that, by default, you lose some ability to abstract the representation from the underlying data model.
For those developers who are used to the simple data access model used in creating many VB/Access apps, the concepts in Java Studio Creator will be immediately familiar. This type of keep-it-simple implementation has its uses, albeit not in large-scale systems.
For larger systems, many developers may choose to skip access to databases using JDBC rowsets, and instead create a full O/R mapper based, middle-tier presence for data access. In this case, Java Studio Creator still has its uses for rapid creation of a JSF GUI for this data access layer. Indeed, for many of our existing projects, this is almost certainly going to be the approach we adopt. Such data access layers could be developed using Java Studio Creator in as much as any IDE could be used, but the likelihood is that other more general purpose J2EE IDEs will prove more productive. Under these circumstances, Java Studio Creator would simply fill in as a replacement to VB6 for UI creation, and other tools such as Eclipse, JDeveloper or Sun’s own Java Studio Enterprise toolset would be continue to be used, as they are now, for server and middle-tier J2EE code creation.
More information on JDBC rowsets is available in the references at the end of this review. For now I will leave it that the JDBC rowsets provide a useful addition to regular JDBC for quick and easy data access. Combined with support in the Java Studio Creator IDE, the speed with which JSF applications using JDBC rowsets can be constructed is staggering, while more flexible data access is still possible by using full-blown J2EE tools and standards alongside Java Studio Creator.
Application Server
Java Studio Creator ships with Sun’s own App Server 8. This is the default app server and used for embedded running and debugging also. Naturally support and integration for Sun’s own server is decent. It is still possible to deploy to any J2EE compliant application server of your choosing though, and the mechanism for doing so is simple enough. You export the application as a WAR file and then simply use the application server of your choice to deploy that WAR file. This technique worked fine when I tested it using Tomcat. For other app servers I cannot comment since I have not tried them, but I would not anticipate any problems.
As far as Sun’s App Server 8 goes, well, it’s an App Server. It has performed flawlessly during my use of Java Studio Creator. Deployment of a re-built application is reasonably fast and in-line with what I have come to expect from similar tools. Single step debugging works with no problems.
Web Services
This is the one area where I do not have a great deal of detail yet. While I appreciate the aims of SOA and the approach Web services take to create loosely coupled application communication, I have yet to use Web services on any of the applications I have worked on. For most of my needs, XML is simply too slow and bulky for the kind of communication our applications need, and we tend to fall back on RMI, CORBA or even JMS to provide the performance we desire. Loose coupling is not really a priority for us at present.
That said, I have run through several tests of Java Studio Creator using Web services provided by Google and various weather sites. The process is straightforward and obvious, from accessing the WSDL through to testing the Web service and finally hooking it up to the application. I ran into no problems and was able to retrieve and display weather information and book details based on ISBN numbers.
Coming from VB6
As with many companies, we have a reasonably large number of developers who know and use VB6 for UI creation. The problem is that VB6 is being replaced by VB.NET, which requires a lot of work on our part to update our software. Since we are investing in changing technologies anyway, after looking around, Java Studio Creator appears to be an alternative tool that meets all of our requirements and offers a few bonuses that .NET cannot (at present) match as well.
Having put Java Studio Creator in front of several of our VB developers, the response has been very good so far. The drag and drop data binding, double-click to edit events for components, access-like query management and many other aspects of Java Studio Creator are familiar and welcome to our VB developers, while from a system architect’s perspective, the fact that the UI will be communicating with our servers using Java standards rather than more troublesome VB-to-Java communication solutions is very attractive.
The level of abstraction and simplicity of Java Studio Creator appears to be nearly identical to VB and the .NET offerings, removing one of the last serious concerns about using a full Java toolset for our applications. While there will no doubt be some glitches and the occasional bit of ugliness needed to get an app working, it is worth remembering that VB6 also had these problems, as do all tools that I have seen.
Conclusion
As mentioned earlier in the article, our interest as a company in Java Studio Creator is prompted primarily by the replacement of VB6 with .NET and the prospect of selecting a new technology with new toolsets and skills no matter what way we choose to go. .NET in my mind is largely a recommendation of the Java model and approach, since the .NET approach seems to borrow from Java in many areas (VM, C# language, library platform, etc.). Given that Java technology still has a lead of several years and that in comparing the technologies we have found better library support and better support from both commercial and open-source frameworks for Java, the choice has not been as hard to make as you might think.
On top of this, our customers are starting to request both Web-based UIs (which .NET can of course provide as well) and Unix (mainly Linux) deployments (which really, .NET cannot at present provide). I know that Mono is out there and what the aims of it are, and I applaud the effort, but having recently installed Mono and the development tools on my laptop, I can honestly say that it is not a realistic option for rapidly creating a commercial grade application at present. The name of the game here is productivity and simplicity, and Java coupled with Java Studio Creator offers, in my opinion, the best option for meeting these needs in a cross-platform environment at present. Java runs well on Windows, Unix and others, while .NET really still limits you to Windows at present.
References:
- The Sun Java Studio Creator homepage: http://wwws.sun.com/software/products/jscreator/
- The JDBC Tutorial on JDBC Rowsets: http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html
- JavaServer Faces homepage: http://java.sun.com/j2ee/javaserverfaces/index.jsp
About the Author
Dick Wall is Lead Systems Engineer at NewEnergy Associates, an energy IT and consulting solutions firm. NewEnergy Associates (www.newenergyassoc.com) is a wholly owned subsidiary of Siemens Westinghouse Power Corporation and a division of Siemens Power Generation. Dick works within the System Architecture team, with primary responsibilities for Server and Middle Tier architecture. In his role as a system architect, he evaluated Java Studio Creator as a possible replacement for Visual Basic 6. He has been with New Energy for five years, focusing on Java running on Linux and Unix.