What is Object Oriented Programming?

Object oriented programming has been around as early as the mid 60's, but didn't really become popular until C++ in the early 90's. It is a completely different way of coding than the previous dominant style, procedural programming.

Programming the object oriented way means that your program is separated into objects. These objects are used to help organize data and to encourage reuse of code. It also helps to separate data from actions by clearly giving the programmer a way to distinguish parts of the program.

Look at the world around you. What do you see? You see objects, right?

Let's say you see a chair. A chair is a single object, and it has certain properties. For example, your chair might be black, have wheels, armrests, and have a certain height and width. It may even be a leather chair. All of these characteristics are properties of the object. This same concept is applied to the object oriented way of programming. Objects are created that represent a certain item, and these items have properties. In programming, the properties make up the data portion of the object.

Objects also have actions don't they? A chair with wheels might be able to spin around or roll across the floor. Some chairs have a way to adjust the seating level. This same idea is applied to objects in object oriented languages. Objects can be coded to have actions that they perform, and these objects might use the data they contain in order to identify how those actions work.

Once you define an object in your code, you're then free to duplicate that object over and over again, just as you would if you were to make the same kind of chair over and over again. No need to be repeating the same code, right?

Object oriented programming makes the most sense when you look at how it easily reflects the world around you. It has helped to organize the way people code so that programs are made more efficiently and, in a way, much faster than it would have using older programming methods. It is a standard that will be sticking around for a long time, and I think the best languages to start learning first are those that are object oriented.

Custom Search