State Management

Last Updated: 10/14/2005

Sections above here:
Home  »  Development  »  State Management

Sections below here:

    Topics in this section:
    State Management
    Storage For Delphi Applications
    Complex State & Back Button

    Search Documentation:

    Standard web development tools have automatic session management, but just means that it tracks session info for you. You still have to deal with the state info between pages, or proxy information in and out of a state object. The state objects are also usually limited to strings and data must be marshaled in and out of strings, which is not feasible for complex data types.

    IntraWeb has something better, and that is inherent state management. What the heck is that you say? Some new buzzword? No. Ask yourself this, How do you manage state in a normal Delphi or Windows application? What? You do not have to? EXACTLY! That is how you manage state in IntraWeb.


    Global Variables

    Global variables in general should not be used. If you want to use a global variable that is "global" yet specific to each session you need use variables that are tied to the session as described later.

    If however you want a variable that is global among all sessions you can and should in fact use a global variable. However as IntraWeb is a threaded environment you must take the proper steps to protect the variable from concurrent access.


    ThreadVars should never be used in an IntraWeb application except as temporary storage under controlled circumstances. IntraWeb is based on HTTP which is stateless. This essentially means that threads are not assigned to a specific user and a user is moved between threads between HTTP requests.

    (C) 2002-2009 - Atozed Software Ltd.