An object. Normally we can touch, smell and see an object.  Not so in coding, but we can do one thing just like in real life: interact. Objects form the basis of interaction on the Internet, on your iPad, heck even your toaster may have a basic OOP language.

Now before the programmers reading this get their keyboards in an uproar, there are other language types that are not object oriented.  They are called procedural languages (I'll leave those for another post).  Object Oriented Programming (OOP) has become the dominant language construct in programming because of its superior ability to organize and represent things in the real world as a set of objects in the computer world.  Makes sense right? Need to program something, start with what you know.

If you remember my last post, about class, you can see that making an object is pretty easy.  Now what is it good for?  Let’s take a small, simple example of how objects work together to form more complex computer machinery by architecting objects for a person.

A person looks like this:


and to a computer it looks like this:

public class Person{


Now let's add an attribute to the person. For example, what is the name of the person:

public class Person {
      private string _name = “ryan”;

Attributes in OOP languages are called properties. And finally let’s have the person perform an action

public class Person{
     private string _name = “ryan”;

     public string SayHello()
           return “hello”;


Actions in OOP languages are called methods.

This is just a very simple example. If you extend this to hundreds of objects all working together, you’ve got a powerful tool able to drive an e-commerce system, calculate the cost savings by using your product over a competitor's, or any number of other business and marketing opportunities you can imagine.

Next week’s word: Database. Don't worry, these will get harder.

Tags: wow, matt, development

1 Comment

  • NIK -

    I'll stick to "hand coding"

Add a Comment
Comments are moderated, so your post may not show up right away. Back to top