What is Object Oriented Programming?

Before starting to the topic I want to mention this is a first part of series article about Object Oriented Programming (OOP). As is not easy to cover OOP with detail in couple articles I thought would be better to divide to the pieces. First I will be covering basics of OOP and than I am planning to write about Design Patterns.

Object Oriented Programming

In basic understanding OOP is; making objects from pieces of solution out of existing problem. The goal is to having those objects ready to use for similar problems in future. The advantage of OOP is that you could manipulate each piece of solution fast and easy. Because solution of problem divided many useful pieces, manipulating single piece of solution it’s also fast and easy. Manufacturing systems will be good example for this.


Let’s say a car producer want to produce new car series. Those cars will have same and different features than each other or better to say each series. Let’s assume that number of series might have such as; A10, A11, A12.  All those series have common features such as; air conditioning, music system, navigation system. A11 series as an extra has a rain sensor feature. A12 series as an extra has a rain sensor, air bag, sound control system features.

The common features of three series of car are; air conditioning, music system, navigation system, wheels, doors and etc. Car producer is designing and producing those common features only one time. But using the same materials for three different series of cars. This is the basic working system in OOP. The problem is producing car. First we have to find the way to solve the problem in smart way so there won’t be any problem afterwards. Than solution of problem will be divided to many pieces as possible (of course with the way its make sense). Each piece of solution is becoming object (Class). And combination of all objects is solution of main problem.

How OOP Was Born and Brought New Advantages

OOP is born because existing systems was causing so much money and time. Biggest advantage of OOP is in big projects saves a lot of time and money to do programmer/company. The problems start to come up in 1960’s. Software’s start to get bigger, and manipulating a software it was big problem. If people want it to add some functionality they have to get in thousands lines of code and try to change something in mass. And side effect of this is that they need to spend so much money for this (time = money).
But the OOP programming is different. When you want to add a function or change some functionality all you have to is find the class in structure that you made and than manipulate on direction way you want this class to work. Class in your package is all ready serve a purpose (all ready have a certain job), so you can affect this class easily with out problem.
Also you can use the class which is ready, for your other projects.

Usage of OOP

Main purpose of the OOP is decrease the work hours and not doing same thing over and over again. For example; if there is a animation that you are using so often you may want to write a class for this animation and when you need this animation again, all you have to do is create instance of animation. At the end one way the other you have to write certain amount of code, but like this it will be much more easer to use it over and over again.

From other side you don’t have to make everything with OOP. If there is a application which you will use only ones or is unique for a customer than you don’t have to bother your self to write class. But if you are using backgrounds or database communication in this application, you can write a small class which will do these jobs. So next time you can use this classes for other application.

If you can make the decision process in a good way this will help you to develop your self and also will decrease amount of time you work on projects.

Upshot

In Object Oriented Programming first you will decide what you want to do. And than you start to create system piece by piece (Class). You can manipulate these classes when ever you want how ever you want with easy and quick access. And of course you can use these classes for some other projects to.

In next article I will cover transition from Procedural Programming to Object Oriented Programming.

Take care
Engin!

One Response to “What is Object Oriented Programming?”

  1. [...] Engin Yöyen » Blog Archive » What is Object Oriented Programming? (tags: flash oop) [...]


Leave a Reply