Why Do I Need OOP?
Most developers have been doing some form of Object Oriented Programming (OOP) for quite awhile now. Sometimes you might not even realize it. If you have been using VB 6 for example, then every control is a class, and you interact with it as an object by setting properties and calling methods on those objects. All you need to do now is to start creating your own classes, properties and methods.
An easy way to start, is take just a few of your global functions and the properties those functions use and put them into a class. This is a good first start to creating your own classes. As you learn this, you will then start to see other ways to encapsulate your data and functions together.
What Does OOP Give Me?
OOP provides many benefits over not using any OOP techniques. You will see the following benefits:
- Eliminate Global Variables
- Modularity: Related data and methods together in one place
- Allows for better unit testing
- Allows you to focus on a smaller set of data & functionality
- Better reusability
- Easier to extend functionality
- Hide Complexity
As you can see, these are huge benefits! We all understand that global variables kill our productivity and make tracking down bugs very difficult. The ability to move data and the functions that operate upon that data into one place make reading code easier, and also contributes to better testing. You are better able to reuse code that is in classes.
If You Don't Use OOP...
Every new technology that comes out uses OOP techniques. If you don't start using these techniques, you could become a dinosaur and be faced with finding a new career. Ok, this is a little harsh, but it is true. If you want to take advantage of WPF, WCF, SilverLight and other technologies, you will need to understand OOP. I hope you will take sometime to really understand this all-important underlying technology on which everything you do these days is based.
Learning OOP is fairly simple. I have written several eBooks on OOP and other .NET topics that illustrate these techniques. We also offer training on many .NET topics, including OOPs. Feel free to email me for more information.