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:
00752900
Vues:
23
>>
>>An example, using this case. Here's what I would think of first...what do I needed to do...how will I do it...the what is that I needed to somehow associate a user with his 'cart' which contains 'many items'...how will I do it ? First, you will needed to know your environment...and that is the web...which means that it is 'X' (what is this 'X' ? this is the same question that I had asked before and the most important)...anyway, here's how I would implemented it in a high order...see if you can match step by step on what he could be doing...I will try to do this by ways of a 'walk through'...

>
>It might help if you could give us some sort of context of these messages might mean. Right now, I can't tell which part of the messages you've posted are yours and which are his. I feel like I've walked into the middle of a conversation about a topic I know nothing about. Is he asking about some "X" you described in a previous e-mail? Or is this something he came up with on his own.
>
>However, I'll take a guess as to the context: It sounds like this person is attempting to develop a website that uses a shopping cart. He is having a hard time understanding the concepts behind a stateless website and is trying to put everything into terms he understands. He doesn't know what "stateless" means, doesn't know how to associate a "user" with the shopping cart, etc. Basically, he's completely new to web development and doesn't even know what types of questions he needs to ask in order to understand it all.

Hi Paul,

Actually, that's all his words. He is a developer with experience, I'm a sort of newbie here. So, by asking me questions he wants me to be able to answer them. But I think, I'm getting confused more and more... He, of course, knows the answers, and I would prefer, that he would just explain it to me in a simple way. But he choose that way of communication and so I have to find an answer on each question by myself. So, I'm digging into this world, but something still alluding me. If I would see just one simple material, where all questions answered, it would be so much better...

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.

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):
-------------------------------------------------------
[Nadya]
Well, the way I understand it is that we need to pass information from one page to another. We can not use variables or global objects as we would use in any desktop app. We can do it either in cookies (but I know all cons already), or by storing info in a database (this is what I'm thinking of implementing) or by passing info from Page to Page using either Form or QueryString (depending on the form's method Post or Get) or by using Session variables (but this is not a desirable solution either).
[Joe]
Even if you store information in the database, you still need to use 'cookies' somehow to maintain the state...I supposed that you can use a hidden variable within each page but that would be really nasty and all kinds of things will get into play (i.e. caching)...there's no other way around it...session variables are okay to use as long as you keep it small and keep it simple...why is it a bad idea to store complex objects in a session object ? (what is a

[Nadya Nosonovsky]
Complex objects may require some time to instantiate, so the session could be timeout before the object will have a chance to be created, also since session is created for each user, each variable declaration eats Server resources. If we expect lots of concurrent users, we better keep usage of Session vars as minimal as possible.

[Joe]
You're right about object is too complex to store within the session scope because it eats up server's resources faster that way...but it usually wouldn't have anything to do with the init of the object though...unless your object is created from a multiple joins across multiple table or something complicated and time consuming...
[Joe in the prev. e-mail]
session ? how is it known to the server ? Go to your browser and enabled show all cookies...then close it up and then run some test...look at when you get a cookies of your own vs the server's ? How does the server's cookie look like ? Other thing to look into are expiration of cookies...and the effects of caching <--- could become a HUGH deal).
[Nadya Nosonovsky]
I'm not sure, I understand, how to do it. Could you please tell me exactly, what to do, and give some code?
[Joe]
I don't have anything off hand that I can give you so I will let you think and look around for this one...you needed to know how to access cookies both on the server side as well as on the client side...shouldn't have any problem getting articles and sample codes on this...
[Nadya]
ASP.NET is different in this regard. Not only it hides all these difficulties from the developer, but it can save state.
[Joe]
Actually, ASP.NET is no different...web is still the web...HTTP is still HTTP...granted each version of HTTP adds in some more stuff, but things are no different...in regard to saving state...it just have a better session management (you have more choices in where to store the session variables/objects stuff)...what this mean is that when things break...the developer better understands where all the holes can be...it is still web based...there is just no way around it unless they deploy a special objects that can talk to the server on the backend...but that goes outside of the web so to speak....knowing what you know now, how would you create something similar to ASP.NET session management ? (There are components out there that uses the same principle...thing to look for are sessions in 'web farms'...and we actually use one of them)...
[Nadya Nosonovsky]
We can probably have an Application object (class), which would be sort of "Session" Manager. That's just an idea, I'm not sure, how to implement it.
[Joe]
Actual, no...putting things into the Application Scope is even worst then putting things into the session...at least with session, things will eventually get removed...but with Application Scope...the only way to remove or change things is to reload the app...just use a cookie...and then what else ? what would you do ? Again...you needed to understands Sessions vs Cookies...
[Nadya]
Right now we seem to be "stuck" on the principal question about what to show and how to identify the record. Yesterday I had some picture in mind at the end of the day, but now again there are all the questions and no answers. I don't know, which model to choose. In any case, I'm going to try to write a model.
[Joe]
My advice is always have a pic in a doc (on a paper)...you can pass that around and let ppl mark it up...make comments on it...and then you can revise it...and you can have a history of why things are selected/chosen and all..something good to go back to the ppl later on and say...well...you approved the approach...
[Nadya Nosonovsky from prev e-mail]
Ok, I'm going to have lunch and then back to the drawing board.

The principle question for me is how to identify the user across pages with his cart. That's a question, do you know the answer?
[Joe in prev e-mail]
Yeah...and you already know the answer...
[Nadya Nosonovsky]
I don't think, I do yet... I see the possibilities, but where is the answer? Or there is no "definite" answer in WEB environment?
[Joe in this e-mail]
There is no definite answer...just which technique make sense for which environment/application. Just a matter of tradeoffs...
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform