Five ‘s Weblog

October 19, 2007

What is real object-oriented?

Filed under: Five's thought — by powerdream5 @ 9:19 pm
Tags: , ,

       From the first time I touched C++ (although C++ is not considered a pure OOP language), I have studied OOP language for more than 4 years. But one question has beed confusing me. What is real object-oriented? Sometimes, it seems that I get the answer, but sometiems, I lost myself again.


     When I started learning OOP language, I compared it with C. Because OOP language has classes and C dones’t have. Therefore, I thought that this character is the biggest difference which can help me distinguish OOP language and NO-OOP language. It is obvious that I made a mistake. I just focused on the differences of appearance between OOP and NO-OOP. In fact, there are a lot of programmer who code in procedure-oriented way when they are using OOP language. I don’t want to deny I am one of them.

       Along with getting more knowledge about OOP, I had to change my opinions about it. It is well known that inheritence, polymorphism and encapsulation are the basics of the OOP. Design patterns take fully adavantage of these merits of OOP language. Therefore, I thought the essence of OOP is applying the characteristics to programming(designing and coding).

       I believed I was right until I heard about anemia model. We can use all kinds of design patterns to realize the business logic, but the persistence classes, which are pojo(plain and old java object), just have a series of properties and pairs of gettter and setter method. According to Martin Flower, Anemia model is based on transaction script(procedure-oriented), because we separate the behaviors and properties of a object. In contrast, we need to combine the behaviors and properties of a object into a class in the OOP world.

      Therefore, I still have no answer to the question that what is real object_oriented. Perhaps I will not get the answer until I stop programming, because I don’t care about the answer any more at that time!



1 Comment »

  1. Hi,

    I want to ask if you can give me the permission to use the oop picture from this post in an educational presentation on oop?

    Thank you.

    Comment by Use your oop picture — February 25, 2010 @ 6:38 am |Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: