File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Characteristics of good OO/object oriented code ?

 
Andy Jack
Ranch Hand
Posts: 257
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I tell if my OO code is good ? What are the characteristics of good OO code and how do we check if our code satisfies them ?
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know the characteristics of object‑oriented code?
  • 1: Encapsulation
  • 2: Data hiding
  • 3: Classes responsible for themselves
  • 4: Simple methods which do one thing each
  • 5: Multiple classes similar in size
  • 6: Correct use of inheritance, composition, etc.
  • 7: Cohesion versus coupling
  • 8: Conventions about naming, indentation etc.
  • 9: Correct use of static members
  • And there are bound to be lots more which I can’t think of in the time I have available.
     
    Andy Jack
    Ranch Hand
    Posts: 257
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Campbell Ritchie wrote:Do you know the characteristics of object‑oriented code?
  • 1: Encapsulation
  • 2: Data hiding
  • 3: Classes responsible for themselves
  • 4: Simple methods which do one thing each
  • 5: Multiple classes similar in size
  • 6: Correct use of inheritance, composition, etc.
  • 7: Cohesion versus coupling
  • 8: Conventions about naming, indentation etc.
  • 9: Correct use of static members
  • And there are bound to be lots more which I can’t think of in the time I have available.


    Thanks...i appreciate the nice list you made for me. Is there a book which shows some of these concepts in use ?

    Tears of joy meme
     
    Campbell Ritchie
    Sheriff
    Pie
    Posts: 47293
    52
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Any decent book should show you all those features.
    And “you’re welcome”
     
    Andy Jack
    Ranch Hand
    Posts: 257
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Campbell Ritchie wrote:Any decent book should show you all those features.
    And “you’re welcome”


    Can I get some more of those. I need all the technical words so that I can look them up.
     
    Marcos Vidolin
    Greenhorn
    Posts: 28
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    These books can help you to get the answers: Effective Java (Joshua Bloch) and Clean Code (Robert C. Martin).
    It's a great reading for all Java developers.

    []'s
     
    Paul Clapham
    Sheriff
    Pie
    Posts: 20203
    26
    MySQL Database
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Andy Jack wrote:I need all the technical words so that I can look them up.


    Here you are again asking for a complete list of something which doesn't have a complete and universally agreed list.
     
    Andy Jack
    Ranch Hand
    Posts: 257
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Paul Clapham wrote:
    Andy Jack wrote:I need all the technical words so that I can look them up.


    Here you are again asking for a complete list of something which doesn't have a complete and universally agreed list.


    I thought there might be such a list. But, we could have a list which combines lists by various schools of thought or various people. So, we can see what perspectives exist in the industry.
    Then, we can see which we agree with.

     
    Paul Clapham
    Sheriff
    Pie
    Posts: 20203
    26
    MySQL Database
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Andy Jack wrote:But, we could have a list which combines lists by various schools of thought or various people. So, we can see what perspectives exist in the industry.


    Sure, you might be able to do that. It might be a good PhD thesis topic for somebody. But you can't expect somebody to produce that list on demand for a question on a forum. Please try to be realistic.
     
    Andy Jack
    Ranch Hand
    Posts: 257
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Paul Clapham wrote:
    Andy Jack wrote:But, we could have a list which combines lists by various schools of thought or various people. So, we can see what perspectives exist in the industry.


    Sure, you might be able to do that. It might be a good PhD thesis topic for somebody. But you can't expect somebody to produce that list on demand for a question on a forum. Please try to be realistic.


    No, i did not expect it all at one go. Everyone can throw in a couple of bits and make a big post with lots of points.
     
    I agree. Here's the link: http://aspose.com/file-tools
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic