机制与策略的分离

机制与策略的分离

在维基百科上的解释是:

The separation of mechanism and policy[1] is a design principle in computer science. It states that mechanisms (those parts of a system implementation that control the authorization of operations and the allocation of resources) should not dictate (or overly restrict) the policies according to which decisions are made about which operations to authorize, and which resources to allocate.

This is most commonly discussed in the context of security mechanisms (authentication and authorization), but is actually applicable to a much wider range of resource allocation problems (e.g. CPU scheduling, memory allocation, Quality of Service), and the general question of good object abstraction.

翻译如下:(我的理解)

机制与策略的分离是计算机科学中的一个设计准则。它指的是机制(机制是指一个系统实现中可以控制操作授权和资源分配的部分)不可以规定策略,其中根据这些策略可以决定哪个操作可以被授权,以及那些资源可以分配。

你可能感兴趣的:(Security)