What Is Object Oriented (Oo) Programming?

A brief overview of the major concepts of object-oriented programming, and what distinguishes it from other, more basic forms of software design.

Though almost everybody who has ever used a computer has used an instance of object oriented programming, only the small percentage of users who have some knowledge of computer programming have any idea what it means, or what differentiates OO programming from other forms of programming. In order to fully understand the qualities that define it, here is a brief overview of how the more basic computer programs operate.

The simplest formats of computing instructions, or programming languages, have a very limited amount of functions that they can perform efficiently. Languages like the Assembly or BASIC languages can only do rudimentary operations such as storing a value in a variable, inputting or outputting information, and making comparisons between variables. An example of these basic instructions would be something like "if variable A is greater than variable B, execute statement C." These languages are severely limited in their utility due to this fact, though it also lends them the advantage of being more compact and efficient.

The first major component of object oriented programming is, logically, objects themselves. The term "object" in real-life situations is a pretty vague descriptor, but in terms of computer software, an object is a group of related and interconnected variables and functions. Just like how a pen has variables that describe its current condition (such as length, thickness, color, ink color) and functions it performs (like writing, clicking open and closed, leaking), a software object's variables reflect its state and method of behavior. There can be as many or as few variables as are needed to describe its current state, and they can be anything from size or memory allocation, to favorite color and mood. An object's methods of behavior are created in a program through the usage of subroutines, which run just those instructions which execute that specific function of the object.



However, defining unique variables and methods every time you want an object in a program would be tedious and inefficient. To this end, object-oriented programming uses the concept of "classes" to simplify the process of creating software objects. A class is essentially an outline or blueprint for the creation of objects. Once a class is implemented in a program, an instance of the object can easily be created, and all instances of that class will have the same variables and functions which define it - though the actual information stored in the object will differ, of course. Another concept of object oriented programming is the idea of inheritance - classes can inherit the features of another class, while adding its own variables and functions to it. This adds a great deal of flexibility and ease to this style of coding.

So object oriented programming is essentially the method of software design which focuses on the creation, manipulation, and interaction of various objects. It also makes use of class creation and inheritance to speed up both the coding and execution of programs. Thanks to these concepts, object oriented programming affords the program author the ability to give his or her creations a greater degree of flexibility and power.

© High Speed Ventures 2011