Image of Navigational Map linked to Home / Contents / Search First Past the Puns
- Java Development Environments

by Ross Mack - GUI Online Productions
Image of Line Break

What makes a good Java environment, and where can I get one at this hour ?

Shortly after Java became widely available (well, available for download from Sun's overloaded FTP servers) a lot of enthusiasm ensued about the language itself. I remember observing a sort of mania sweep across the development community. There were a lot of beliefs that it would solve many of the ills of the modern development world, all before lunch. Books about the language flourished to the same degree as HTML and other Web references. Some people started use the HotJava web browser and other Browser makers quickly added Java support in their products waiting for the big wave of Java enabled Web sites. All in all there was a large, Sun-lead enthusiasm band wagon for this new language and everyone was willing to get behind it in theory, and a few in practice.

The one item that stunted Java's wide spread adoption in this early period was the complete drought of sophisticated development environments for Java programming. The development community had become used to environments like Delphi, Visual Basic, or at least Visual C++. That is, those who aren't still working on CICS/COBOL. After working with Visual Basic a text editor (even TextPad) and a command line compiler can only look so attractive. Let's not even mention debugging.

Well, the drought is finally over. The first wave (am I mixing my metaphors ?) of Java development environments has shipped, and so has the first wave of patch releases, updates and bug fixes. Let's have a quick look at what's around.

The Contenders

Symantec

First to actually release their Java development environment, Cafe, Symantec actually captured a fair amount of market share. Cafe Lite came bundled with every second Java reference book on the shelves for a while there (not an insignificant number). Strangely enough the tool is actually pretty good and has continued to improve with a few patch release. We are now at version 1.51.

Microsoft

As always the folk at Microsoft offered big things with their tool. Initially developed under the codename Jakarta, they at least had the dignity to avoid coffee puns and went straight into geographic puns. Finally released as Visual J++ (the 'Visual' is no surprise) this tool is gaining acceptance and comes with the patented Microsoft clout, being the only version that ships support for RDO, ODBC, DAO, and COM. Their acronym support is excellent.

Soft As It Gets

Local Melbourne software publisher Soft As It Gets might just be in position to upset the big boys with the excellent support for Java that shipped very early on in their ED for Windows Programmer's editor. ED is an editor built for working with some 30 different programming languages and to allow the programmer a flexible, consistent and extensible environment. It was extended neatly to provide good support for Java, which it does well.

Borland

Borland are still promising their Java tool, currently named Latte. We are told it will be great and that it will be consistent with their Delphi/C++ Builder environments which is good news. But it just hasn't shipped yet. So, I will discuss it no further.

Features, Features, Features

The winner in software is (or, at least, it should be) the product with the greatest number and quality of features delivered. So, how do these tools stack up ? Well, in a lot of ways they all offer similar features, but handle them differently. Let's start at the start, editing the code.

Editing

'There are only two things certain in this life: Change and the need for an undo function.'

All three tools include pretty good editors, all have syntax highlighting, and help to automatically indent and format code. Just as you would expect from any visual editor of recent years.

ED stands out in this area as having the most guts in the editor itself. This is largely due to the fact that it is essentially an editor product designed to handle every and all situations. Its Java configuration works very well and does everything you'd expect. One pet peeve of mine is how editors deal with indents, tabs, and spaces - the whole code formatting mess. In my opinion ED deals with these best with the other two a little ways behind. The one real drawback to ED is that there is just so much to configure and the configuration dialogs and interface have obviously been designed by someone who uses C a lot. You can do whatever you want, but it just might not be obvious how.

Debugging

"If debugging is the act of removing bugs, then Programming must be the act of adding bugs."
- C Hoare, badly misquoted.

Debugging and executing your code is another matter, and this is where Cafe and J++ move ahead with tight integration of Visual Debugging tools. In this respect both tools are very similar but have quite a different look. Both allow you to browse data, evaluate expressions on the fly, set breakpoints and step through code - all the usual things. The difference is that Visual J++ just seems to allow you to jump in and out of debug mode a little more easily. In Cafe the debugger is very nice but it always seems to require one or two more steps.

Users of other Microsoft development tools will also be pleased to know that the keystrokes for controlling the debugger are quite consistent with their other tools. This is largely because Visual J++ is shipped in the new Microsoft Developer Environment used for Visual C++, FORTRAN Powerstation, MSDN, and Visual Test. All these tools can be happily hosted all within the one environment as well as each tool's extensive online documentation.

For ED, debugging is a problem. It includes no Visual debugger, though it will capture output from the Java compiler, AppletViewer and the Java Interpreter - which it echoes to you nicely. However, it does integrate tightly with the Lahey 32bit debugger which is available separately. I have not seen this in action but the documentation supporting this feature suggests it would certainly do the trick providing most if not all of the features of the debuggers in the other two products. One other problem with ED is that the current release will not launch these external apps under NT4 at this time. I have been told by Soft As It Gets that the new release (now available, but which I didn't have at the time of writing) fixes this problem. However, it does work fine under Win95, Win16 and previous versions of NT.

Another item of note is that Cafe and Visual J++ ship with both the Sun Java tools (compiler, interpreter, AppletViewer and so on) as well as their own proprietary versions. ED does not ship with any Java tools and requires that you obtain these from elsewhere (downloading them from Sun being the obvious choice), and it will the require that you let it know where they are before they will work (unless you install into the default directory).

Code Browsing

Getting from A to A++

As you would expect of development tools for an Object Oriented Language like Java there is a heavy emphasis on Class Browsing as the way to do two things:

Indeed I have said in the past, and this seems like the perfect place to say it again, 'All I want to work with Java is a syntax highlighting editor and a good class browser.'. Of course, I forgot to mention debugging but we'll just gloss over that for now.

Class browsing is essential in Java development. It's also difficult to get right. I actually believe that ED for Windows includes the best Java class browser of the three products (seems sort of odd, doesn't it ?). It is very visual and gives you a very good feel as to where everything fits in. One of the very cool things about it is that includes everything up to the Object class but only shows you the things that are relevant. It doesn't, for instance, show you all the Container, Panel, AppletStub and other similar classes when all you really want to see is Object/.../Applet/MyApplet. You can double click on it and it will happily bring up the relevant code ready to go. In many ways Visual J++'s Class Browser does most of these things, except the simplicity of the view. For example, J++ tends to show you all the member variables as well, whether or not they are public. I just don't find that useful enough to justify the screen space it chews up.

Symantec's offering, on the other hand is just not as friendly to the way I work. I'm not really sure what it is - it has all the right functionality. But I think the problem is that it is done in three views in one window. One view shows you your classes (relative to packages, not to inheritance), the next shows you member variables and methods which you can expand and collapse, and the third pane shows you the code. The problem lies in the fact that you have to double click on each thing to update the next pane along. Then you start working with that code, you click on something else and when you look back at it after you get distracted by a phone call you can't see how what you have selected relates to the code that is displayed. I guess this is the advantage of popping up a separate code window - it breaks the mental link between editing and browsing.

Also, to view the chain of inheritance in Cafe you need another window again which shows you a highly graphical hierarchy of the classes in your project only. Access to methods, data members and the code behind them is via popup windows in this view. Perhaps the problem I have with Cafe is that there are just too many windows ! Don't get me wrong, once you have done a significant amount of work in Cafe you can get to just the bit of code you want pretty quickly - I just wonder if that is in spite of the environment.

Other Factors

Of course there are likely to be a number of other factors that effect your choice of development tool (and that should never be done purely on the basis of the opinion of some guy who decided to write an article). I will try to cover most of those here - these are things which will apply to one of these products and not to others so there is not necessarily any way to compare them.

I mentioned at the start of this article that Visual J++ ships with support for COM (Component Object Model, Microsoft's way to get objects to talk to one another). This is done through some additional libraries and a tool to build Java interfaces to standard COM objects. This is a very cool feature but at this point it is something of a hack to get it working (sorry, Bill) and can only be delivered to a browser as a signed CAB file because of security restrictions. However, if you want to build conventional applications in Java (not those Web Applet thingys) then this will allow you to use the Java libraries supplied to interface with ODBC, DAO (version 3.0 only at this point), and RDO (version 1.0 only at this point) for pretty cool database access including all the sorts of objects and methods that a Visual Basic programmer who has been using these technologies would expect. Of course J++ ships with examples of Applets that do these things as well as the stock set of samples from Sun.

Obviously ED is a great choice if you want to work in a number of languages and you want to work in the one environment. Web oriented individuals (which tends to include Java programmers) will be pleased to know that the current version of ED also supports Perl and HTML. Of course, by nature ED does not get in the way of the language, it immerses you in it. There is no visual design tool, you will just have to write the code yourself. At least this forces you to learn how to do that correctly and you can experiment with it as you like.

Symantec Cafe provides a visual tool for laying out controls on Applets (or applications) which generates reasonably stock code. Unfortunately it does so with an intermediate step of a resource file, which doesn't get updated when you alter the actual Java code. Then when you go back to modify it in the visual tool, everything is out of sync with how the code actually is now.

Visual J++ uses what is essentially the C++ resource studio and generates Dialog and DialogLayout classes that you can then call from your Applet (or application) to place the controls on them. This is great as it writes a lot of code for you, but you end up with reams of bizarre code that you will probably not understand until you build it yourself anyway.

Both Symantec Cafe and Visual J++ include wizards for building your first Applets. These are great because after about 30 seconds you have a thing that you 'wrote' which runs. ED has no such beast, but what it does have (a feature which I greatly favour over the Wizard approach) is an extensible library of code templates which insert themselves when you start to type them. What I also like is that this can be turned off. This means that you can quickly insert all sorts of useful bits of code (including whole applications and whole applets) very quickly and learn how it works because you are still involved in the writing process. This is also extensible, so you can change or add to the code 'skeletons' that are already there.

ArticleFinalize()

So, that's the current state of play in the Java development world (in my not-so-humble opinion). Have a look at each tool before you decide on a Java development tool and keep a look out for new tools from other vendors (Borland, are you still out there ?). But hopefully this has at least given you some introduction into some traps and a few things to look out for. I think choosing a development tool is vital, because let's face it you are going to have to work with it hour after hour after hour ... well, you get the drift.



Written by: Ross Mack
March '97


Image of Line Break
[HOME] [TABLE OF CONTENTS] [SEARCH]