I've been playing with the new membership framework in ASP.net 2.0. The existence of this, and other nice things like the login controls are fantastic, but it really lacks the polish of other areas of the new framework. Here's some constructive feedback:
The MembershipProvider looks like a pretty well designed base class, but it should implement more of its interface by default. For instance, when creating your own provider, you're forced to implement Initialize, which configures the instance for the configuration in the web.config. Initialize is defined in ProviderBase, but there should be a default implementation in MembershipProvider that at least configures the values for the required properties such as EnablePasswordReset and such. I ended up using the Reflector to look at the AccessMembershipProvider to implement this method. Also, the majority of the proeprties should have default implementations as well.
The documentation for implementing a MembershipProvider is also pretty inconsistent. Some of the methods are supposed to throw exceptions for failures, some of them return booleans for success/failure (which I thought had been deemed not a good idea), and some of them say they should throw exceptions, but also return a boolean.
The MembershipUser class is also pretty good, but its ISerializable implementation is weird. Deserializing one would leave it in an unusable state since its _Provider field would be uninitialized, and since it's not settable, its useless.
I love the idea and the ease of which you can use the membership concept. (The default “just works”) But to create the “pit of success”, there are some things to address and I hope someone is addressing them.
[UPDATE] Brad Abrams helped me get this feedback to the right people. Thanks Brad. It makes me feel really good about the direction of the .NET and Microsoft as a whole to know I can get my feedback to the people who need to hear it. I may be making incorrect assumptions or drawing the wrong conclusions, but chances are if I am, then others are too.
Remember Me
Page rendered at Monday, October 13, 2008 10:18:38 AM (Pacific Standard Time, UTC-08:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.