473,473 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

When Profile should be used

By default profile use sql server xpress provider and probabily, caches
stored data when they are requested for the first time,

So the question is: why we should use profile instead of storyng,
retrieving and caching user data manually from a database?

Is it only for an easier approach of state maintenance, or are there
other advantages?

Apr 9 '06 #1
5 1263
Hi,

there are many reasons why profile has got attention.

- Provider model: you can specify yourself how the profile data is stored,
and what format it takes. You can also switch to use another datastore than
SQL Server or completely another than database
- Provider model implementation is hidden behind the API e.g data model
change & data changes do not affect the usage
- You can define in web.config what gets stored in the profile (what is
personalized)
- you can also have anonymous profile, and you can migrate that to "full"
one if user authenticates/registers etc
- you can change the data on the fly (via Profile property on the Page)

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"cipcip" <pa******@tiscali.it> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...
By default profile use sql server xpress provider and probabily, caches
stored data when they are requested for the first time,

So the question is: why we should use profile instead of storyng,
retrieving and caching user data manually from a database?

Is it only for an easier approach of state maintenance, or are there
other advantages?

Apr 9 '06 #2
One of the main advantages of using .NET profiles is convenience. The
functionality most people need to persist user data is all there for
you, so you don't need to write you own code.

It also makes your code modular and independant of any particular
implementation because you're coding against a standard Profile
Provider interface. If you ever need to change how your profiles work,
or the database type, you just plug in a new provider without having to
change your application code.

Profiles are also very easy to manage through web.config, you simply
add a new property to the <profile> section and it automatically
appears as a strongly-typed property of you Page.Profile object.

HTH,

Chris

Apr 9 '06 #3
sincerely thanks for your spontaneous support,

but i have another question related:

i usally manage profile variables manually:

for example i replace this: Profile.Context.Add("email", email)

with this one: myProfileClass.setEmail(email)

setEmail is a function that store user email in a provider like profile
do,
i used this class because i discovered profile after i wrote this
class,
so the question is do you think i should rewrite the intere application
with the use of profile or can i continue use my own class for users
variables managment?

Apr 9 '06 #4
Hi,

nothing prevents you from continue using the ready-made solution (and
nothing breaks it) if you feel the cost migrating to built-in profile is too
big.

Basically the profile implementation could also be creating a provider,
which would use your current profile implementation under the covers (e.g
abstract away from your current implementation, and take ASP.NET Profile as
a top-levbel to it), but that could be a big job.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"cipcip" <pa******@tiscali.it> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
sincerely thanks for your spontaneous support,

but i have another question related:

i usally manage profile variables manually:

for example i replace this: Profile.Context.Add("email", email)

with this one: myProfileClass.setEmail(email)

setEmail is a function that store user email in a provider like profile
do,
i used this class because i discovered profile after i wrote this
class,
so the question is do you think i should rewrite the intere application
with the use of profile or can i continue use my own class for users
variables managment?

Apr 9 '06 #5
It depends how much effort you think would be involved, and whether it
would be worth it. It's probably not worth rewriting just for the sake
of it, but it might improve the long-term maintainability of your code
if it uses a standard ASP.NET 2.0 profile implementation.

It also depends on whether the built-in ASP.NET 2.0 profile provider
supports everything you're doing currently, or whether there'd be
additional work required building a custom profile provider.

Chris

Apr 9 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Ali | last post by:
I did the folloing in python shell: >>> x = 5.07e-25 >>> x = long(x) >>> print x 0L Um... I was under the impresion that long numbers had very very long precision. But, it seems that in...
0
by: Reto Zingg | last post by:
Hi I have here a strange Problem, I monitor with a script our hosting enviroment, so far my script works very well, but unfortunately some of our costumers change to an other HSP :-( and...
3
by: JR | last post by:
Take a look at TestStruct1 and TestStruct2. Clearly, the D2 part of the union is MUCH larger than the D1 portion. I would expect sizeof(TestStruct1)==sizeof(TestStruct2) but that is not the case...
1
by: Obe | last post by:
PLEASE HELP! I'm writing a function to populate DropDownLists from and xml file. I am having a problem getting my XPathNavigator to select any nodes when I attach a schema to my xml document. ...
1
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True...
10
by: Kathy Burke | last post by:
Hi, in trying to discover why my RegisterStartUpScript wouldn't work (I do NOT see it in the HTML source), I looked at the HTML source of a page where I do an XslTransform. First, I get the...
3
by: Dick | last post by:
My simple example is shown below. Please can you explain why the BackColor of the menu's StaticSelectedStyle and StaticHoverStyle are not applied whilst the background-color of the tr and td's are...
3
by: callre | last post by:
when i used javascript onchange() the error is coming "object doesnt support this property" my code is- <script type='text/javascript' language="javascript"> function change() { ...
4
by: amitkumar19 | last post by:
Hello All Of U. Hey I Dont Understand What Happen I Declear Dir(path) Used In Vb6 Code Then It Give The Error Msg Wrong No Argument Or Invalid Property Assigned. Path Is String Var & I...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.