TweetFollow Us on Twitter

REALbasic Release 1

Volume Number: 14 (1998)
Issue Number: 10
Column Tag: Tools Of The Trade

Review: REALbasic Release 1

by Scott J. Anchin
Edited by the MacTech Magazine Editorial Staff

The Power and Simplicity of BASIC

For some time now, Macintosh developers have been searching for a Mac OS equivalent to Microsoft's popular Visual Basic. Enter REAL Software's REALbasic, a visual object-oriented development environment well suited for a variety of tasks ranging from RAD to full-scale commercial application development.

The Basics

REALbasic uses an object-oriented implementation of the BASIC (Beginners All-purpose Standard Instruction Code) language. Like all modern object-oriented programming languages such as C++ and Java, REALbasic uses classes, inheritance, properties and methods. This allows a simplified approach to programming by allowing code to be reused throughout a project. REALbasic's syntax is also highly compatible with that of Microsoft's Visual Basic, a similar (but in this author's opinion inferior) development tool. This allows developers accustomed to writing software on the PC to feel at home with REALbasic, a definite advantage to cross-platform software authors.

REALbasic supports automatic garbage collection, much like Java. This frees the developer from having to worry about memory management, which in and of itself takes up much of the development time when working with many other languages.

The IDE

The Interface

The IDE (Integrated Development Environment) contains all of the expected features in a small streamlined package. Occupying as little as 1.5 Mbytes of RAM, the IDE is blazing fast and incredibly simple to use. The IDE consists of six main components: the Toolbar, the Properties window, the Colors window, the Project window, the Code Editor, and the Debugger

Figure 1. The Toolbar and the Properties window.

The toolbar (see Figure 1) is located by default on the left side of the screen and contains a large number of colorful icons. Each icon designates a Control, which can be best described as an interface object such as a button, a tab panel, or a contextual menu. To add a Control to your project, simply drag the desired Control from the Toolbar to the desired window. Once the desired Control is positioned in the desired window, editing the code for a Control is as simple as double clicking on it.

The Properties window (see Figure 1) is located by default on the right side of the screen, opposite the Toolbar. It contains a variety of changeable settings that pertain to the operation, location, and appearance of the selected Control or window. While many of the settings can also be modified through code, the Properties window provides a convenient central location to specify default values for each of the specific Controls.

The Colors window provides the developer with a single location to store colors frequently used throughout the project. The Colors window is a small floating palette consisting of sixteen small squares, arranged in a four by four grid. Clicking on any one of these brings on screen the standard Mac OS color picker, from which one can then choose the desired color. At that point, the developer can drag the color from the Colors window into the Properties window to change the colors of various interface elements. This small but useful feature can save a great deal of time when dealing with application-wide custom colors.

Figure 2. The Project window.

The Project window (see Figure 2) provides the central location to view all of the elements comprising one's project, i.e. windows, classes, modules, AppleScripts, pictures, movies, shared libraries, and XCMD/XFCNs. To enhance organization, folders can be added to the Project window, and the aforementioned elements can then be placed inside of them. In order to access one of the listed elements of one's project, all that is required is a double click. As an added convenience, clicking once on the element concurrently displays pertinent information in editable form in the Properties window.

Figure 3. The Code Editor.

While much of the REALbasic developer's time is spent visually creating interfaces, a great deal of it is also spent in the Code Editor (see Figure 3), writing and tweaking code in order to attain perfection. The Code Editor is a two-paned window. The left pane is a hierarchical listing of all Controls along with their related events, the events for the window, menu handlers, methods, and properties. With the exception of properties, clicking on any one of these items displays its source in the right pane; properties can be edited by double clicking on their specific names. The Code Editor supports auto indenting, keyword highlighting, and auto completion, resulting in code that is easy to read as well as easy to write. The Code Editor also supports contextual menus which serve the same function as the left pane and are often more convenient. The two panes in the Code Editor are also resizable, allowing the developer to tailor the display to their unique tastes.

The final main component of the REALbasic IDE is the Debugger. Just as with all powerful debuggers, REALbasic's supports breakpoints, step over, step in, and step out. When running your application in the IDE, two windows are displayed in the background: a Variables window and a Stack window. The Variables window displays the current values of one's variables and has a simple object viewer. The Stack window displays the current stack so as to help the developer detect any memory leaks or other memory-related bugs. The debugger is a solid and necessary portion of the REALbasic IDE and is truly useful in tracking down and squashing bugs.

Its Runtime!

After spending hours developing your interface and code, it is time to test your budding killer app. When the developer chooses to run their application from within the IDE (with a simple "Run" menu command), REALbasic brings its advanced, dynamically recompiling compiler into action. This is described as having "all the benefits of an interpreter, while running at fully compiled speed," i.e. every time the developer runs his or her application, REALbasic recompiles it instantly. This provides the speed and versatility of a HyperCard-like interpreter, while allowing the application to run just as any compiled C++ application would.

If You Build It, They Will Come

When it comes time to compile an application and show it to the world (or at least to some beta testers), REALbasic's Build dialog (see Figure 4) comes into play. This dialog houses all information relevant to a final application, including its name, icon, and version information. It also lets one specify whether they want a 68k app, a PowerPC app, or a FAT app. Compiling a PowerPC app also has an additional option: Compress. Compressing a PowerPC app applies a proprietary resource compression scheme which cuts the size of the application dramatically while allowing it to retain full speed despite requiring only an additional 600 kbytes of RAM. Clicking on the Build button compiles the application and places it in the same folder as the project file.

Figure 4. The Build dialog.

It should be noted that, unlike many similar languages, REALbasic compiles applications to machine code; it does not use an interpreter. Thus, REALbasic applications require less RAM, less hard disk space, and run considerably faster than one might expect.

Create Truly Powerful Mac OS Apps

Advanced Features

REALbasic allows the developer access to a wide variety of features without the need to delve into the toolbox. With support for a number of industry and Apple standard features, REALbasic makes it easy to create truly powerful Mac OS apps.

Game developers will appreciate REALbasic's advanced sprite engine. Based on SpriteWorld, it is fast, efficient, and simple to use. With complete control over virtually every aspect of sprites, the developer is freed of virtually all creative limitations. Using the sprite engine also creates animations which are flicker free, thereby creating a professional appearance.

REALbasic's graphics support is also very powerful. With support for off screen drawing areas, developers can modify information displayed on the screen without flicker, and can preload images for enhanced speed. Text drawn with the graphics object can support automatic word wrapping, and can be drawn with varying fonts, sizes, styles, and colors. REALbasic also supports drawing various simple shapes. Additionally, it can display any graphic supported by QuickTime, giving the developer convenient access to a wide variety of file formats.

Still another advanced feature of REALbasic is its text handling. It is second to none. By using the WASTE text engine, fields can contain greater than 32 kbytes of data, a limitation imposed by standard TextEdit. Fields can contain varying fonts, sizes, styles, and colors, all of which can be changed on the fly through code. Fields also have a number of filters which can be applied to them in order to limit input to a specified type of data.

Getting information in and out of an application is essential to many programs. Thus, REALbasic provides excellent support for file i/o. REALbasic can retrieve and change almost every aspect of a file, and can read and write to them with a great deal of speed.

REALbasic also allows for transferring data through the serial ports or via TCP/IP. The Serial Port Control makes communicating with custom pieces of hardware a breeze. The OpenTransport native TCP/IP Socket Control allows the developer to add support for various Internet protocols to their applications quickly and efficiently.

For added speed and efficiency, REALbasic supports the use of threads. This allows code to be running in the background, will still allowing the user access to the program's interface.

Support For Key Mac OS Technologies

REALbasic embraces virtually all technologies that have made the Mac OS such an excellent platform. With built-in support for such technologies as QuickTime, AppleEvents, Drag and Drop, Contextual Menus, and the Appearance Manager, REALbasic applications can be as advanced as the developer desires.

Using the MoviePlayer Control, the developer has access to a wide variety of QuickTime features. Users can specify how a movie will be played, as well as when it begins to play. One particular benefit of the MoviePlayer Control is that it supports the display of any media type that the currently installed version of QuickTime allows. For example, an animated GIF can be played back from within a REALbasic application with the presence of QuickTime 3.

REALbasic includes extensive built in support for AppleEvents. AppleEvents, the Mac OS standard method of interapplication communications, provides a way in which developers can send messages between their applications and others in order to perform such tasks as transferring data. For example, data could be entered into a REALbasic app which could then be transferred to FileMaker Pro for subsequent addition into a database.

With Drag and Drop becoming more and more standard throughout the software industry, REALbasic's support for Mac OS standard Drag and Drop is a most welcome feature. Developers have full control over drag regions and the contents of the drag data. As an added bonus, Multiline EditFields support Drag and Drop without the need for any code. REALbasic also provides a mechanism for easily adding these capabilities to ListBoxes with very little code.

It is also a comfort to know that REALbasic-built applications will look at home in future versions of the Mac OS. With built in support for Apple's Appearance Manager, all of the Controls are Appearance-savvy. With the release of Mac OS 8.5 and switchable themes, the Controls will alter their appearance to fit in with the current theme.

REALbasic's support for the latest Mac OS technologies does not stop there. It allows you to quickly and easily apply balloon help to any control or menu item, and allows placement of items in the Help menu. This allows for the creation of custom help systems, such as HTML help viewers. Also supported is the creation of Contextual Menus which, through a custom implementation, are displayed regardless of whether or not Mac OS 8 is installed.

Extending REALbasic

While REALbasic's built-in capabilities are generally sufficient for virtually all tasks, one occasionally needs access to an unsupported feature or the Macintosh toolbox. For this reason, REALbasic is easily expandable through the use of AppleScript, XCMD/XFCNs, shared libraries, and REALbasic native plug-ins.

Compiled AppleScripts and XCMD/XFCNs can be incorporated into a REALbasic project by dragging and dropping it from the Finder to the Project window. Once added to the project, they can be called just as a built-in method would be called.

Shared libraries can be added to a project in the same fashion as AppleScripts and XCMD/XFCNs. Double clicking a shared library once it is in the Project window displays a window, from which one can define entry points for the shared library. The entry points can be accessed through code with support for such items as MemoryBlocks, enabling one to store data returned from the libraries.

Perhaps the best way to add functionality to REALbasic is through a REALbasic native plug-in. Plug-ins have full access to the toolbox, and can add either methods or Controls to REALbasic. Placing a Control plug-in into REALbasic causes the Control to appear in the Toolbar just as any built-in control would, and is used in the same way. Developers wishing to create plug-ins can download the SDK directly from REAL Software's web site, free of charge.

Port Your Windows Apps

The high level of compatibility between REALbasic and Visual Basic's syntax makes REALbasic the perfect tool for porting Windows-based Visual Basic applications to the Mac OS. By dragging any Visual Basic 2.0 or later form (.frm file) into REALbasic's project window, it is automatically converted into a REALbasic window, and incorporated into your project. Additionally, REALbasic supports dragging and dropping Visual Basic Code Modules (.bas files) into the project. This too incorporates the file into your project. The extensive Visual Basic support provides an excellent opportunity for Windows software developers to expand their market, while adding to the growing number of Mac OS applications on the market. This approach is also extremely cost-effective, as it requires very little time on the part of the software developer to perform this porting.

Community

The center of the large REALbasic community is the REALbasic NUG mailing list. From here users of any level can ask questions, request features, and hold discussions on almost any aspect of REALbasic programming. The members of the list are helpful, and for the most part courteous. As one of the first members of the list, I have seen it grow from a small resource to an essential aspect of REALbasic programming.

On the web, REALbasic users have set up the REALbasic Webring. With a fairly large number of members, this is another excellent resource for any developer. Pages on the webring range from companies which utilize REALbasic in their development, to individuals offering code snippets, to extensive FAQ listings. REALbasic users have also set up a Hotline server, the REALbasic Café, as a place to discuss the language, ask questions, share ideas, and upload your programs for others to see. When visiting the Café you will notice that the people there are always willing to help you out, and during discussions, will even create programs for you to illustrate their points.

Overall, members of the REALbasic community are an enthusiastic, helpful, and pleasant bunch. They hail from many countries across the globe, and together make up an indispensable programmer's resource.

What Will The Future Hold?

Quite appropriately, a primary concern of those interested in purchasing a new development environment is whether the company is planning a future for the software. It seems clear indeed that REALbasic has a long and bright future ahead. As of this writing, REAL Software is in the early development stages of Release 2. As of this release, REAL Software will be producing two versions of REALbasic: a standard version and an extended version.

The standard version of Release 2 will be similar to the current version, with the addition of numerous features, including improvements in such features as QuickTime support, Sprite support, and the Socket Control. Release 2 will also feature a Java compiler, which will allow Java applets to be compiled just as easily as standard Mac OS applications are compiled.

The extended version will be identical to the standard version, with two important differences. The first is the addition of ODBC and SQL database support, with the inclusion of a single user database. The second of these differences is the addition of a Windows compiler. Much like the Java compiler, the Windows compiler will create applications that will run on Windows 95/98/NT as easily as creating a Mac OS application. This will give developers the exciting capability to create a single code base, and deploy their applications on the Mac OS, Windows, and on the web.

Documentation

REALbasic's documentation is extremely thorough. Consisting of over six hundred pages, the printed documentation is divided into three parts. The first of these parts is the tutorial. As step-by-step guide to creating your first application, the tutorial assumes absolutely no prior programming experience, making REALbasic accessible to the beginner. The second portion of the documentation is the developer's guide. Made up of fourteen chapters, this guide covers everything from the basics of object-oriented programming to the complexities of interapplication communication. Finally, REALbasic provides a comprehensive language reference indexing every part of the language. The documentation is bound with a spiral binding so that it can lay flat on any surface, a convenience that should not be underestimated.

Though printed documentation is essential, it is often inconvenient to attempt to locate a volume while deeply engrossed in coding. For this reason REALbasic includes an online reference. Simply select any Control or word in the Code Editor, open the online reference (through either a menu selection or command-1), and it will automatically display the proper help topic. This feature proves to be indispensable over the course of the development process while working on a given project.

Conclusions

Being a first release and having so many features, it is almost inevitable that REALbasic would contain a few of minor bugs and inconsistencies. Though numerous work arounds exist, they are often bothersome nonetheless. To their credit, REAL Software has pledged to release free updates to the software in an effort to fix all outstanding bugs.

REALbasic is without a doubt a solid new entry into the Mac programming world. With HyperCard-like simplicity, C++-like power, and compatibility with Visual Basic, REALbasic is a most powerful tool. Whether you are involved in RAD, building front ends for AppleScripts, or developing custom software, shareware, and/or commercial software, REALbasic has the tools for you. In short, REALbasic is worth many times its $99 price.

Online Resources


Scott Anchin, scott@psrsoft.com is the founder of Precise Sales & Research, http://www.psrsoft.com, a software development company. He is also associated with Fisher, Towne & Associates, a national developer of electronic catalog and commerce systems for several Fortune 500 companies. Additionally, he is an online support editor for MacTech Magazine.

 
AAPL
$112.94
Apple Inc.
+1.16
MSFT
$47.98
Microsoft Corpora
+0.32
GOOG
$524.87
Google Inc.
+8.52

MacTech Search:
Community Search:

Software Updates via MacUpdate

NeoOffice 2014.6 - Mac-tailored, OpenOff...
NeoOffice is a complete office suite for OS X. With NeoOffice, users can view, edit, and save OpenOffice documents, PDF files, and most Microsoft Word, Excel, and PowerPoint documents. NeoOffice 3.x... Read more
LibreOffice 4.3.5.2 - Free Open Source o...
LibreOffice is an office suite (word processor, spreadsheet, presentations, drawing tool) compatible with other major office suites. The Document Foundation is coordinating development and... Read more
CleanApp 5.0.0 Beta 5 - Application dein...
CleanApp is an application deinstaller and archiver.... Your hard drive gets fuller day by day, but do you know why? CleanApp 5 provides you with insights how to reclaim disk space. There are... Read more
Monolingual 1.6.2 - Remove unwanted OS X...
Monolingual is a program for removing unnecesary language resources from OS X, in order to reclaim several hundred megabytes of disk space. It requires a 64-bit capable Intel-based Mac and at least... Read more
NetShade 6.1 - Browse privately using an...
NetShade is an Internet security tool that conceals your IP address on the web. NetShade routes your Web connection through either a public anonymous proxy server, or one of NetShade's own dedicated... Read more
calibre 2.13 - Complete e-library manage...
Calibre is a complete e-book library manager. Organize your collection, convert your books to multiple formats, and sync with all of your devices. Let Calibre be your multi-tasking digital librarian... Read more
Mellel 3.3.7 - Powerful word processor w...
Mellel is the leading word processor for OS X and has been widely considered the industry standard since its inception. Mellel focuses on writers and scholars for technical writing and multilingual... Read more
ScreenFlow 5.0.1 - Create screen recordi...
Save 10% with the exclusive MacUpdate coupon code: AFMacUpdate10 Buy now! ScreenFlow is powerful, easy-to-use screencasting software for the Mac. With ScreenFlow you can record the contents of your... Read more
Simon 4.0 - Monitor changes and crashes...
Simon monitors websites and alerts you of crashes and changes. Select pages to monitor, choose your alert options, and customize your settings. Simon does the rest. Keep a watchful eye on your... Read more
BBEdit 11.0.2 - Powerful text and HTML e...
BBEdit is the leading professional HTML and text editor for the Mac. Specifically crafted in response to the needs of Web authors and software developers, this award-winning product provides a... Read more

Latest Forum Discussions

See All

This Week at 148Apps: December 15-19, 20...
Happy Holidays from 148Apps!   How do you know what apps are worth your time and money? Just look to the review team at 148Apps. We sort through the chaos and find the apps you’re looking for. The ones we love become Editor’s Choice, standing out... | Read more »
New Version of Tempo Smart Calendar Help...
New Version of Tempo Smart Calendar Helps You Plan Your Day Without Opening the App Posted by Jessica Fisher on December 22nd, 2014 [ permalink ] | Read more »
Sparkle - Advanced Cross-Synthesis (Mus...
Sparkle - Advanced Cross-Synthesis 1.0 Device: iOS Universal Category: Music Price: $6.99, Version: 1.0 (iTunes) Description: Sparkle is a tool for advanced spectral hybridizations made of several algorithms that operate on frequency... | Read more »
DICETINY is coming to iOS in 2015
DICETINY is coming to iOS in 2015 Posted by Jessica Fisher on December 22nd, 2014 [ permalink ] Fakedice has announced that they’re bringing their digital board game DICETINY to iOS. | Read more »
It Came From Canada: The Witcher Battle...
The Witcher 3: Wild Hunt may still be a few months away, but very soon players will be able to get a new taste of the acclaimed Polish RPG on their mobile devices with The Witcher Battle Arena. While it trades open-world exploration for compact... | Read more »
The Babies Get Lost Again in the New Azt...
The Babies Get Lost Again in the New Aztec Ruins Update for Light in the Dark Posted by Jessica Fisher on December 22nd, 2014 [ permalink ] | Read more »
Living Room 3D for IKEA Makes All In-App...
Living Room 3D for IKEA Makes All In-App Purchases Free Until 2015 Posted by Jessica Fisher on December 22nd, 2014 [ permalink ] | Read more »
Crossbow Warrior – The Legend of William...
Crossbow Warrior – The Legend of William Tell Review By Lee Hamlet on December 22nd, 2014 Our Rating: :: MISSES THE MARKUniversal App - Designed for iPhone and iPad Crossbow Warrior details the entertaining adventures of legendary... | Read more »
A New Update Races onto Asphalt 8: Airbo...
A New Update Races onto Asphalt 8: Airborne Posted by Jessica Fisher on December 22nd, 2014 [ permalink ] Universal App - Designed for iPhone and iPad | Read more »
Workflow: Powerful Automation Made Simpl...
Workflow: Powerful Automation Made Simple Review By Campbell Bird on December 22nd, 2014 Our Rating: :: GO WITH THE FLOWUniversal App - Designed for iPhone and iPad This powerful app lets users accomplish multiple tasks at touch of... | Read more »

Price Scanner via MacPrices.net

13-inch 2.4GHz Retina MacBook Pro (Apple refu...
The Apple Store has previous-generation Apple Certified Refurbished 13″ 2.4GHz/128GB Retina MacBook Pros available for $999. Apple’s one-year warranty is standard, and shipping is free: - 13″ 2.4GHz/... Read more
Apple resellers offer free overnight shipping
The Apple Store is now offering free next-day shipping on all in stock items if ordered before 12/23/14 at 10:00am PT. Local store pickup is also available within an hour of ordering for any in stock... Read more
Holiday sales continue: MacBook Airs for up t...
 B&H Photo has 2014 MacBook Airs on sale for up to $120 off MSRP, for a limited time, for the Thanksgiving/Christmas Holiday shopping season. Shipping is free, and B&H charges NY sales tax... Read more
Holiday sale continues: 13-inch Retina MacBoo...
 B&H Photo has new 13″ MacBook Pros on sale for up to $150 off MSRP as part of their Holiday pricing. Shipping is free, and B&H charges NY sales tax only: - 13″ 2.5GHz MacBook Pro: $979 save... Read more
Holiday sale continues: 15-inch Retina MacBoo...
 B&H Photo has the new 2014 15″ Retina MacBook Pros on sale for up to $300 off MSRP for a limited time. Shipping is free, and B&H charges NY sales tax only: - 15″ 2.2GHz Retina MacBook Pro: $... Read more
Holiday sale: 13-inch 128GB MacBook Air for $...
 Best Buy has the 2014 13-inch 1.4GHz 128GB MacBook Air on sale for $849.99, or $150 off MSRP, on their online store. Choose free home shipping or free local store pickup (if available). Price valid... Read more
13-inch 2.6GHz Retina MacBook Pro on sale for...
Best Buy has lowered their price on the 2014 13″ 2.6GHz/128GB Retina MacBook Pro to $1149.99 on their online store for a limited time. That’s $150 off MSRP and the lowest price available for this... Read more
Kodak Returns to CES With New Consumer Produ...
Former photography colossus Kodak is returning to CES for the first time in three years where the Kodak booth (#21818 South Hall 1) will showcase a wide range of innovative, imaging-related products... Read more
Invaluable Launches New Eponymously -Named A...
Invaluable, the world’s largest online live auction marketplace, hhas announced the official launch of the Invaluable app for iPad, now available for download in the iTunes App Store. Invaluable... Read more
IDC Reveals Worldwide Mobile Enterprise Appli...
International Data Corporation (IDC) last week hosted the IDC FutureScape: Worldwide Mobile Enterprise Applications and Solutions 2015 Predictions Web conference. The session provided organizations... Read more

Jobs Board

*Apple* Store Leader Program (US) - Apple, I...
…Summary Learn and grow as you explore the art of leadership at the Apple Store. You'll master our retail business inside and out through training, hands-on experience, Read more
Project Manager, *Apple* Financial Services...
**Job Summary** Apple Financial Services (AFS) offers consumers, businesses and educational institutions ways to finance Apple purchases. We work with national and Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, you're also the Read more
*Apple* Retail - Multiple Positions (US) - A...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.