Black Dirt Software Black Dirt Software
Convert 1.0 Logo
Convert 1.1 Purchase Press About Us
Introduction

Several issues are apparent when converting Visual Basic to Java. We think that extensibility is important. Visual Basic can be extended by VBX's. How can a converter handle that?

How much conversion is a good thing? Look at our 80/20 rule of conversion .

We think VB programmers have what it takes, but many have been intimidated by Java. Don't be. Read about VB Programmers and Java

What magic does the future hold for Java and for programming.

A technical discussion of our API overview

Extensibility

As friendly as Visual Basic is as a development environment, one of its key strengths is that it can be extended. There are over 400 Visual Basic Controls. It is unlikely that any one application will use all of these controls, but it is likely that one of these VBX's may be used extensively within a company's Visual Basic Applications. Someone gets a great 3rd party VBX and puts it in an application. It is seen, gets popular, and the use of this particular widget becomes widespread.

A converter that does not provide a mechanism for converting this widget will be of little use to the company. Black Dirt addresses this with the API of our Java version. With the Convert 1.1 release, a converter, which is written in Java is included. The API and Java source code for the "conversion classes" that drive the product are included. As additional conversion classes are created, they will be added to the Black Dirt Web Site.

There are several possibilities for these Java Classes. If a company has standardized on a a particular set of Java Widgets; say from KL Group or JScape or RogueWave whomever, the conversion classes can convert to that particular set of classes. If a unique Java class is required, the developer, a third party, or Black Dirt Software could provide the missing connection.

The 80/20 rule

The 80/20 was supplied by one of our customers. We ask the question "Starting Point or whole Enchilada?". The issue is whether to convert, redesign, or get a jump start. The worry is that working on the last unconverted 20% may cost more time than doing the project from scratch. Our current product provides accurate GUI and an event skeleton. We believe this is the good start and will be embraced by many developers. Our goal is to provide a sound migration path. We are committed to the idea that Visual Basic Programmers can make a quick leap to becoming Java application programmers.

Visual Basic Programmers and Java

We consider Visual Basic application programmers to be true software professionals. Application programmers spend a lot of their time interacting with clients, interpreting specs, suggesting options and alternatives. Happy users are a full time job. These people possess the people skill to satisfy their users and the technical skill to get the job done. Writing VB code takes a professional programmer.

We take the position that it is not a big jump for VB programmers to master Java and that we can help them along the way. If we can convert their entire GUI and provide the infrastructure of the program, they will be able to fill in the gaps. VB programmers are not babies, they can do it.

Java is easy for application programmers. As application programmers, we don't want to worry about polymorphism and derivation and object orientation. We want to put Tabbed Dialogs, Buttons, and TextBoxes on the screen and then get to work putting the business logic behind those screens.

Magic & the Future

The magic comes from the possibilities. Convert your VB to Java - however you want to do it - and then think about what you can do. Suppose you had a program that estimates construction costs for a building project. Convert it from VB to Java. If you use it in the same way you did before there is no advantage, but there are now some potential payoffs. You can put the program on the web and your customers can get an idea for themselves what their costs will be. Salespeople can access the application from the field. With the next generation of lightweight Java, you can install the program on a cheap PDA and your salesperson can give the client an estimate from that.

Here is the problem with Windows 95: Rather than working from a theory or philosophy of system design, Microsoft created Windows over time to respond to different competitive threats. So each succeeding version of the software has focused on solving a different set of problems.

Fortune November 11, 1996

As Oak, or rather Java, went through its many revisions, some principles didn't change. It was to be a thoroughly modern programming language, embodying all the major advances in computer theory of the past quarter-century.

TIME Magazine January 22, 1996

The advantage that Java has, right now, is that it wipes the slate clean in terms of software development and gives us the opportunity to move into the future with a well thought out platform. Installed base is not a good measure of the future when paradigm shifts occur. CP/M had nearly 100% of the PC operating system market in 1978.

The future holds appliances that have embedded intelligence. Smart Cards, PDA's, cellular phones, and set top boxes will become common in the next several years.

There will be a consensus operating system and language for the future. This leads to magnificent "intangibles." The cost of educating and training programmers will be reduced. Programmers will be more interchangable. You'll pay to find a good programmer. You will not pay a premium for a programmer with knowledge of an obscure language . Programmers will have areas of expertise in subject matter rather than in a particular language.

Visual Programming will make programming more accessible to more people. The people who learned HTML in 1996 and created web pages, will become proficient in simple programming using Visual languages.

Bill Gates will soon move into his home of the future. This is a grand and stunning vision. I'm sure Bill Gates wants to make this technology common place and that he wants it to be based on Windows. The alternative is Java, JavaChips, and the JavaOS.

It is easier to start from scratch than to retrofit. Canon made copiers half as expensive as Xerox copiers. They did not start with a Xerox copier and try to strip it down.

Black Dirt Software is committed to a Java based future.

Java Version API Overview

Convert 1.1 is written in Java. This version is extensible. To allow conversion of a new VB control, a user or 3rd party vendor will provide a corresponding Java Class and a corresponding conversion class.

The converter interprets the Visual Basic Form and stores all of the information about the Controls. As the form is being converted, the tool reads the TYPE of control. These are things like CommandButton, Label, etc. The tool looks for a conversion class with a corresponding name. For CommandButton, the tool looks for bdcCommandButton. bdc stands for Black Dirt Convert. The conversion class describes the necessary transformation of the Visual Basic information into Java source code. In this manner, new controls can be converted without changing the tool. A class to convert SSTab (tabbed Dialogs), can be added by creating a conversion class called bdcSSTab.

Conversion classes all begin with the letters "bdc". Then the name of the VB control is appended. So I have bdcCommandButton, bdcListBox and so on. bdcCheckBox.java is a simple example. bdcTextBox.java will create a TextField or TextArea depending on the VB setting of the multiline flag. bdcTextBox will also create a password field depending on the settings.

These classes are easy to create and customize. In these classes, you build the strings that will appear in the generated code.

If you are using a particular set of 3rd party java classes, it is easy to modify this product to generate code that corresponds to those classes. As we move forward, more conversion classes will be made available on the Black Dirt Web Site. The plan is that there will be no charge for most of these classes.

There are four important methods in each of these classes.

initialize

initializes the control, some customization can be done here if needed. See bdcLabel.

declareString returns

Button Command3 = new Button("Command3");

addString returns

add(Command3);
Command3.reshape(8, 24, 177, 33);

controlArrayInitString produces

Command1[7] = new Button("Command1");

ControlArrayInitString is used in cases of control arrays on the Visual Basic side.

View source code for conversion classes.

Remember bdc + VB Type for the class name, so bdcCommandButton will convert a Command Button, More details and a step by step discussion of a single conversion class will be added to the site.

A goal of this page is to be simple, elegant, and fast. Let us know what you think. Mailto: webmaster@blackdirt.com
Copyright 1996-1997 Black Dirt Software. All rights reserved.