Did you love Visual Basic? A lot of us did, but it’s 2021 and technology is ever-changing. As you look at the modern alternatives, consider Xojo. For over 20 years, Xojo has been the spiritual successor to VB, a rapid, cross-platform programming language and integrated development environment (IDE). Often called “VB for the Mac”, Xojo is more powerful than VB6 and more approachable than VB.NET – two factors that are increasingly important because modern coders are everywhere, not just in the technology department.
Unlike VB and VB.NET, Xojo allows you to develop on your platform of choice- Windows, Mac or Linux. But being able to develop wherever you like isn’t the only reason Xojo is a great alternative to Visual Basic. Xojo is fully object-oriented, supported and regularly updated. It allows you to cross-compile desktop apps for Windows, Mac and Linux and Raspberry Pi. Currently, a Mac is required to compile projects for macOS and for iOS development and compilation; learn why. In additional to all this, Xojo allows you to compile apps for mobile and the web with that same powerful language and IDE.
Evaluating Xojo as a Visual Basic Alternative
Xojo is free for learning and development so you can take all the time you need to evaluate. Download Xojo and start learning while you develop, run and debug your projects in Xojo’s free IDE. Going through the QuickStarts and Tutorials, you’ll recognize how your knowledge of VB leads you to quickly embrace Xojo. Purchase a license only when you are ready to compile your projects.
To help make your transition from Visual Basic to Xojo easier, download this open-source Xojo.VB library that maps many Visual Basic commands to their Xojo equivalents. Watch this Migrating from VB video to see a simple VB app get migrated to Xojo. Visit our Migrating from Visual Basic page at the Xojo Docs for more details about Data Types, Commands and Controls.
Modernize Visual Basic Apps for Web and Mobile
Xojo it is a great way to modernize legacy Visual Basic desktop apps to web and mobile platforms.
Mobile Development – With Xojo iOS you can design your apps using drag and drop in the layout editor, add your code and build. Access the iOS-features you’d expect, like sharing panel and your photo library, and also the iPhone’s hardware-based features, like motion, location and camera. Xojo makes iOS development familiar and fast. Xojo Android is currently in development.
Similarities Between Xojo and Visual Basic
As a Visual Basic developer, you will find Xojo very familiar. VB and Visual Basic.NET use a language similar to the Xojo programming language. You will notice that many of the commands are nearly the same. The default UI controls included with VB are, for the most part, also included with Xojo. You’ll also find that Xojo has several controls that are not included by default with VB like HTMLViewer/WebHTMLViewer, MoviePlayer/WebMoviePlayer and SearchField.
Language – The Xojo programming language has commands like If..Then..Else, For..Next, and While..Loop. You will also find the object-oriented capabilities of Xojo are quite similar to VB.NET.
Data Types – Xojo shares many of the same data types with VB6 and VB.NET, including: Integer, Double, String/Text, Currency, Boolean, Variant.
Controls – Xojo has many common controls including: Buttons, Labels, TextFields, TextAreas, ListBoxes (grids), PopupMenus, ProgressBars, toolbars and more.
Differences Between Xojo and Visual Basic
Xojo definitely feels similar to Visual Basic, but you’ll find there are differences too. Many of these differences stem from Xojo’s focus on being cross-platform.
Shared Libraries – 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 for a cross-platform tool. If you’re depending on a DLL and are planning to deploy on Mac or Linux, you’ll need another solution for those operating systems. Fortunately, Xojo supports conditional compilation which makes it easy for your code to use DLLs only when compiling for Windows. If you find another library that provides a solution for MacOS and/or Linux, you can use conditional compilation there as well.
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 – 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; it provides access to many things you’ve come to expect such as file handling, databases, graphics and more.
File I/O – 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.
Data Types – 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.
Enjoy Coding Again
Whether you need VB for Mac, or VB for Linux or just an updated, rapid-application development tool for Windows, Xojo is that alternative! If you find yourself frustrated with VB.NET or you’re still looking for something to replace VB6, test out Xojo. If saving time and money is a concern, Xojo is a development tool you should consider. Go ahead and download Xojo and see how much you have missed coding like this!
Like all development tools we know Xojo isn’t a fit for every project, so all Xojo licenses come with a 90 day money-back guarantee. We’ve been around for more than 25 years now, and we’ll be here when your next project is looking for a quick way to get off the ground and into development! Questions? I’m here for that, email me, a human being and Xojo fan, anytime at firstname.lastname@example.org.