Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 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 February 27th, 2016, 05:26 PM
Registered User
 
Join Date: Feb 2016
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default Chapter 17: Profiles and Data Storage Questions

I have a general question about the Profiles feature described in Chapter 17. I certainly understand the usage of the Profiles as described in the context of the Planet Wrox example... but I wasn't certain it would be a good idea to use in the case I describe below.

Imagine I'm setting up a web-site for a chess server. Each user has a "profile" in the sense of the chapter. Their name, maybe their favorite openings, their chess rating, etc.

Now imagine they also have one or more chess games that are currently in progress with other users. Should THAT information be also stored in their profile? Or would it be better to have a different database table for that purpose?

I'm sure there are multiple ways this can be done, but I was curious what you think would be the better approach.

Thanks!
 
Old March 6th, 2016, 02:45 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 there,

I would not store that data in profile, but in separate tables instead (optionally in the same or in a different database). You need to be able to query for this data, and also for users other than the current (give me the games that user X is currently participating in) and profile, because of the way it stores the data in the database, makes this very hard.

I would use Profile only for simple user-specific data like a preferred news category.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 7th, 2016, 09:58 AM
Registered User
 
Join Date: Feb 2016
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thanks for your reply.

That was the conclusion I arrived at as well after I saw that the profile is all stored in a giant XML file embedded in the database.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 17 Dynamic Data Website rgrayson99 Beginning Visual Basic 2012 2 March 4th, 2015 04:54 AM
Ch 17 Anonymous Profiles AlanWheeler BOOK: Beginning ASP.NET 4.5 : in C# and VB 1 February 5th, 2014 10:09 PM
Chapter 17-Data Binding Hotshotron25 BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 1 August 20th, 2009 04:10 PM
Chapter 17 - Report Data Source Granted BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 1 February 21st, 2006 10:53 AM
data grid in chapter 17, page 708 gcpeters BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 January 16th, 2004 01:48 AM





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