Visual J++ 6.0: The Microsoft Java environment
So it comes as no surprise that Visual J++ 6.0, a key element in Microsoft's flagship developer tool suite -- Visual Studio 6.0, which is expected for general release at the end of this summer -- has quite a bit going on. The beta of the software, which Microsoft is calling Visual J++ 6.0 Technology Preview, has been available since mid-March, and recently I had an opportunity to take it out for a test run.
As anticipated this release represents a major upgrade from previous versions and as such signals, in no uncertain terms, the direction Microsoft is going with its implementation of Sun's Java technology: Namely, toward full and total Windows integration.
Going nativeAs Java continues its evolution from one of the most hyped technologies in computing history to one with a broad base of support within the software industry, people across the board have come to terms with its strengths and weaknesses.
The initially much-vaunted "Write Once Run Anywhere" mantra for Java proved to be not entirely correct, at least at this juncture, and Microsoft has taken this as a license to do what it will with the basic underlying technology; just about anyone who's been using Java over the past several years knows it is quite sound, if not superb. If Visual J++ in its 1.x incarnations represented Microsoft's initial tentative embrace of the Java idea, Visual J++ 6.0 is far more decisive.
Microsoft clearly sees Java as a first-class language, at least on par with Visual Basic or Visual C++ for the development of commercial-quality 32-bit Windows applications. They equally realize the power of Java in the context of the development of distributed client/server enterprise solutions. As such, Microsoft has provided high-level integration with its Windows Foundation Classes (its framework of class libraries, DLLs and APIs for manipulating the underlying operating system), the COM (Component Object Model, for reusable software) architecture, and DCOM (Distributed COM).
Microsoft ties everything together using a framework it calls J/Direct, a mechanism for allowing applications to completely circumvent Java's class libraries and middleware APIs in accessing the Win32 operating system. Because of the ability to leverage intrinsic operating system capabilities, Microsoft's DHTML object model and data access framework (i.e., ADO or ActiveX Data Objects) translate into clear benefits in terms of functionality, performance and productivity when developing Web apps in a Windows-only context.
Providing this level of integration does come at a price. Needless to say, Java the language/environment comes (at least if you believe Sun Microsystems) with its own reusable and distributed object framework (in the form of JavaBeans and Enterprise Java Beans, respectively), not to mention a data access protocol (i.e., Java Database Connectivity, JDBC). So what's the deal here?
Does this mean Java can somehow be both a platform-specific application development tool and one for building cross-platform applications and interfaces? I guess we'll all just have to wait and see. But in the meantime, let's take a closer look at what Visual J++ 6.0 delivers.
Visual-Basic-style RADWhether or not one has ever used a Microsoft development tool, you'll be able to get up to speed in no time with Visual J++ 6.0.
Its integrated development environment (IDE) is jam-packed with a rich set of features that will enable any developer of Web-based client or server applications for the Windows platform to work in a highly efficient and productive manner. When you start up Visual J++, you're greeted with an interface common to all the Visual Studio applications. The screen is split into three sections.
On the IDE layout's left screen is a tabbed panel allowing access to the toolbox of about two dozen WFC controls and to HTML objects (such as Form, Text Area, Submit Button, Horizontal Rule, etc.), as well as the ability to browse through the system's documentation using an information tree view. The central panel contains the Visual Form Designer, employing the now-ubiquitous metaphor of dragging and dropping components onto a design canvas.
Double-clicking a component creates a link to the code editor in a "two-way" fashion, so there's complete synchronization between the views. This is integrated with a Visual HTML Designer, providing additional WYSIWYG authoring functionality equivalent to that of Visual InterDev. On the right side, you have an integrated Project and Class Browser, allowing you to quickly navigate through and modify your code, as well as an Object Browser to facilitate the searching and inspection of the classes, packages and interfaces within your project.
There is also the usual wide array of menu options and dockable menu bars, such as we've come to expect from Microsoft's productivity applications, as well as extensive context-sensitive Help and various Wizards for functions ranging from database and query design to class and application construction.
Remote debugging functionality lets you step between client and server processes running on remote machines, and, because of the integration with Microsoft Transaction Server(MTS) and DCOM, the developer can debug middle-tier and business objects distributed across a network.
Other features include browser-based debugging, just-in-time debugging (which automatically invokes the debugger on application error) and multi-threaded debugging that lets you manually schedule thread execution, monitor states, view active/blocked threads and track what object a thread is blocked on. The Immediate Window is another neat feature. I've seen it in other environments, notably SuperCede's IDE. It's basically a scratch pad that allows you to type in and evaluate simple Java expressions and see the results instantly -- a neat trick.
Powerful deployment capabilityDeployment is quite simple with Visual J++ 6.0. Client-side content can be deployed as HTML, ActiveX controls, WFC classes and Java applets. On the server side, you can deploy ASP pages Java class files and COM components. A Deployment Explorer provides a simple dialog where you can browse through available target URLs.
Applications can be packaged, signed and deployed as Windows EXEs, DLLs, CAB or ZIP archive files. I should note that the ability to create ActiveX or COM objects wasn't yet implemented in the Technology Preview I examined, but it is expected in the final release. As is, Technology Preview 1 allowed me to import a huge number of COM components, ranging from a ClassBuilder control to facilitate visual class creation, a Microsoft Wallet control to Sheridan 3D Controls, RealAudio library components and many others.
Basically, Visual J++ 6.0 now makes it easy to use the entire arsenal of VB OCX-style controls that has been so crucial to Visual Basic's success. At present, these can simply be used as is, and, with the final release, the developer will fully have the ability to create there own controls in Java.
IntelliSenseAs I've tried to make apparent, Visual J++ 6.0 has many powerful features for creating and deploying powerful, modern Windows-based applications using Java.
Though I've touched upon most of it, there's still a bit I haven't covered. One of Visual J++ 6.0's most innovative features employs what Microsoft calls IntelliSense. With this technology, it's somewhat more difficult for developers to write incorrect code, at least in the syntactic sense.
While writing the code, IntelliSense provides on-the-fly programming assistance by checking the code for syntax errors as it's being typed in. Whenever something apparently incorrect is typed, one of those Microsoft Word-like squiggly lines appears, and the statement is placed in a Task List, a kind of to-do list. When the mouse pointer is placed over the statement in the Task List, a list of method calls associated with the class in question along with parameters is provided. Moreover, the Task List can be used to annotate code so developers can better keep track of problem areas.
The delegation issueKey among the areas of contention between Microsoft and Sun is the former's decision to slightly alter the language by the introduction of delegate and multicast keywords. These two keywords apply in the context of bound method references implementing Microsoft's delegation event model, which they see as inherently superior to the adapter object-based system employing anonymous inner classes that underlie the event model governing the AWT (as implemented with Swing) and JavaBeans component framework in JDK 1.1 and beyond.
Microsoft argues that delegates make event-handling code easier to read and write by simplifying the process of routing events to their appropriate handlers.
Underpinning Visual J++ 6.0 is Microsoft's virtual machine technology, which is optimized to work with their delegation model. Though Sun concedes that the object method pointer approach used by Microsoft does in some instances result in more elegant code, it believes Microsoft's move compromises the Java developer community in general by further encouraging the balkanization of Java.
Moreover, they see no way to easily implement the model in an unaltered virtual machine. For details on the two sides of this debate, see "About Microsoft's 'Delegates'" for Sun's perspective and "Delegates in Visual J++ 6.0" for Microsoft's take.
As you will see, the two sides are pretty far apart on the issue. Not surprisingly, the matter is one currently in litigation between the two companies.
ConclusionAs just about everyone and their aunt knows these days, Microsoft is having some legal trouble. Despite the Justice Department and some 20 states' recently filed antitrust suits against it, Microsoft has continued undaunted in its bundle-or-bust strategy.
Visual J++ 6.0, as a crucial pillar of Visual Studio 6.0, represents as much as Windows 98 Microsoft's complete commitment to fully integrating as much of its technology as possible in order to leverage its considerable advantages in the software industry.
There are clear benefits to this if you are a developer working exclusively in the Windows environment (which, of course, a good many of us are), for whom Visual J++ 6.0 is without doubt a first-class tool for developing state-of-the-art applications both within the Web context and on the desktop.
The problem, of course, is that Java was designed a priori as a tool for the development of cross-platform applications and therefore is meant to work just as effectively under Windows as with the other software operating systems and hardware architectures in existence.
On the one hand, it is easy to understand why Microsoft is pursuing its approach, not just because Bill Gates is Bill Gates, but simply because it makes sense from a purely business point of view. Sun on other hand has its legitimate interests at stake; and clearly, preserving the unity and cohesiveness of the Java language and associated virtual machine technologies is crucial to its success.
If we are to believe Microsoft, it is possible to have it both ways: That is, to be able to develop both Windows-centric applications and, at the same time, adhere to Sun's (and the majority of the industry's) open approach to Java. (Microsoft argues that it's a simple matter to switch from one to the other -- a contention which I don't believe is born out in Visual J++ 6.0).
As I said earlier, we'll all just have to wait and see how the whole thing sorts itself out. But for now it's clear there are plenty of excellent tools out there to aid developers in creating whatever type of application they wish using this powerful technology that is Java. And Visual J++ 6.0 is definitely one of them.