Re: Managing state



On Oct 15, 5:04 pm, Mark Smith <marksmith5...@xxxxxxxxxxxxxxxxx>
wrote:
On Oct 15, 4:37 pm, Captain Paralytic <paul_laut...@xxxxxxxxx> wrote:



On 15 Oct, 15:38, Mark Smith <marksmith5...@xxxxxxxxxxxxxxxxx> wrote:

I'm working on a project that stores state information in session.
(Specifically the ID of the database entity the user is currently
working with.)

A drawback of this method is that everything gets out of sync the
moment a user opens more than one window.

Are there any frameworks / patterns out there that help manage storing
and retrieval of stateful information like this from the page instead
of session?

Thanks for any suggestions.

Well, asuming that they are interacting with the server using a FORM,
it can be held in a hidden input element in the form.

I know this, but doing it manually for lots of variables will be error
prone and difficult to manage as more pages are added. I was hoping a
component existed that wrapped everything up.

My understanding is .net provides something like this, but as my
platform is unix I was wondering if something like this existed for
php?

There is no way that any server-side toolkit can deal with this
scenario effectively. Certainly with MSIE you can have the same cookie
name storing different values in different browser windows - but this
is not well documented and is not standard HTTP. I have no diea if
this can be used to split an existing session.

The only way to approach a generic solution is to divide the session
into separate areas identified by a secondary handle - which you then
need to propagate through every form and every href on every page.

If you absolutely must do this (I'd strongly recommend that you make
sure sure you've exhausted every other approach) then you might find
it easier to write a standard javascript to automatically rewrite the
href URLs and forms at run time rather than doing it in your PHP code.

C.
.



Relevant Pages

  • Re: State managment
    ... I already tried assigning PageID = Now. ... This works if a user opens the new ... window before the page is posted back. ... Then, if your session ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Managing state
    ... moment a user opens more than one window. ... is not well documented and is not standard HTTP. ... this can be used to split an existing session. ... if the new window is launched in a new process. ...
    (comp.lang.php)
  • Re: [kde] I just noticed: no more crashes! Thanks, KDE team!
    ... ensuring that minimize memory either never, or for file browsing only, ... is selected, and always use a separate window for online banking, so ... a vuln in from a different site open in another window, ... root session as long as it's running in the same X session, ...
    (KDE)
  • RE: How to create a local server (i.e., localhost)
    ... logon user session and hard to automate in a non-interactive service ... Since the webserver.exe is a winform application which has a main window, ... already running on a given port? ...
    (microsoft.public.dotnet.languages.vb)
  • RE: automatic logoff - two scenarios
    ... in order to prevent losing established remote desktop connections or e-mail ... continue the session with a pop-up Yes/No window. ... If the user does not respond after one minute, the pop-up window will ...
    (microsoft.public.windows.server.sbs)