Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 17th, 2007, 09:46 AM
Registered User
 
Join Date: Jan 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Online Diary - Profiles (Chapter 1)

Hi,

I am just curious why profiles weren't used in chapter 1 for the user's first name, last name and diary id? Is there an advantange to coding like this without profiles?

Thanks for the help,

Al
 
Old January 17th, 2007, 01:05 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Al,

This is an example of the "many ways to Rome". Profiles are a very useful feature, and solve many of these problems related to storing user data. Other chapters in the book do use Profiles, but it's also interesting to see how you can solve a similar problem without using profiles....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old January 17th, 2007, 03:51 PM
Registered User
 
Join Date: Jan 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

Thanks for the speedy response. I am really enjoying the book and finding it very useful. I decided to ask this question after reading several posts that mentioned some possible shortcomings of profiles (difficulty querying and scalability). Have you run into any problems using profiles that new users should be aware of?

Al
 
Old January 17th, 2007, 04:21 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Al,

Yes, you're right, there are problems with the default implementation of Profiles, querying being one of them.

All data is stored as a long string, with another column indicating where each Profile property starts and end. So:

ImarSpaanjaarsNetherlands

can be stored to indicate I have a first and last name of Imar and Spaanjaars and that I live in the Netherlands.
This indeed is very difficult to query for code outside the Profile feature, especially in JOIN queries. Finding everyone from the Netherlands with a first name of Imar is then pretty hard.

But, pluggable providers to the rescue: http://www.asp.net/sandbox/samp_profiles.aspx?tabid=62

The download contains two additional providers: one that uses a custom table with columns you can map to Profile properties, while the other allows you to do the same with stored procedure parameters.

This way, you get the benefits of rapid development with Profiles, while you still have a flexible and accessible data structure.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old January 17th, 2007, 06:05 PM
Registered User
 
Join Date: Jan 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

Thanks again for your help. I downloaded those providers and have already started working with the table one.

Take care,

Al





Similar Threads
Thread Thread Starter Forum Replies Last Post
OnLine Diary- Mobile Version snbelani BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 September 1st, 2008 01:32 AM
OnLine Diary conversion to C# trent BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 August 5th, 2008 10:46 AM
Online Diary Problems gsrai31 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 April 17th, 2008 09:44 AM
ONline Diary Mod Question Mel64081 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 February 8th, 2007 05:18 PM
Online Diary - works! mpremji BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 0 April 19th, 2006 06:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.