The importance of being difficult

There is a religious argument over whether it is important for view parameters to refrain from exposing implementation details such as the underpinning data store.

Why might that be bad?

The public interface of an object is effectively a contract. The consumer of such an interface has an opportunity to depend on the capabilities exposed to it, and once that happens the provider of those capabilities is obliged to guarantee their availability forever.

In short, don’t make any promises you aren’t prepared to keep forever.

Published 05-28-2010 14:49 by peterw