Posts By Category

Posts By Date

Resources:

C# Books
ASP.NET Books DotNet4All








If you like to support this site, feel free to make a donation to support improvements.

Thank you!

Monetize Your Blog

Small talk about Object Oriented Programming OOP

Someone asked me how long it will take them to learn C++, then how long will it take to learn OOP concepts, so I thought I share my answer here.

OOP is a different concept of programming where you look at pieces of code as objects that have properties & behavior, rather than lines of code that execute one after the other (like in structured programming). There are many concepts to Object Oriented programming, but you might want to just keep in mind that like real life analysis of a problem, when you think of things as closed boxes, it is easier to handle them than if you think of the entire world as one big box... and that's what OOP is. Each piece of logic can be encapsulated in a small unit of code named an object (Encapsulation). To interact with it, you need methods (Interfaces). For it to be identified, it needs properties to hold its data, and some times we'd like to deal with them under different names or pass them in a generic way (Polymorphism). These are all concepts of OOP.

Why need all that? Well, organizing pieces of code this way usually leads to high reusability of these small pieces, so that's usually one thing OOP brings to the game.

Have you ever tried to reuse a script you've written quickly a month ago, even a week ago? Usually it takes you almost 50% of the time you spent originally writing the script just to reuse it again. With OOP, you organize your pieces of code in human-like entities, with names, traits, behaviors, and ways to interact with them. All these concepts help you quickly know what to expect when reusing these objects later. The result is high code reusability.

How long will it take you master all that? Could be 6 months, could be less or more... but don't be frustrated, you'll get there. Keep reading articles and tips here and there and you'll get the idea. OOP is all about common sense in programming.

kick it on DotNetKicks.com

Feedback

Posted on 5/12/2007 6:47:04 PM

6 monts wowww mises harison tels me i can lern multicashun in a cuple weeks but i got to study relly relly hard

Please post your comments:

Name:  
Email (optional): Your email address will not be posted.
URL (optional):
Comments: HTML will be ignored, URLs will be converted to hyperlinks  
Enter the text you see in the box:
 


Copyright © 2007 Yousef Mannaa. All material on this site is copyrighted.
Do not publish or reproduce any of this material without written permission from the Author