Monday, December 17, 2012

A Great Alternative to Visual Basic

UPDATE June 2013: Real Studio is now Xojo. Read why Xojo is a great alternative to Visual Basic.

Did you know that Real Studio is a great alternative to Microsoft Visual Basic? That's right, if you have used VB in the past or are considering using it now, you might want to instead take a look at Real Studio (Xojo) to see if it will fit your needs better.

What's wrong with VB?
When referring to "Visual Basic", it usually means one of two things: VB6 or VB.NET. There are current problems with both of these. I'll start with VB6.

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 Real Studio make a pretty good living migrating older projects from VB6 to Real Studio. And many of our customers are former VB users.

If VB6 still works today, why even consider switching? As I mentioned, it's no longer updated by Microsoft. Although it does work in more recent versions of Microsoft Windows, that does not mean it works well. The IDE is also rather difficult to use as it uses the now derided MDI (multiple document interface) style that results in lots of small windows embedded in a main window. And the VB6 language is not very sophisticated. In particular, it is not fully object-oriented making many tasks more difficult than they need to be and your code more complex.

So what about VB.NET? That is newer, right? 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 in both cases, VB.NET is complex and difficult to learn. Because Visual Studio is designed to work with a wide variety of programming languages (C#, C++, VB.NET), it can often confound people simply looking to quickly create apps. And VB.NET is a decent language, but the .NET framework is large, powerful and complex. Microsoft changes it rapidly and it can be overwhelming for many developers.

Why Real Studio?
Here at Real Software, we strive to keep things simple. We want to make it so that anyone can create their own apps and we strongly feel that Real Studio is the best way to do that.

As in the tale of Goldilocks and the Three Bears, Real Studio is "just right". It is more powerful than VB6 while at the same time more approachable than VB.NET. It is likely you will have your first app created in Real Studio before you even finish downloading and installing Visual Studio!

And don't forget that Real Studio is a cross-platform development tool. With Real Studio, a single project can create desktop apps that works on Windows, OS X and Linux. 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 Real Studio. In fact, any single development platform can create apps for all the other platforms supported by Real Studio. If you are developing on OS X, you can create apps for OS X, Windows, Linux and even the web.

Yes, Real Studio can also create web applications. Of course, so can VB.NET (using ASP.NET), but ASP.NET requires a Microsoft server running IIS. Real Studio web applications can be deployed as simple stand-alone applications or can be deployed using Apache, the most common web server on the planet, using Windows, OS X or Linux.

Simple stated, Real Studio allows you to quickly create apps.

Similarities between Visual Basic and Real Studio
Real Studio makes a great alternative for Visual Basic because it shares many similarities with it. This is a short list of some of the things that VB users will find familiar:

Real Studio uses a programming language that is very similar to Visual Basic. It has commands like If..Then..Else, For..Next, While..Loop, Dim and more. You'll have no trouble at all reading (or writing) Real Studio code. You will also find the object-oriented capabilities of VB.NET quite similar to Real Studio. If you've used Visual Studio at all, you'll find that Real Studio works similarly but is far simpler to learn.

Data Types
Real Studio shared many of the same data types with VB6 and VB.NET, including: Integer, Double, String, Currency, Boolean, Variant.

Real Studio has many common controls that will be familiar to you, including: Buttons, Labels, TextFields, TextAreas, ListBoxes (grids), PopupMenus, ProgressBars, toolbars and more.

VB6 and Real Studio Controls

Differences between Visual Basic and Real Studio
Of course, Real Studio also has quite a few differences from Visual Basic as well.

Shared Libraries
Real Studio 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 Real Studio (and thus limiting yourself to deploying only on Windows).

Compiler and Run-time
Real Studio 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 I’ve mentioned before, Real Studio is fully object-oriented. Unlike VB6, you can have classes that use inheritance and other object-oriented features.

The Real Studio framework is designed to be simple to use and support cross-platform applications. It is different than the VB6 framework and the .NET framework.

File I/O
One of the biggest differences between VB6 and Real Studio is file I/O. Real Studio 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
Real Studio 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). Real Studio does not allow this. Use the OPTION EXPLICIT command in all your Visual Basic code to have VB enforce explicit variable declarations.

Switching to Real Studio
We offer a tool to help make it easier for you to make the switch from VB to Real Studio. Our Visual Basic Migration Assistant can help you move your VB projects over to Real Studio, but only at a high level. This tool moves your project files, source code and user interface (to some extent) to a Real Studio project. The tool does not convert the code in any way, nor does it create a working version of your VB project in Real Studio. It is just a means for you to get your code into Real Studio so you can refer to it while working on the Real Studio 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 Real Studio. It might be "just right" for you!


Bob Keeney said...

We've done a lot of VB6 conversions over the years. We have a whole webpage dedicated to it at We even have a utility to get some metrics on the VB6 project so we, as consultants, can provide a quick and dirty estimate on much it will cost.

In the long run, we've found that 'converting' VB6 code to Real Studio isn't a viable option for most projects. There are too many differences in file handling, database coding, and controls that make it simply easier and faster to rewrite it using the best techniques possible in Real Studio.

VB6 and REALbasic might have 'basic' in the name but they are separated by over a decade in capabilities and object oriented language improvements. Real Studio let's you do a lot of things that just weren't possible in VB6. Or, if they were possible resulted in a ton of code where in Real Studio it's just a few lines of code. This makes converting very difficult but a skilled developer can easily accomplish the same thing if doing a rewrite.

DMW said...

The truth is that the comparison is less interesting today. Why?

Classic VB is mainly used to maintenance running VB applications. When the x64 platform become the de facto platform then VB is dead and gone to the history books. In addition, Microsoft makes it hard to use classic VB.

VB.NET is quite easy to learn. The challenge is to learn how to leverage all the whistle and bells that comes with the IDE and the Framework.

From a strictly technology point of view VB.NET has little in common with classic VB. I would say it's only the word 'VB'they share.

RS should not be compared with VB.NET.

Kind regards,
Dennid said...

Does RealBasic offer command line compilation? That is, can I write quick programs in vi or a text editor (outside of the IDE), compile them on the command line and run them?

Geoff Perlman said...

@ ahhocboy - We don't currently have a command-line compiler but it is something we want for the future and are working towards.

findonlineproduct said...
This comment has been removed by a blog administrator.
jon_e_cache said...

When programming in VB6, I use a third party utility that wraps error-coding around every coded procedure in my VB6 project just prior to compiling. This keeps my program from crashing from unforeseen errors and since the code is applied immediately before compiling it does not interfere with the prime functions of an application during development. Does Real Studio have similar error-coding utility available?

Hector Marroquin said...

I used to be a hardcore VB fan, was quite proficient with it, made my living writing VB code. When .net hit the scene I abandoned VB and moved to delphi. Then life did what it does best and changed dramatically for me and I didn't wrote a line of code for years.

When I decided to get back to doing what I love doing for a living (developing software) I started looking at development tools, looked at delphi and didn't liked what I saw, thought about C++ but remembered what a pain in the behind it is for writing the type of apps I usually work on which are basically database front ends. Then I thought I could polish my C# but quickly gave up, not interested. Then I met my new obsession... RealBasic or Real Studio. I knew right there that was the tool I needed and wanted.

A couple of days ago I fired up VB6 out of nostalgia mostly. Wrote a couple of lines of code and missed RS by the third line. Did the same with Visual Studio, same result.

I fail to understand why RS is still being compared to VB classic, VB is dead. Yes, I know there are tons of VB apps running and they need to be mantained but for NEW projects? I'll have my RS thank you.

Paul Lefebvre said...

@jon_e_cache: Real Studio has much better error handling than VB. You can use the App.UnhandledException event handler to catch any run time exceptions.

You you can use Try/Catch statements to catch exceptions in specific blocks of code.

Lastly, you can use the Exception command to catch exceptions in methods.