CSE687 - Design Note #1

Prime Directives

Revised: 14 January 2006
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

Lecture #1


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 Project1HelpS06 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 Project1HelpS06 folder illustrates how binding to an 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.