![]() Corporate.Net Brewing Fresh Code: Java Dev elopment Environments We quickly fou nd ourselves to be highly productive in Visual Cafˇ. The visual forms-based paradigm will strike a very familiar chord with MS Visual Basic and Borland Delphi users. Unlike working with Microsoft Visual J++, responding to simple user interface events and injecting some user-interface logic in Visual Cafˇ requires minimal actual coding, and in some cases, no coding at all. Symantec also includes several components that build additional higher-level functionality beyond the basic Java abstract window toolkit (AWT) containers. Examples include SlideShow, DancingText, TreeView and ProgressBar. Several panel components, such as the ToolBar panel and TabPanel (for creating tool bars and tabbed dialogs, respectively), which are designed to hold other components, are also included. Users or third parties can create their own Visual Cafˇ components and add them into the library by writing the code (a Java class), supplying an icon and creating a special "description " file whose format is documented inside of Visual Cafˇ.
The two-way code/form synchronization mechanism worked fine in most of the typical scenarios, but we did notice a few significant shortcomings in the parser responsible for keeping things synchronized. First of all, for form editing to work, your source code needs to follow Visual Cafˇ coding conventions in certain critical areas (which are delimited in the source by special comment blocks). This is very easy to do if you started your project in Visual Cafˇ, but presents a hassle if you want form-based editing to work with pre-existing code developed outside of Visual Cafˇ. And though far less inconvenient than having an entire .java source file blown away after a visual edit, Visual Cafˇ did obliterate changes we made in the source code that resided in the various delimited sections. Furthermore, we were disappointed but not surprised to see that the code parse process for updating forms from the code is largely lexical in nature and not aware of any class inheritance. For instance, we added some button components to a frame window class and then subclassed it to create a new frame window. When we tried to visually edit this new frame, the buttons inherited from the parent class failed to appear on the edit form. Finally, whenever our source-code file contained the Java "package" statement to define a package scope other than the default, the two-way code/form synchronization bizarrely stopped working for us completely. But despite occasionally having to work around these bumps, the productivity gains far outstripped the setbacks. For event handling, at the top of every source edit window we could select a particular object target (such as a specific button) and an event (such as "Clicked"), and Visual Cafˇ would create a method we could customize. Even better, Visual Cafe 's Interaction Wizard can be wielded with great effect by Java beginners and experts alike . The Interaction Wizard graphically builds relationships between objects by querying the programmer with a series of plain-English questions, and then automatically generates code for the specified relationship. We found the Interaction Wizard the easiest RAD tool for adding event handlers, but unlike SunSoft Java WorkShop, Visual Cafˇ left us looking at the source code to delete event handlers or even review what event handlers Interaction Wizard had set up. However, the RAD-generated code is cleanly laid out and commented, making it easy to understand for all but the most novice of programmers. Overall, we liked the non-visual programming tools in Visual Cafˇ as well. We found the IDE easy to use. We also liked the debugger, which we found to be quite fast and feature-rich. Although we had no trouble setting traditional breakpoints in the code, at times we did not get what we expected when we set conditional break points. Also, we were unable to debug a standalone console-based Java application that read from the standard-input. A spiffy class browser/editor and even a hierarchy browser/editor are provided, though the entire Visual Cafˇ IDE consistently crashed on us whenever we tried to add a new class from within the class browser. The compiler was very speedy and came in a close second to Visual J++ in terms of speed. Also like Visual J++, the Symantec editor was fantastic. |
![]() |
![]() |
by Chris Lewis Hide & Seek With Gateways & Translators by Eric Hall Updated Februayr 7, 1997 |


Components are drag-and-dropped onto a form (such as an applet panel, a frame window or a dialog box). Once on the form, they can be positioned and resized. Each form can be assigned a layout manager based on pixel offsets (easy to use but not likely to look the same on a wide variety of run-time platforms), or from several of the traditional and highly platform-independent AWT layouts, such as BorderLayout and GridBagLayout. Each component and form has a corresponding property sheet, which contains item-specific attributes. Java source code is created on the fly as components are dropped onto forms and properties edited. Other products, such as Visual J++ and Java WorkShop, simply perform a one-way translation from the visual layout tool into Java and rewrite the .java source files whenever a change is made in the visual editors. Visual Cafˇ, however, strives to work
two-way translations so that edits to either the source code or the visual forms are r
eflected in both without completely rewriting the file; we moved a button on a form and watched the relevant source code line change in real time.













