RealBasic 2005 for Mac, Windows and Linux
Cross-platform development nirvana?
Review Since its arrival in the mid-1990s, RealBasic has been helping amateur and professional software developers create applications quickly by side-stepping most of the complexities other languages and programming environments throw at them.
Back in the days of the language from which RB is derived, you could type in half a dozen lines of program code, type 'Run', and see the effect immediately. The Unix command line, with its shell languages, maintains this easy, text-only approach. But GUI programming necessitates a significant amount of set-up work just to put in place the canvas on which your application will paints its results, whether it's a feature-packed photo-editing tool right down to the simplest of utilities.
RB's approach has always been to hide away as much of the infrastructure and application management code as possible. You design your application visually, dragging and dropping user interface elements onto windows, but with RB you add just enough code to determine each component's behaviour. You don't need to tell text field A that it's going to change when button B is clicked - it's enough to provide B with a line of code to change A's contents. Similarly, elements which look simple but are in fact composed of a nested set of related components - table views, for example - are, in RB, very easy to create.
The downside is that RB apps may not run as quickly as software written from scratch might do, or where powerful code optimisation tools can be used. But for the many GUI-based apps, so much time is spent waiting for the user to do something that obtaining ever-finer levels of performance aren't needed.
RB has been steadily evolving since its debut, running first on the Mac OS, then on Windows, and adding cross-compilation and targeting Linux on the way. In its current incarnation, the Linux version is a true peer of the other platform releases. However, the changes made to RB 2005 go deeper than that, and it represents one of the tool's biggest updates so far.
For starters, RB has had a facelift. Gone are the various floating palettes and windows of old, replaced by a slick single-window user interface that places controls, application window or code, and control properties into separate panes. It's neat, it's perfect for screening off all the desktop clutter that inhibits concentration, and it's more intuitive. The layout mirrors the workflow: drag a control from the left-hand pane onto your application's window in the middle, then adjust its properties in the right-hand pane. The pane-widths can be adjusted, to suit your preference.
Double-clicking on a control, replaces the properties and application UI view with a code-entry pane, while a hierarchical list of the app's controls, methods, properties and menu handlers replaces the control palette. RB lists all the possible events the control can respond to, so it's immediately clear what behaviours you may need code for. Events you've provided code for are highlighted in bold text.
There's a context-sensitive toolbar immediately above the panes. Clicking on the New Method button, say, allows you to enter the method's name, the list of values it will receive when called and what it will send back, and the instructions it will work through, all in the code pane.
Above the toolbar are tabs to quickly move from one application window to another. RB always conceptually structured an application as a Project containing one or more windows and one or more menu bars, and that's maintained in this release. Moving to the Project tab and double-clicking on a menu bar bring brings up a virtual menu bar, which you switch between Windows, Mac OS X, classic Mac OS and Linux flavours. The context-sensitive toolbar lets you quickly assemble menus and menu items, with names and keyboard shortcuts set in the Properties pane.
Hop back to the appropriate window's code view and you can enter the code that's executed when each menu is selected by the user. RB makes a bold stab at coping with each OS' differences in menu style - the Mac OS' single menu bar to Windows' and Linux's one-menu-per-window approach - but handling OS X's application menu to add anything other than a Preferences... item is kludgey. That's surprising given how long RB has been running under OS X and its Mac heritage. It supports Aqua's other additions to the Mac UI, including sheets windows, customisable toolbars and its brushed metal look.
RealSoftware has progressively stripped out more and more of the code generic to all blocks of instructions so you can focus on writing the unique stuff. RB not only performs the usual syntax colouring and auto-indentation common in modern development environments, but also draws lines to connect the components of if... else... end if and for... next statements to make it easier to see what's in the block and what isn't - particularly useful if you got lots of nested code.
I mentioned methods and properties a moment ago, and yes, RB is object-oriented. There's an App class from which the MenuBar and Window classes devolve, and you can add your own classes and sub-classes, too, along with Modules, which are essentially global, window-less classes. The cunning thing is to provide the power of object-orientation without forcing tricky-to-master methodologies on the user. Objects are created without going through a formal instantiation, and all their methods and properties can be accessed directly without the need to use separate 'accessor' routines to get and set parameters.
OO purists might object to this, but again it's about making the programming process more accessible and not imposing someone else coding philosophy on everyone. If you want to write accessor methods, go right ahead.
In that sense, RealBasic is very like the Basic of old, a language I learned on a Commodore Pet in the early 1980s. It's changed a lot since then, dropping line numbers but gaining object-orientation and some borrowings from C, such as Select... Case... statements. However, the fundamental instruction set and syntax remains - though variables are no longer inherently global, and the Dim statement is used to declare all the variables a method uses rather than simply mark out the span of an array.
With objects and commands mixed, there's a lot for the novice to pick up, but RB provides a handy pop-up, example-packed language reference guide that's perfect for pinning down control parameters and sussing out syntax. RB's had this for some time, but the new release displays it browser-fashion, for easier navigation. It's jam-packed with code examples.
RB also comes with a 560-odd page PDF manual, tutorial files and a Quick Start guide. They're worth a peek: I spent ages trying to figure out how use AppleEvents to get my application to fire up my browser and call up a specific web page, something that obviously won't work in the Windows version, only to discover RB already has a ShowURL command... Odd, but there's no reference to it in the User Guide only the Quick Start manual... ahem.
The manuals also show a Mac bias, despite the profusion of Windows screengrabs. RB is cross-platform, so running the Mac release doesn't limit you to producing Mac applications - you can compile Win32 and Linux versions of your software too. RealSoftware does provide Windows and, now, Linux versions of the software, both of which will likewise generate versions of your app for other platforms. However, it remains best to develop code for platform A on platform A, such are the differences between them. With no runtime licensing issues, you're free to offer your apps commercially, or offer the code you've written under the GPL.
My test app was created and compiled on a Mac for both Mac OS X and Windows, and while the native application operated exactly as expected, the Windows release needed some tweaking. Loading the project into the Windows version of RealBasic and then compiling produced much better results, and made the usual 'run, tweak, run, tweak, run, tweak' process run more smoothly and more quickly. But the simple ability to target multiple platforms rather than code for one then port to another is a big benefit.
Certainly for Mac programmers, RB 2005 is well up to date with the latest Apple technologies. You can build Spotlight queries into your code. For Windows users, there's even closer integration with VisualBasic. The Linux version is compatible with major x86 Linux distributions, including SuSE, RedHat, Mandriva/Mandrake, with GTK+ 2.0 or higher, Glibc-2.3 or higher and CUPS.
Across the range, it's got some impressive database functionality built in, with support for MySQL, PostgreSQL, Oracle, ODBC, Database4D, OpenBase, REALDatabase and Real's own SQLLite-based REALSQLDatabase engines. The networking side covers UDP and TCP socket controls, along with server functionality. Applications can contain their own HTML viewer, and 3D graphics too. Two-dimensional fun comes courtesy of the SpriteSurface control. For folk with an eye toward multi-core processors, RealBasic is capable of generating multi-threaded code. 64-bit support isn't here yet, but when it comes it's going to be much easier to recompile RealBasic code for the 64-bit world than it will software developed in other development environments.
There's clearly plenty of functionality here for almost every coder, though not all of it is available in RB's cheaper, 'Standard' form - for the database support and interesting features such as remote operation you'll need the full, 'Professional' version.
Flaws? Well, you still can't import multiple items - you're forced to add pictures, icons, AppleScripts etc. one at a time. There are bugs too: built applications didn't always appear with an icon, and in its first release RB 2005 proved a little unstable. Fortunately, Release 2 appears much more solid. Its cross-platform support could be better, but there are inevitable limits to what RB can do to shoehorn one mass of code into three UIs - sooner or later, you'll have to fork the code, to ensure code for some platforms don't look like crude ports, that some UI elements look right and the menus feel right for each platform. RB could do more to help you manage this.
I'd have liked to have seen as much scope for controlling how document icons appear and defining compatible document types (ie. file extensions) work in Windows as you get for Mac OS X. That may reflect the fact Windows has an easier way of doing all this stuff - Linux too, for that matter - but I'd like to be sure and, even after using RB, I'm not. As we posted this review, RealSoftware announced RB 2005 Release 3, which further improves stability, speeds up the compiler and enhances the tool's support for 3D graphics.
Programming tools are horses for courses, but RealBasic will run on a wide variety of race tracks. It's strength lies in its ability to hide complexity from the user. For the beginner that means an easy way into the arcane-seeming world of computer programming. For everyone else, from the occasional coder up to the professional, it means you can spend more time working on what your application will do and less on bringing it to life in the first place. It also makes it very easy to change direction mid-way through development. For commercial coders there's the absence of run-time royalties, and its cross-platform abilities help you address larger audiences. ®
|RealBasic 2005 Release 2|
|Price||Mac/Windows: Standard edition, $100; Pro edition, $400
Prices include six months' updates for free
|More info||The RealBasic site |