A.3. Software Design Principles

Software design principles underlie the guidelines presented in this book. These principles embrace some common underlying themes including abstraction and separation of concerns. Some of these principles are directly reflected in the guidelines and others are implicit. Here are some generally accepted principles that are embodied in the guidelines:

Well-Defined Interfaces

A well-defined interface is like a great user's manual. The user knows exactly how to perform desired operations and what the result will be. An interface includes the operations that it performs for the user, as well as any access control that designates which users can perform an operation. The Liskov Substitution Principle[*] denotes that any implementation of an interface should respect the definition of that interface.

[*] Barbara Liskov, Data Abstraction and Hierarchy, SIGPLAN Notices, 23,5 (May, 1988). See http://c2.com/cgi/wiki?LiskovSubstitutionPrinciple.

Decomposition and Modularity

Systems should be decomposed into modular components. Components should be designed to be reusable, if possible.

Prioritized Requirements

All requirements cannot be implemented at the same time. Requirements need to be prioritized by the client to determine what should be implemented first.

Abstraction

Abstraction deals with the essential characteristics of a system and the components of the system. Data and control are represented by abstract descriptions, not by specific implementations. ...

Get Prefactoring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.