-
Header Files
Posted on March 21st, 2009 1 commentThe physical design of a project is a vast topic, I think it will be useful to suggest some simple practices that will help point you in the right direction when you are just starting a project. They can also be applied to a large project but more care is needed.
The first things you can do:
- Make all headers standalone
- Keep your classes in seperateĀ .hpp and .cpp pairs, aim for one class per file.
- Use precompiled headers as an optimisation technique and nothing more.
- Don’tĀ put using namespace in any of your header files, you’ll pollute the namespace.
- Be careful of templates and where they are defined.
-
Physical Design
Posted on March 18th, 2009 No commentsOne of the most important but underrated aspects of a large C++ project is its physical design. The logical design could be the most beautiful thing in the world, yet the physical design can still slow your builds down and generate confusion in a project. You could for instance “modularise” a project by separating it into several DLL’s but still have it heavily coupled due to poorly defined and implemented interfaces.
More often a poor physical design reflects a poor logical design.
What is the physical design?
The physical design consists of all the physical aspects of the project
- The physical files and directories of the project.
- How they are divided into modules or libraries.
- The dependencies between the files and modules.
-
First Post
Posted on March 17th, 2009 No commentsThis is the first post!
I have a filing cabinet full of goodness that I can’t wait to share with you.
More to come…


