Sometimes it is convenient to provide several distinct capabilities, called facets, to the same base object where these capabilities convey different authority or observed behavior. The normal motivation is where there is state that connects these behaviors.

If the base object is shared among different application components, these components may need different access to the base object. One may provide several weaker facets to the object for disemination to different parts of the application thus providing better protection than the more conventional pattern of just one strong capability per instance. The Keykos data byte supports this efficiently.

A common sub-pattern is for some of the facets to some object to convey various sub-authorities to that object. In this case it is common that the weaker capability is polymorphic with the base insofar as only the weaker operations are invoked. When there is a clear power relationship between the facets, it is common for the facet to provide a method (order) that returns any strictly weaker facet.

The wrapper pattern can be used to implement facets when there is reason to not modify the implementation of the base object. The holder of a wrapper or facet is not in a position to distinguish between these two choices.

The Language based Facet

In a language with static types it would seem natural to declare facets for a particular class whereupon each instance of that class would have each of those facets.
Here are some notes on Keykos facet techniques.