您的位置:首页 > 其它

Summary of Design Heuristics -摘录至Code Complete, Second Edition

2009-02-16 16:53 260 查看
Summary of Design Heuristics More alarming, the same programmer is quite capable of doing the same task himself in two or three ways, sometimes unconsciously, but quite often simply for a change, or to provide elegant variation.
A. R. Brown and W. A. Sampson
Here's a summary of major design heuristics:
Find Real-World Objects

Form Consistent Abstractions

Encapsulate Implementation Details

Inherit When Possible

Hide Secrets (Information Hiding)

Identify Areas Likely to Change

Keep Coupling Loose

Look for Common Design Patterns

The following heuristics are sometimes useful too:
Aim for Strong Cohesion

Build Hierarchies

Formalize Class Contracts

Assign Responsibilities

Design for Test

Avoid Failure

Choose Binding Time Consciously

Make Central Points of Control

Consider Using Brute Force

Draw a Diagram

Keep Your Design Modular
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: