Can I assume interface oriented programming as a good object oriented programming?

Posted by david on Programmers See other posts from Programmers or by david
Published on 2012-09-08T17:50:36Z Indexed on 2012/09/08 21:48 UTC
Read the original article Hit count: 299

I have been programming for decades but I have not been used to object oriented programming. But for recenet years, I had a great opportunity to learn OOP, its principles, and a lot of patterns that are great.

Since I've learned OOP, I tried to apply them to a couple of projects and found those projects successful. Unfortunately I didn't follow extreme programming that suggests writing test first, mainly because their time frame were tight. What I did for those projects were

  1. Identify all necessary classes and create them with proper properties and methods
  2. whenever there is dependency between classes, write interface between them
  3. see if there is any patterns for certain relationships between classes to replace

By successful, I meant that it was quick development effort, the classes can be reused better, and flexible enough so that another programmer does not have to change something else to fix another part.

But I wonder if this is a good practice. Of course, I know I need to put writing unit tests first in my work process. But other than that, is there any problem with this approach - creating lots of interfaces - in long term?

© Programmers or respective owner

Related posts about object-oriented

Related posts about development-process