REALbasic

From Wikipedia, the free encyclopedia

REALbasic
REALbasic icon
REALbasic 2005 IDE

The REALbasic IDE running on Mac OS X
Developer: REAL Software, Inc.
Latest release: 2007 Release 1 / January 2, 2007
OS: Mac OS X, Microsoft Windows, Linux
Use: Programming
License: Proprietary
Website: www.realsoftware.com

REALbasic (RB) is an object-oriented dialect of the BASIC programming language developed and commercially marketed by REAL Software, Inc in Austin, Texas for Mac OS X, Microsoft Windows, and Linux.

Contents

REALbasic was created by Andrew Barry. It was originally called CrossBasic due to its ability to compile the same programming code for Mac OS and Java (although the integrated development environment was Mac only). In 1997 CrossBasic was purchased by FYI Software which renamed it REALbasic as well as renaming the company REAL Software. At this time they also dropped the Java target. The IDE is now available for Microsoft Windows, Mac OS X and Linux and can compile applications for Windows (Windows 98 and higher), Macintosh OS X (PowerPC, Intel and Universal Binary) and x86 Linux.

RB is a strongly-typed language with minimal automatic type conversion, which supports single inheritance and interfaces, class methods and class properties, reference counting, and operator overloading. A very important feature is the ability to extend (not just inherit from) existing classes, like Objective-C Categories. This considerably reduces the need for the Abstract Factory Pattern, which complicates using Application Frameworks in Java and C++.

As described in the language reference, its built-in framework supports (REAL Software 2006):

You can also extend the framework functionality by creating plugins using the Plugin SDK provided by REAL Software. Plugins are created using C/C++ with a variety of supported compilers, including Metrowerks Code Warrior, Microsoft Visual Studio, gcc and XCode. Plugins can support any platform REALbasic supports, but are not required to support all platforms.

The source file format contains window and control placement data and is proprietary, although XML import and export are supported. All source code can be contained in one project file, but it is also possible to have classes/modules in separate files in the same way as most other languages or dialects can. REALbasic compiles directly to machine language for each platform that it supports. REALbasic 2006 Release 3 and newer also supports a human-readable version control format which allows easy collaboration with tools such as Subversion or CVS.

A typical GUI building session in REALbasic's IDE
A typical GUI building session in REALbasic's IDE

There are two versions of the IDE:

  • The professional edition can compile programs for Mac OS X (Carbon PEF, PowerPC Carbon Mach-O, i386 Carbon Mach-O and Universal Binary), Linux and Windows from the same source code file; it can also access databases (Oracle, PostgreSQL, MySQL, ODBC, etc.) including the built-in single-user REAL SQL Database engine based on SQLite; it compiles console applications, can remote debug and has numerous other features.
  • The standard edition only compiles programs for the platform that the IDE is running on (either Windows, Linux or Mac), and does not allow access to databases other than the built-in REAL SQL Database.

Both versions of the IDE permit building the application's graphical user interface by dragging the controls from a toolbar to their parent window. Layout of the controls is helped by the IDE that permits aligning them (both horizontally and vertically), and which gives information about the distance between controls, or between a control and the window borders.

Like many modern IDEs, the code editor supports customizable syntax highlighting, autocompletion and refactoring tools. The IDE also includes editors for menus and database schema as well as viewers for multimedia files such as pictures, movies or sounds.

With REALbasic 2006 Release 1 and higher, the IDE gives you access to scripting features via RBScript. This allows you to control the IDE for doing automated tasks such as running regression tests or doing nightly builds. The scripts can either be global or project-specific.

This is an example of operator overloading for a hypothetical Complex class which permits to sum a real to a complex number, and to sum two complex numbers:

Function Operator_Add (rhs as Single) As Complex
 Dim ret As New Complex
 ret. R = Self. R + rhs
 ret. I = Self. I
 Return ret
End Function

Function Operator_Add (rhs as Complex) As Complex
 Dim ret As New Complex
 ret. R = Self. R + rhs. R
 ret. I = Self. I + rhs. I
 Return ret
End Function

The same function can be defined to accept Double datatype values. This code shows how to use the Complex class to sum a real with a complex number:

Dim First As New Complex (0, 1)
Dim Second As New Complex (1, 1)
Dim Sum As Complex
Sum = First + 5.0 + Second
// Sum will be (6, 2)

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.