Continuing in the series of sharing information from the Framework Design Guidelines

 

Expert from 2.2 Fundamental Principles of Framework Design

 

Providing a development platform that is both powerful and easy to use is

one of the main goals of the .NET Framework, and should be one of your

goals if you are extending it. The first version of the Framework indeed

gave developers a powerful set of APIs, but some of them found parts of

the Framework too difficult to use.

 

RICO MARIANI The flip side of this is that it must not only be easy to

use the API, but it must be easy to use the API in the best possible way.

Think carefully about what patterns you offer and be sure that the most natural

way to use your system gives results that are correct, is secure against

attacks, and has great performance. Make it hard to do things the wrong

way.

A few years ago I wrote this:

The Pit of Success: In stark contrast to a summit, a peak, or a journey

across a desert to find victory through many trials and surprises, we want

our customers to simply fall into winning practices by using our platform

and frameworks. To the extent that we make it easy to get into trouble we

fail.

True productivity comes from being able to easily create great products—

not from being able to easily create junk. Build a pit of success.

 

 

Rico really ups the ante here… as he makes very clear it is not sufficient that the API be easy to use, it must be easy to use in the right way… What APIs have you seen that are easy to use in the wrong way?