Jun 22, 2004

The Most Important Design Guideline...

Scott Meyers has just notified his e-mail group about his article in IEEE, entitled, The Most Important Design Guideline, that being "make interfaces easy to use correctly and hard to use incorrectly."

In A Comment on Comments, I discuss how important it is to document interfaces, and I also pointed to Boost.org, which states that the a user's main contribution is the interface.

Most people that will use your classes will use your interface more than anything else. Most people do not want to become a domain expert in the area of code that you have supplied, but rather need to accomplish a function. When we design classes, we should keep this in mind, and rememeber our good Object-Oriented design guidelines. It is important to avoid calling a constructor, then an initialization function, then another function, and then finally get to the main focus of the interface. If this is really what is required to use your interface, some refactoring would do some good or even just adding a Facade.

Scott has made some good points, and it is a good, refreshing read.

Filed In