X Window 的设计原则 ( Design principles )

来源:互联网 发布:linux vi命令退出 编辑:程序博客网 时间:2024/04/29 13:52

在 wiki 上看到的 X 设计的七个原则,是软件设计里头挺哲学的东西了,哪怕不遵守,也绝对应当参考这些准则,看自己的设计是否恰当。

  1. Do not add new functionality unless an implementor cannot complete a real application without it.
  2. It is as important to decide what a system is not as to decide what it is. Do not serve all the world’s needs; rather, make the system extensible so that additional needs can be met in an upwardly compatible fashion.
  3. The only thing worse than generalizing from one example is generalizing from no examples at all.
  4. If a problem is not completely understood, it is probably best to provide no solution at all.
  5. If you can get 90 percent of the desired effect for 10 percent of the work, use the simpler solution.
  6. Isolate complexity as much as possible.
  7. Provide mechanism rather than policy. In particular, place user interface policy in the clients’ hands.

The first principle was modified during the design of X11 to: Do not add new functionality unless you know of some real application that will require it.

X has largely kept to these principles since.


来源:www.emsym.com


原创粉丝点击