At 10:45 11.04.2001 -0700, Andrew Ho <[EMAIL PROTECTED]> wrote:
>JZ>I have found that having a session object is a rather bad idea. What
>JZ>happens if there is such a beast is essentially communication of
>JZ>functions through global variables. So I thought about the cure and
>JZ>found that having server side "objects" that can be retrieved through an
>JZ>id enables "passing of parameters by reference". The client does a
>JZ>request and gets an id with the response, which he will return to the
>JZ>server with further requests to refer to an object created with the
>JZ>first request.
>
>What you describe is exactly, I think, what most people think of when they
>talk about a session object. The client must always somehow indicate who
>they are, so you know what session to associate them with.

No. I have found that having a session object creates maintenance problems. 
People start to pass things on the server side. Pages depend on a certain 
order of calling to work properly. Pretty soon the session object holds 30 
properties (or however you call them). Noboby knows what they do, nobody 
knows why they are there. The (anti-)pattern  for this is "communication of 
functions through global variables".

So what I want is replace the session object by multiple objects that are 
refered to by ids that are _explicitely_ passed as parameters. This looks 
exactly like "passing parameters by reference".

In general I think that people are pretty much obscured by objects. Things 
get pretty straight forward if I think of HTTP requests as function calls.


Joachim

--
"... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden
koennen."                            - Bertolt Brecht - Leben des Galilei

Reply via email to