The ASP.NET Provider Model

There's a well-known design pattern behind the ASP.NET provider model—the strategy pattern. Defined, the strategy pattern indicates an expected behavior (say, sorting) that can be implemented through a variety of interchangeable algorithms (say, Quicksort or Mergesort). Each application then selects the algorithm that best fits while keeping the public, observable behavior and programming API intact.

The most notable feature of the strategy pattern is that it provides a way for an object, or an entire subsystem, to expose its internals so that a client can unplug the default implementation of a given feature and plug his own in. This is exactly what happens in ASP.NET for a number of services, including membership, roles, ...

Get Programming Microsoft® ASP.NET 3.5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.