Hi All.
Could anyone point me to a few good examples/tutorials of session state
management?
I'm writing a simple shopping cart and need to maintain state for the
basket and user details etc.
TIA
Regards Luke.
--
There are 10 types of people in this world
Those that understand binary and those that don't
--if you are considering writing something like a shopping cart using session
state to store the user information isnt the most scaleable solution.
http://www.asp.net/StarterKits/Down...index=0&tabid=1
thats a link to asp.net's commerce starter kit.
have a look at the shopping cart implementation.. its very straightforward
yet pretty good implementation of shopping cart.
consider not using session.
Regards,
Hermit Dave
(http://hdave.blogspot.com)
"Luke Vogel" <not@._real_address> wrote in message
news:OgURycdnEHA.536@.TK2MSFTNGP11.phx.gbl...
> Hi All.
> Could anyone point me to a few good examples/tutorials of session state
> management?
> I'm writing a simple shopping cart and need to maintain state for the
> basket and user details etc.
> TIA
> --
> Regards Luke.
> --
> There are 10 types of people in this world
> Those that understand binary and those that don't
> --
>
Good points about not using session for shopping carts.
I suspect your rationale for this would be that sessions consume server
memory so a very busy site could seriously affect the performance.
From your experience, what would be the best way to build a shopping cart.
Are suggesting that the ordered items are stored in a database?
I believe the I Buy Commerce site , also available at asp.net site uses this
method.
- Frank Mamone
"Hermit Dave" <hermitd.REMOVE@.CAPS.AND.DOTS.hotmail.com> wrote in message
news:urThjgdnEHA.3564@.tk2msftngp13.phx.gbl...
> if you are considering writing something like a shopping cart using
session
> state to store the user information isnt the most scaleable solution.
> http://www.asp.net/StarterKits/Down...index=0&tabid=1
> thats a link to asp.net's commerce starter kit.
> have a look at the shopping cart implementation.. its very straightforward
> yet pretty good implementation of shopping cart.
> consider not using session.
> --
> Regards,
> Hermit Dave
> (http://hdave.blogspot.com)
> "Luke Vogel" <not@._real_address> wrote in message
> news:OgURycdnEHA.536@.TK2MSFTNGP11.phx.gbl...
>
"Hermit Dave" <hermitd.REMOVE@.CAPS.AND.DOTS.hotmail.com> wrote in
message news:urThjgdnEHA.3564@.tk2msftngp13.phx.gbl...
> if you are considering writing something like a shopping cart using
session
> state to store the user information isnt the most scaleable solution.
>
http://www.asp.net/StarterKits/Down...index=0&tabid=1
> thats a link to asp.net's commerce starter kit.
> have a look at the shopping cart implementation.. its very
straightforward
> yet pretty good implementation of shopping cart.
> consider not using session.
This project is for a Uni Assignment ... we have been given little or no
direction in terms of how we maintain user and shopping cart data across
webform pages, so saleability is not a major consideration and
simplicity and ease of implementation is higher on the wish list.
I've had a quick look at the IbuySpy spore but it seems way too complex
for what I need to do.
more comments please ...
TIA
Luke.
> Good points about not using session for shopping carts.
> I suspect your rationale for this would be that sessions consume server
> memory so a very busy site could seriously affect the performance.
...And that session vars are stored in memory, so if the server goes down,
so do the values...
...And that if you are using a web farm, the server that generated the
unique session ID may not be the server that handles the next page request.
> From your experience, what would be the best way to build a shopping cart.
> Are suggesting that the ordered items are stored in a database?
Any mission critical application should store it's persistant data in some
form of persistant medium. Databases are the most common way to handle
this.
> method.
It may, using a database for this is the most commom, the most reliable and
the most scalable approach.
> - Frank Mamone
>
> "Hermit Dave" <hermitd.REMOVE@.CAPS.AND.DOTS.hotmail.com> wrote in message
> news:urThjgdnEHA.3564@.tk2msftngp13.phx.gbl...
> session
>
> This project is for a Uni Assignment ... we have been given little or no
> direction in terms of how we maintain user and shopping cart data across
> webform pages, so saleability is not a major consideration and
> simplicity and ease of implementation is higher on the wish list.
If you use session state for this, you may get a good grade but you will be
passing in a solution that would be laughed at in the real world. I guess
it comes down to how much your instructor cares about you solving the
problem or solving the problem correctly.
Connecting to a DB does not have to be complex at all for simple storage and
retrieval of this kind (there are literally thousands of examples of source
code available).
"Scott M." <s-mar@.nospam.nospam> wrote in message
news:uUOPlRfnEHA.716@.TK2MSFTNGP10.phx.gbl...
or no
across
> If you use session state for this, you may get a good grade but you
will be
> passing in a solution that would be laughed at in the real world. I
guess
I agree, but the course is not that specific. The focus from the
textbook is the practical application of using ASP.NET and the web
controls that it provides.
> it comes down to how much your instructor cares about you solving the
> problem or solving the problem correctly.
The shopping cart application is simply a method of demonstrating our
knowledge in the use of static and dynamic webform controls (binding
data to controls from xml, database integration into the app etc) etc.
> Connecting to a DB does not have to be complex at all for simple
storage and
> retrieval of this kind (there are literally thousands of examples of
source
> code available).
I think for the sake of this exercise, I'll run with managing state
without HTTP cookie (cookie munging?) ... it seems relatively simple
to code and implement.
Luke.
> If you use session state for this, you may get a good grade but you
will be
> passing in a solution that would be laughed at in the real world. I
guess
> it comes down to how much your instructor cares about you solving the
> problem or solving the problem correctly.
One more question ... can a cookie contain anything other than text'
I.e. can I save and retrieve an arraylist (of purchased items) to a
cookie?
Luke.
as scott said database is the best approach
IBuySpy portal uses database. Amazon uses database.
Regards,
Hermit Dave
(http://hdave.blogspot.com)
"Scott M." <s-mar@.nospam.nospam> wrote in message
news:ePGqpPfnEHA.3628@.TK2MSFTNGP09.phx.gbl...
> ...And that session vars are stored in memory, so if the server goes down,
> so do the values...
> ...And that if you are using a web farm, the server that generated the
> unique session ID may not be the server that handles the next page
request.
>
cart.
> Any mission critical application should store it's persistant data in some
> form of persistant medium. Databases are the most common way to handle
> this.
>
uses
> It may, using a database for this is the most commom, the most reliable
and
> the most scalable approach.
>
message
state
>
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment