Xojo is a great alternative to Microsoft Visual Basic. If you have used VB in the past or are considering using it now, you might want to take a look at Xojo to see if it will fit your needs better.
At Xojo, we strive to keep things simple. A single language to build apps for Mac, Windows and Linux desktop, plus web, iOS and Raspberry Pi (Android coming soon!). With Xojo you simply develop faster.
Why not Visual Basic?
When referring to Visual Basic, it usually means one of two things: VB6 or VB.NET. There are current problems with both of these.
Visual Basic 6, or VB6, was last updated in 1998. In its heyday, it was a very popular development tool and was used to create a wide variety of apps, especially in-house applications used by small businesses. Surprisingly, it is still in use today, even though it was effectively abandoned by Microsoft years ago. In fact, many consultants using Xojo make a pretty good living migrating older projects from VB6 to Xojo. And many of our customers are former VB users.
If VB6 still works today, why even consider switching? The big reason is that it’s no longer updated by Microsoft. Although it still seems to work in more recent versions of Microsoft Windows, that does not mean it works well.
So what about VB.NET? Surely it doesn’t have these limitations. And that would be correct. VB.NET uses Visual Studio as its IDE and Visual Studio is modern and powerful. VB.NET is a a fully object-oriented language, supported by the powerful .NET framework.
But VB.NET is complex and difficult to learn. Because Visual Studio is designed to work with a wide variety of programming languages, it can often confound people simply looking to quickly create apps.
As in the tale of Goldilocks and the Three Bears, Xojo is “just right”. It is more powerful than VB6 while at the same time more approachable than VB.NET. You could have your first app created in Xojo before you even finish downloading and installing Visual Studio!
And don’t forget that Xojo is a cross-platform development tool. With Xojo, a single project can create desktop apps that work on Windows, OS X, Linux and Raspberry Pi. Unlike VB and Visual studio, you are not forced to do your development on Windows, either. Do you want to do development on OS X or Linux? You can do that with Xojo. In fact, any single development platform can create apps for all the other platforms supported by Xojo. For example, if you are developing on OS X, you can create apps for OS X, Windows, Linux, Raspberry Pi, the web and iOS (iOS released in Xojo 2014r3).
Simply stated: Xojo allows you to quickly create the apps you need.
Modernize Legacy Desktop Apps with Web and iOS
Because Xojo can create apps for so many platforms, it is a great way to modernize and update your legacy desktop apps so that you can also have web and iOS apps.
For example, you might find that a desktop app used by your company for many years would serve everyone better if it was recreated as a web app, making it easier to deploy and access. Unlike other technologies, with Xojo, web apps are as easy to make as desktop apps.
Of course, ASP.NET can be used to create web apps, but it is not nearly as easy to use and it requires a Microsoft server running IIS. Xojo web apps can be deployed to any server (Linux, OS X or Windows) and can also use the industry standard Apache web server.
These days mobile iOS apps are a necessity, but if you’ve ever tried to create your own iOS apps you already know how complicated it is. Why fight with Xcode and other tools? Now that Xojo has brought its famous ease-of-use to iOS development, the creation of iOS apps has never been simpler! And unlike other tools, Xojo creates native 64-bit iOS apps using standard iOS controls that can be sold in the App Store. Xojo makes iOS development familiar and fast.
Similarities between Visual Basic and Xojo
This is a short list of some of the things that VB users will find familiar:
The Xojo programming language is very similar to Visual Basic. It has commands like If..Then..Else, For..Next, While..Loop, and Dim. You’ll have no trouble at all reading or writing Xojo code. You will also find the object-oriented capabilities of VB.NET quite similar to Xojo. If you’ve used Visual Studio at all, you’ll find that Xojo works similarly but is far simpler to learn.
Xojo shares many of the same data types with VB6 and VB.NET, including: Integer, Double, String/Text, Currency, Boolean, Variant.
Xojo has many common controls that will be familiar to you, including: Buttons, Labels, TextFields, TextAreas, ListBoxes (grids), PopupMenus, ProgressBars, toolbars and more.
|VB6 Control||Xojo Control|
Differences between Visual Basic and Xojo
Of course, Xojo also has differences from Visual Basic.
Compiler and Run-time
Xojo apps are compiled to native code. They do not contain byte-code that is run by a virtual machine (as with .NET). The run-time library is included with your applications so there is nothing additional that needs to be installed on users’ computers.
Language and Framework
As mentioned earlier, Xojo is fully object-oriented. Unlike VB6, you can have classes that use inheritance and other object-oriented features.
The Xojo framework is designed to be simple to use and support cross-platform applications. Although it provides access to many things you’ve come to expect (such as file handling, databases, graphics and more), it is different than the VB6 framework and the .NET framework, buy you’ll find it easy to learn.
One of the biggest differences between VB6 and Xojo is file I/O. Xojo consolidates all its file processing into a few classes: FolderItem, TextInputStream, TextOutputStream and BinaryStream. VB6 uses hard-coded file paths and less flexible file access methods, primarily because it only needs to work with Windows-specific file paths.
Xojo is strongly typed, just like VB.NET. VB6 allows you to do some things the old-school, BASIC way, the most significant of which is using variables without declaring them (the type is inferred by a suffix on the name). Xojo does not allow this. Use the OPTION EXPLICIT command in all your Visual Basic code to have VB enforce explicit variable declarations.
Improved Error Handling
Xojo has modern exception handling using Try/Catch, Exception and App.UnhandledException.
Xojo cannot create DLLs, ActiveX controls, .NET assemblies or any kind of shared libraries. Since these are all Windows-specific technologies, that is somewhat understandable. You’ll either need to rethink your design or just re-use these components from within Xojo (and thus limiting yourself to deploying only on Windows).
Switching to Xojo
To help make it a little easier to you to make the switch from VB to Xojo, you can also try the Visual Basic Migration Assistant tool. This tool moves your project files, source code and user interface (to some extent) to a Xojo project. However, it does not convert the code in any way, nor does it create a working version of your VB project in Xojo. It is a handy way for you to get your code into Xojo so you can refer to it while working on the Xojo version without having to keep a copy of VB around.
If you find yourself frustrated with VB.NET or are looking for something to replace VB6, be sure to test out Xojo. It might be just right for you.
Be sure to watch the Migrating from VB webinar to see how a simple app is migrated to Xojo and visit our Migrating from Visual Basic page at the Xojo Developer Center for more details.