I really dig the provider model

As I've been musing lately about how to integrate POP Forums with the new security features of ASP.NET v2, I have to say that I really, really dig the new provider model. Since I had to come up with all of the plumbing once upon a time to set roles and such, this is much easier having to just write the plumbing code to the data store.

The last day or so, between holiday picnics, I wrote a provider for RoleProvider and MembershipProvider, and both have been mostly easy to implement since I had most of the necessary data calls already written to get the data. What an outstanding addition to the framework!

It is clear, however, that when I get around to writing the UI, that I'll have to do two separate versions for the “customer” (I use quotes because, hey, it's not like they're paying for it). I'm not sure that everyone will be willing to plug in my provider, so doing things the old-fashioned way with my People object and the Principal replacement in Global.asax is something I should still allow.

I'm starting to wonder now if I should shift my data layer for the forum to this provider model. As of now, the app loads a the right class implementing the IPopForumsData interface and caches it, calling it for the actual data access (something I ripped off from the www.asp.net forum). This works well enough, and the interface doesn't need its own implementation of any kind. I suppose it's easiest to just leave it.

Programming is a little more fun when you've got new stuff to mess with!

No Comments