Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is X?
Message
Information générale
Forum:
Games
Catégorie:
Question
Titre:
Divers
Thread ID:
00752760
Message ID:
00752936
Vues:
24
>>From what I've read so far I understood, that cookies are not the best answer, since browsers can disable them. However, I don't see other alternatives. Writting WEB application without using cookies at all seems to be very complicated.
>>
>
>In some respects, I agree with him - I think you already have the answer, you're just not sure if it's the "right" one. There are only a few ways of maintaining "state", using cookies or some other sort identifier in each and every web request that allows you to identify who is hitting your web server. By using cookies, you get this for "free" (after creating the cookie, the web browser automatically passes this unique identifier on every request). The other way is via hidden form variables or tacking on a unique ID into every URL (this is called "license plating"). License plating is more difficult, in that, if you forget to include this identifier in any of your pages or links, you lose the identifier (and your website won't know who you are anymore).
>
>Any information you need to store about this user (their user ID, basic shopping cart info, etc) is usually stored in that user's session. The session is nothing more than a table that is stored in memory, or, more likely, in a database on the server. You use the cookie or license plate to identify the user on every hit, look up any specific information about the user in the session (think of the cookie value or license plate value as though it were the primary key into the session table; once you know the PK, you can easily look up the correct session record).
>
>Generally, you only use session variables to store the most basic information needed to identify the user (or very simple information that is used frequently, like the user's name). All other information should generally be stored in a database. While you >might< store a users shopping cart in the session, one thing to keep in mind is whether or not you will ever need to do analysis on this information. If the answer might ever be "yes", store it in a real database. Sessions vars are hard to analyze. Databases are designed for that sort of thing.
>
>It sounds like you were thinking about doing something like persisting an object in a session. I agree with him, that's normally not a great idea because it ties up server resources (eg. memory). It is almost always better to reinstanciate objects as you need them.
>
>>For instance, this is his last e-mail, which I don't understand... (it's hard to show, what are my words and what are his, but you can see the difference in styles. He is using lots of "..." in his sentences and also makes lots of grammar mistakes (I do too, though) - ok, I went through and put [Nadya] before my words and [Joe] before his):
>
>His last e-mail was incomprehensible. It's definitely not you ;-)

Thanks a lot, Paul. You cleared up a confusion for me. It's really simple after you explained, but was tough getting in form of questions.

Luckily I'm having a week off next week [I have to stay at home, since my kid's kindergarden is closed for a week], so I can relax and better understand everything. I also have some outstanding VFP tasks (minor), which I'm going to have fixed...

Thanks again.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform