The death of People and full adoption of Membership and Profile

Way back in early 2004, when I began writing my book, I wrote Membership and Profile providers that acted as wrappers to the People class in POP Forums, which I used for a very long time to store user data. It seemed like a good plan at the time, because then anyone could jack into the forum's user management using the familiar interface. They couldn't do the opposite though, because all kinds of junk was dependent on People, and there were several relationships in the data there too.

But alas... what I've always wanted was that two-way street for integration. The provider model makes this easy enough, but you more or less have to let this user data live in its own little world. That was always obvious to me, but I've let my own sites and projects dictate the best way to rewrite the forum, which is stupid. That's the very reason I've had to shoehorn things into that format.

So taking a clean-sheet approach, I've spent the last few evenings refactoring the providers and ditching People entirely. It's liberating. There will be some SQL scripting to deal with when it comes time to deploy in my own sites, but when it comes to user data, it should be the last time I ever have to do it. The benefits are already clear with some peripheral projects I want to do, and even a theoretical single-login system across all of my sites. Good times!

I've been so energized to write code again lately. Not sure why. It's odd that when I was slacking, er, being self-employed, I wasn't motivated to do much of anything. Now that I've gone back to a day gig and talk to people smarter than me, I'm spending my free time writing my own stuff again. My personality is seriously odd.

5 Comments

  • Do you plan on publishing any of this new and ispiring code?

  • Someday... it's just so hard to get this stuff unit tested the way I'd like and make sure it's working. But I'm tired of it sitting on my computer unused... so sooner than later I hope.

  • Hi Jeff,



    Are you using the new Membership and Profile APIs in ASP.NET 2.0 to-do this? It sounded like it from your post title but I wasn't sure.



    One thing that has been kind of cool has been to see the number of Membership and Profile providers that have already proliferated out there (I've now seen MySQL, SQLLite, Access, Oracle and more). I'm really hoping the new provider model will make it much easier to "plug and play" backends together much more easily.



    Thanks,



    Scott

  • Yep, using them both. I'm doing it with my own tables in my own database for two reasons though:

    1) I need to migrate several sites, and trying to push it to the standard default ASP.NET-generated database is not straight forward, and

    2) Data stored in my own tables can be indexed and queried however I want.



    But yeah, the point was that I want other people to plug into my app, or have them plug my app into their existing user data.



    I do have to figure out though which field type to use for the profile data's key field, since I use int's for my Membership but others do not.

  • Cool stuff! Let me know if you want any help with the profile data key value -- if you send me email about it I can loop you in with a few folks on the team who might have suggestions.



    Thanks,



    Scott

Comments have been disabled for this content.