Home

Contents

Programming

 

Object-Oriented Programming

 

Object-oriented programming (OOP) is aligned with our experience of objects in space/time, with their properties and ways of doing business.

---------------------------------------------------------------------------------------------

Index of Page Topics

OOP vs. Procedural Programming

Development Software

Objects, Controls, Windows, Components

Visual Basic

Features for Building Components

OOP

Classes

ActionScript

Component Development Languages

Visual Basic

-------------------------------------------

OOP vs. Procedural Programming

In procedural programming, problems relating to real objects are worked up as algorithms, not as objects; processing is first; data and procedures are defined apart from the objects. In Object Oriented Programming (OOP), objects come first; data and their operating procedures are grouped together. Objects in OOP are packaged as a unit (encapsulated) and contain their own attributes, variables, and methods of operation.

Thus the OOP approach more nearly relates to problem solving in the context of problem solving skills and the objects and processes that characterize the context. In skills settings we are dealing with people performing actions in recognizable, relevant ways in socially purposeful arenas, using tools, implements, machinery, and the like, in fairly well defined social settings to deal with the problems. The individuals have their identifying properties, they behave in certain ways, and can be said to be in one state or another at different times.

Like these real entities, the objects of OOP have their own methods. And, like ordinary objects, they have their own properties and can be said to be in one state or another, depending on the values assigned to their properties.  Thus they can more directly be made to resemble the real situations. Hence the value of OOP. Among the more popular programming systems, Visual Basic and Java are object-oriented development systems.

Back to Index

 

--------------------------------------------------- 

Objects, Controls, Windows, Components

An object is understood to be a combination of code and data that can be treated as a unit, to use Microsoft's words. It could be a control, a form, or any part of an application -- even the entire application itself. (Click here for object details.) Microsoft asks us to think of a window as "a rectangular region with its own boundaries," examples including command buttons and text boxes. You might think of a window as the "opening" or space through which objects of any type are viewed. Objects are then things that fill the windows. Components, too, are objects, but objects with capabilities -- they can do something, and they have a well-defined interface that lets you access what they can do, which is to say they satisfy the component object model (COM).

Back to Index

 

----------------------------------------------- 

Features for Building Components

Visual Basic 5 provides the following features for building components:

Back to Index

 

------------------------------------------------------ 

Classes

Each object in Visual Basic is defined by means of a class.

A class is an abstraction, like the class of all zebras. Object Oriented Programming (OOP) is then the kind of programming whose goal is the development of objects. In Visual Basic, a class has associated with it characteristics like variables, properties, events, methods, functions.

To follow Brewer, properties identify the object; methods tell you what the object can do; and events let you know when the action happens. With the class defined in an application, you can create instances of it, namely specific members that exhibit its characteristics, like big zebras that can run and jump. A class by itself doesn't give you any instances (members) -- it simply defines what the members will be.

Back to Index

------------------------------------------------

Top of Page