Design Note #0 - KISS Principle

Revised: 12/9/2009
Home Courses Code Books Handouts Research SWDev WebDev News OtherLinks SiteDesign

CSE681-SWMA CSE687-OOD CSE691-IP CSE775-DO CSE776-DP CSE778-AWP CSE784-SWS

SG - Design


Prime Directives:

Keep It Small and Simple (KISS) ==> need to partition into modules.
Divide and Conquer

Strive for High Cohesiveness in each module ==> focus on a single activity.

Public processing model should be simple even though there may be complex internal details.

Strive for loose coupling ==> refer to abstractions, not implementations.

Use Interfaces to support plug-in instances of any class derived from the interface.

Examples:

  1. The Tokenizer module, in Parser folder collects tokens for analysis of grammatical constructs found in a source code file.
    It supports cohesiveness by hiding complex character manipulations in a private helper functions.
  2. The Parser module, in Parser folder illustrates how binding to interfaces, Rule and Action, allows any instance of a class, derived from the interface, Rule for example, to be plugged into an instance of Parser, modifying the way it carries out its work.