301
C / C++ / Re: Managing Large code with Object Oriented Programming
« on: May 30, 2008, 05:35 AM »
There are literally boatloads of examples, and very thick books have been written on the subject... a good way i found to learn OO design is to use a good OO library in one of your applications, and get familiar with it's class design, and then eventually when you are comfortable with it, look into the code for gems.
A good OO library would be one that makes use of all the C++ features when appropriate. Makes use of namespaces, templates (but definitively does NOT over-use templates, which leads to nightmare scenarios), sub-classing, etc...
I'd say the Irrlicht library is a pretty good and simple example to learn from.
I'd also recommend documenting your code with doxygen from the very start (document as you create your classes and functions, not after you're done). I have found that keeping a browser open with a doxygen api documentation page of my own code helps me organize my mind, and it provides a nice overview of what's in your app. It can also create call graphs from your code.
A good OO library would be one that makes use of all the C++ features when appropriate. Makes use of namespaces, templates (but definitively does NOT over-use templates, which leads to nightmare scenarios), sub-classing, etc...
I'd say the Irrlicht library is a pretty good and simple example to learn from.
I'd also recommend documenting your code with doxygen from the very start (document as you create your classes and functions, not after you're done). I have found that keeping a browser open with a doxygen api documentation page of my own code helps me organize my mind, and it provides a nice overview of what's in your app. It can also create call graphs from your code.