Reading materials on OO design?

This is a discussion on Reading materials on OO design? within the C++ Programming forums, part of the General Programming Boards category; While reading books on general C++ programming is all well and good, not many of them seem to cover OO ...

  1. #1
    Ex scientia vera
    Join Date
    Sep 2007
    Posts
    478

    Reading materials on OO design?

    While reading books on general C++ programming is all well and good, not many of them seem to cover OO design.
    By OO design, I mean whatever it is that will equip me with the skills and knowledge to identify which design patterns should be used in which scenarios.

    Are there a special book that you guys would recommend on this subject? Because I find myself wondering which design patterns I should be using.

    Any resource would be greatly appreciated.
    "What's up, Doc?"
    "'Up' is a relative concept. It has no intrinsic value."

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Last edited by VirtualAce; 12-05-2009 at 01:27 PM.

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,643
    Quote Originally Posted by IceDane View Post
    While reading books on general C++ programming is all well and good, not many of them seem to cover OO design.
    By OO design, I mean whatever it is that will equip me with the skills and knowledge to identify which design patterns should be used in which scenarios.

    Are there a special book that you guys would recommend on this subject? Because I find myself wondering which design patterns I should be using.

    Any resource would be greatly appreciated.
    The first rule of OO desig is to not use OO design - write code as if the member variables were C global variables (just be sure to always be encapsulated, avoid static variables, etc). Once everything is working properly then finish implementing the user interface of the class, run test cases, etc.

    As far as patterns go, remember to include mundane operations as well (anything that can be generalised), and make them free-form functions wherever possible. Focus on templates, and always try to abstract the problem out, eventually you'll build up a toolbox of reusable components that can be connected interchangeably.

    Finally, remember that OO isn't only about "everything as an object" - functional programming is also very important. The main thing, though, is to just use "common sense", and to avoid complicated solutions where more simple simple ones are sufficient.

  5. #5
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    One of our members used to have the quote that class design should not be like a swiss army knife. I think the quote had more to it but the idea is classes should focus on one important aspect of the system and they should be the best at what they do. When you try to make one class do to much or support everything on the moon it quickly becomes a nightmare.

    Limit your inheritance to one concrete derivation if possible and often aggregation or composition will work. I see inheritance used far too often which usually results in a very complicated class hierharchy that is definitely object-oriented but almost impossible to use.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Design problems, help!
    By Coodle in forum C++ Programming
    Replies: 4
    Last Post: 11-03-2009, 08:38 AM
  2. Making child object access parent - best design?
    By IceDane in forum C++ Programming
    Replies: 8
    Last Post: 09-17-2009, 06:48 AM
  3. Reading from a file
    By Wiz_Nil in forum C++ Programming
    Replies: 1
    Last Post: 02-26-2002, 08:31 AM
  4. Need Help with 2D Garden Design Program
    By frgmstr in forum C++ Programming
    Replies: 7
    Last Post: 02-04-2002, 03:58 PM
  5. OO in C
    By Shiro in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 01-05-2002, 10:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21