O'Reilly logo

REALBasic: TDG, 2nd Edition by Matt Neuburg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Objects, Classes, and Instances

Consider programming as a way of thinking, and code as a way of speaking—a language. The programmer thinks about what the program is supposed to do, and then expresses this in code. An object is a programming construct which assists the programmer both in thinking and in speaking about the program, both in organizing and in coding. The program works as if it consisted of autonomous bundles of functionality—the objects. These objects are somewhat like the bundles of reality, the “things,” the “objects,” in terms of which we perceive and describe the natural world. Thus, the use of objects in programming makes the programmer’s thought and speech about the program more natural, which in turn makes programming easier.

What are the objects of which a program is constructed? In general, that’s up to the programmer, who, rather like some divinity creating a small universe, dictates both what objects should populate that universe (“Let there be light; let there be the sun; let there be the earth”) and what those objects should do and how they should interact (“Let the sun make light to shine upon the earth”). Such power may seem daunting, almost paralyzing, rather than helpful. Where to begin? If there were an easy answer, there wouldn’t be approximately six gazillion books about designing object-oriented programs.

REALbasic both enforces object-oriented programming and helps you with object-oriented design. Before you write a line of code, the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required