Working with Sun Java Studio Creator, Page 2
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.
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.
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.
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.
- 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.