Ask a Question | Search PSRCHIVE: |
Home
|
Style GuideThe following guidelines are common to most software development projects:
Design patternsDesign patterns are general repeatable solutions to problems commonly encountered in software design. It is very infrequent that a specific software design question has not already been answered, and it saves a lot of time and effort to be familiar with this body of work.
Protect AttributesNo matter how simple your class, all of its attributes (member variables) should be protected or private and access should be mediated through separate set and get methods (member functions). This is not merely a matter of style; the primary benefit of this component of data abstraction is design flexibility:
Avoid Multiple inheritanceMultiple inheritance should be used judiciously; an excellent alternative is the Policy or Strategy behavioural design pattern.
|