DBMS

Applet Designer

By Michael Carnell
DBMS, June 1997 Applet Designer is a Visual Basic add-in that converts new or existing VB applications into Java applets.

All the world seems to be moving toward Java development, but a great deal of time and money have been invested in getting up to speed on tools such as Visual Basic. Although transitions such as these are not a new problem, it still hurts each time the toolset changes. Always accompanying all of that pain is someone coming along to try to make the transition easier. In some cases those transition aids work; in other cases they fall far short of the mark and die a well-deserved death. Even those that come near their mark are in some ways doomed; once the transition is completed, who needs them? TV Objects' Applet Designer Professional and Applet Designer Enterprise edition go beyond mere transition or translation and are, in fact, aimed at the long-term tool market.

For this review, I worked with a beta copy of Applet Designer Enterprise Edition, which should be in full release by the time you read this. The main differences between the Enterprise Edition and the Professional Edition are the Enterprise Edition's ability to convert an entire Visual Basic project into an application instead of single forms, and to convert Visual Basic class modules into Java RMI servers; additional control support; and expanded support of methods, properties, control arrays, and color functions. Promised for the production versions are even greater control support, server-side file I/O and printing, Visual Basic math functions, support for MDI forms, and support for RDO.

Setup/Install

The setup was very direct and simply involved the familiar steps of inserting the CD, typing D:\SETUP, and answering a few location questions. Accepting all of the defaults worked fine, and I was finished with the setup in no time. Like many Visual Basic add-ins, Applet Designer is not a tool to be run by itself, so you really won't see much until you load Visual Basic. When loading Visual Basic after the installation of Applet Designer, you will see a small floating toolbar with five buttons. These buttons are to compile an applet, execute the applet, create a data interface, set options, or get help. Each of these buttons has floating help when the toolbar is selected and has focus, and it is easy enough to close down the toolbar if you are working on Visual Basic applications that you do not intend to translate to Java.

By default, the installation of Applet Designer is very neat. All of the files and folders associated with the product were placed in a single "Applet Designer" folder within the "Program Files" directory of my machine. In that folder are the program files, sample files, JDBC files, the standalone Java Applet Viewer, and the full 1.1 release of the Java Developer's Kit. If you do not want to use the JDK compiler, Applet Designer lets you choose one of your own, such as Visual J++ from Microsoft.

Workings

Applet Designer comes with a number of sample projects that let you get into operation very quickly, but I decided to try my hand at creating an applet of my own first. I didn't want to do anything complicated, just a simple "Hello World" type of thing. To my amazement, the applet I created compiled and ran the first time. The problems crept in when I became confident and added a couple of fields and buttons to accept text and comment on that input. When I did that, the app would not compile, and I didn't get an error log or message to tell me why. Only by looking at my code with a Java eye could I spot the problem. (See Figure 1.) As a Visual Basic programmer, I am used to a fairly loosely typed language, but Java is strongly typed. That means that a lot of the little tricks that Visual Basic programmers do to compare strings and such do not translate to Java. Although this is certainly not the fault of Applet Designer, it does severely limit the possibility of a clean translation of a mature Visual Basic application to a Java Applet. Additionally, many Visual Basic developers have gotten so used to the Visual Basic way of thinking that it can be very difficult to spot the problems when working with applet designer without having a thorough knowledge of Java.

After trying out my own small applets, I loaded some of the included sample applications. In truth, I should have done this first. By looking at how the sample applets, such as a calculator and address book, were laid out and coded, I was able to gain some of the same insight into variable usage and typing that I gained the hard way by doing it on my own. This is where a large manual with more specific exercises and tutorials would come in handy. Although the manual accompanying the Applet Designer is sufficient, it doesn't go as far as a new user will desire.

Finally I turned my attention to one of the larger, multicontrol, client/server applications that I had developed. Suffice it to say that the translation of an application of this size cannot be done without significant rewrite. Applet Designer supports translation to Java of many of the controls and constructs that are native to Visual Basic, such as command buttons, radio buttons, and text boxes. For these controls, most normally used properties, such as text and color, are supported; errors will be generated for use of any unsupported properties. Other Visual Basic tools are supported with some caveats. For example, CASE statements may only be based upon integer values. This can be more than a minor hindrance if you are used to using string values for the comparison. Only things expressly forbidden in Java, such as variant variable types, will completely stop the show. Additionally, you will have to forgo all of those fancy third-party components that you have been using. This might not stop you if you are developing with only the components that shipped with Visual Basic strait from Microsoft, but most programmers have added third-party tools from companies such as Sheridan Software Systems Inc. or VideoSoft that have no equivalent in Java. If you have one of these in your project, you will have to take it out and completely redesign that functionality in some Java-friendly way. Equivalent Java components or Beans are coming, but they are not here yet.

The database component of Applet Designer Enterprise Edition is quite impressive. With a simple form to complete with the connectivity options, this is one of the easiest ways I have seen to build a database-enabled applet. Unfortunately, ODBC calls are not translated directly to their JDBC equivalents, but anyone familiar with the ODBC connectivity of Visual Basic will feel right at home with this JDBC environment. (See Figure 2.) For those programmers not familiar with ODBC, there should be only a slight learning curve.

Software or Training?

My main concerns when looking at this product came down to how well it performed the conversions of Visual Basic designs and whether it would be a long-term addition to the development toolbox. On the point of conversions, Applet Designer performed quite well for small applications, but any major application will contain points of major rewrite. Third-party tools, calls to unsupported properties, and peculiar constructs that experienced Visual Basic programmers use for ease and speed will all need to be rewritten. Although inconsistencies between Visual Basic and Java cannot be resolved entirely, Applet Designer does far better than I had expected. The only thing that would have made the inconsistencies easier to deal with would have been clearer error messages and perhaps some recommended workaround. All in all, I would say that I was satisfied and even perhaps a bit surprised by the ability of the product.

The tougher question to answer is the product's longevity. It is an extremely useful tool for a beginning Java programmer with a background in Visual Basic, but it would have little value for programmers without a Visual Basic background. And, as the novice Java programmer's knowledge level increases, the desire to do more of the work directly in that language increases as well. This will become increasingly true as products such as Microsoft Corp.'s Visual J++, Borland International Inc.'s JBuilder, and SunSoft's Java Workshop become as easy to work with for designing applications as Visual Basic and Delphi. Priced at nearly $500 for the Professional edition and approximately $1,000 for the Enterprise edition, I have to ask if I shouldn't just put that money towards a Java training class or one of those other Java visual design tools.


Figure 1


This figure shows the Applet Designer compilation results window. Although short on descriptive error messages, the compilation window does give a blow-by-blow account of the work in progress.

Figure 2


This figure shows the Applet Designer Data Access Wizard. Anyone familiar with ODBC should feel right at home with the settings required for Applet Designer's database interface.


Michael Carnell is a systems engineer responsible for client/server and Intranet development at the Roper CareAlliance in Charleston, South Carolina. You can reach him by email at carnellm@worldnet.att.net, or visit his home page at www.palmettobug.com/carnellm.
Subscribe to DBMS and Internet Systems -- It's free for qualified readers in the United States
June 1997 Table of Contents | Other Contents | Article Index | Search | Site Index | Home

DBMS and Internet Systems (http://www.dbmsmag.com)
Copyright © 1997 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to dbms@mfi.com
Updated Friday, May 16, 1997.