Realbasic (RB) is the object-oriented dialect of the BASIC programming language used in Real Studio, a programming environment, developed and commercially marketed by Real Software, Inc of Austin, Texas for Mac OS X, Microsoft Windows, 32-bit x86 Linux[1] and the web.[2][3]
History
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 dropped the Java target, later replacing it with a Windows target and database support. This was promised for version 1.0 and was eventually pushed back to version 2.0, although it contained many bugs when finally released. The IDE is now available for Microsoft Windows, Mac OS X, and 32-bit x86 Linux and can compile applications for Windows (Windows 2000 and higher), Mac OS X (PowerPC, Intel, and Universal Binary) and 32-bit x86 Linux.
With 2010 Release 1, the IDE was renamed REAL Studio. The programming language itself remained under the name REALbasic.
On August 31, 2010 REAL Software Announced REAL Studio Web Edition. REAL Studio Web Edition is meant to abstract developers from having to know multiple web programming languages and offers a single development tool with a drag and drop web page editor for creating a user interface and a single high-level, object oriented language. REAL Studio Web Edition began shipping on December 14, 2010 with REAL Studio 2010 Release 5.
Language features
Realbasic is a strongly typed, case-insensitive language with minimal automatic type conversion, which supports single inheritance and interfaces, class methods and class properties, automatic memory management via 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++. Realbasic also includes delegates, introspection, and namespace support, which allows modules to contain classes, interfaces and other modules.
Framework features
As described in the language reference, its built-in framework supports (Real Software 2011):[4]
- dictionaries,
- declarations to external libraries (dll, dylib)
- Visual Basic datatypes compatibility,
- full Unicode support,
- regular expressions,
- application programming interface calls to compiled C libraries on all supported platforms,
- ActiveX and basic OLE support (on Windows); COM objects are supported,
- Notification icons (on Windows),
- Windows registry (on Windows),
- cooperative threads,
- scripting language embedded in Realbasic programs through RBScript,
- XML parsing and generation,
- console and service application support (Professional & Enterprise editions only)
- Apple events (on Mac),
- Keychain (on Mac),
- Spotlight (on Mac),
- QuickTime (on Mac and Windows),
- sound,
- real-time 3D graphics,
- serial communications,
- sockets (both TCP, UDP and IPC),
- SSL (Professional edition only),
- HTTP, POP3, SMTP and SOAP
The framework functionality can also be extended by creating plugins using the Plugin SDK provided by Real Software. Plugins are created using C/C++ with a variety of supported compilers, including Xcode, Microsoft Visual Studio and gcc. Plugins can support any platform Realbasic supports, but are not required to support all platforms.[5]
Example code
This example writes to a new text file:
Dim t as TextOutputStreamDim f as FolderItemf=GetSaveFolderItem(FileTypes1.Text,"Create Example.txt")If f <> Nil then t=TextOutputStream.Create(f) t.WriteLine(TextField1.text) t.CloseEnd if
This example draws a triangle in a Canvas control. It is placed in the Paint event. The parameter g as Graphics is passed into this event:
Dim Points() as IntegerPoints=Array(10,10,100,50,10,200,10,10)g.ForeColor=RGB(100,200,255)g.FillPolygon Points
The following code creates an internal database and uses SQLExecute to create a table:
Dim db as REALSQLdatabaseDim f as FolderItemDim result as Booleanf=New FolderItem("mydb")db=New REALSQLdatabasedb.databaseFile=fresult=db.CreateDatabaseFileIf db.Connect() then db.SQLExecute("create table invoices(id integer,Cust_ID integer,Amount double, Date date)") db.Commitelse MsgBox "Database not created"end if
See also
- RBScript - related scripting language
Comparable Basic Dialects
Other Programming Languages
References
External links
BASIC programming language |
---|
| Classic | - Altair BASIC
- Applesoft BASIC
- Atari BASIC
- Atari Microsoft BASIC
- Atari ST BASIC
- BASIC A+
- BASIC Programming
- BASIC XE
- BASIC XL
- Color BASIC
- Commodore BASIC
- Dartmouth BASIC
- Family BASIC
- G-BASIC
- GFA BASIC
- GW-BASIC
- HP BASIC for OpenVMS
- IBM BASIC
- Integer BASIC
- Locomotive BASIC
- Mallard BASIC
- Microsoft BASIC
- MSX BASIC
- ScriptBasic
- Sinclair BASIC
- Southampton BASIC System
- STOS BASIC
- TI BASIC (TI 99/4A)
- TI-BASIC (calculators)
- Tiny BASIC
- Turbo-Basic XL
- UBASIC
- Vilnius BASIC
|
---|
| Procedure-oriented | |
---|
| With object extensions | |
---|
| For mobile devices | |
---|
| Microsoft | |
---|
|