Don’t Convert Your App to Xojo

New Xojo developers are often sorely disappointed with Xojo when first coming to the language.  Why?  The complaints are varied but they usually say things like “<insert part here> doesn’t work right.  In <insert old dev environment> it worked this way.”  I’ve heard this complaint so often that I ignore it.  Don’t convert your app to Xojo, rewrite it in Xojo.

Xojo attracts a lot of VB6 developers.  The IDE’s look a lot alike and the languages at first glance are pretty similar.  The problem is that Xojo isn’t VB6 and most of the things that take huge workarounds in VB6 are almost laughably simple in Xojo.

The first thing many people do is look at the VB Migration Assistant from Xojo.  It isn’t a perfect tool and does not convert any code for you.  Not converting code is actually a good thing because no conversion tool is perfect.  It’s very hard to convert the intent of the original programmer.  Sure, there are rules you could employ to convert code but in my experience the converters create more work for you in the long run.  It’s much easier for a human to look at the VB6 code, figure out the Xojo equivalent and use the Xojo-way of doing things.

At best, the VB Migration Assistant will convert your UI for you.  But given the huge diversity of 3rd party controls for VB6 you will have to work at converting them to standard Xojo controls.  And again, because VB6 doesn’t do some things well, like control subclassing, you might actually be better off rewriting the user interface from scratch in Xojo anyway.

In both cases I said rewriting Xojo.  Sorry.  There is no easy solution to get your VB6 application to work in Xojo.  While the two development tools use a BASIC language that’s about as close as they get.  VB6 is an ancient language by modern standards.  Xojo is updated 4 to 5 times a year and VB6 hasn’t been updated in a long, long time.  Control subclassing in VB6 is impossible and threads are very hard and because of these two things most VB6 apps tend to have huge workarounds to fulfill those needs.

In Xojo these issues just aren’t there.  Subclass controls to your hearts content.  Need a thread or two or a dozen?  No problem it’s a simple to use Xojo class.  Need a 64 bit version?  Want it to run on Mac OS X, Windows, Linux, and Raspberry Pi?  Xojo can do all that easily.  For VB6 that impossible.

If you are contemplating switching to Xojo do NOT look at ‘converting’ your application.  Think about rewriting it.  This means doing some legwork upfront to learn the Xojo particulars and only then writing code.

We’ve converted dozens of VB6 apps over the past fifteen years as Xojo consultants.  We’ve helped teach thousands of developers on how to use Xojo with our Xojo training videos and one-on-one training.  In the long run you’ll be much better off learning the Xojo way of doing things.  Perhaps then you’ll appreciate that Xojo did it better.

1 thought on “Don’t Convert Your App to Xojo

Comments are closed.