Our team is trying to get a feel for what techniques
other developers are favoring these days, so here goes:
Assume that a web application is going to use session
variables to store certain pieces of info. Assume that
the development team is trying to solve the problem of
passing data between multiple forms.
Further assume that a state server will be used, so that
web farming is possible. Finally, quantify this with the
statement that no complex data types will be cached in
the Session object.
Now some questions to seed your thoughts:
--Should any variable that is being used on multiple
forms be considered a candidate for becoming a session
variable?
--Should all variables that are being used on multiple
forms become a session variable?
--If one webform gets some user-selected ID, redirects to
a 2nd form that does not need that user-selected ID but
does need to redirect to a third form that needs that
user-selected ID, should that info be passed via
QueryString or cached as a Session var by the first
form? If that info is never used again after those 3
forms have been processed, does that impact the answer at
all?
--If there is a business requirement to not show some
IDs/text/etc as part of an exposed, user-viewable
QueryString param, does that alter your choice of which
means of passing data between webforms you would use?
--Would you ever take a holistic approach, such as the
following: we're already using session vars. session
state is no longer considered a travesty in the post-ASP
world. session vars will be used for all pieces of data
that need to be passed from one form to the next,
excluding postbacks]?
Final note: i have read lots of literature on MSDN about
the pros and cons of different caching techniques.
please try to spare me the academic comments - any real-
world practices that you use and see others using is what
we're really after. any quantifiable benchmarks that you
have done/seen would be awesome. rants are totally
welcomed if there are some rational thoughts provoking
them.
thanks in advance to everyone who participates in this
little debate.
~r
Alvin Bruney - 07 Aug 2003 16:52 GMT
I've run into a lot of problems with scalability of session. It lives in
server memory and this becomes very heavy once your number of users start to
climb rapidly. I stick to Viewstate first for items like what you are
describing assuming that most of my users are broadband. I make a careful
decision as to what goes into session and/or cache. some items can be
promoted effectively to cache freeing up session allocation.
> Our team is trying to get a feel for what techniques
> other developers are favoring these days, so here goes:
[quoted text clipped - 46 lines]
>
> ~r