1. #1
    Ext User
    Join Date
    Mar 2009
    Posts
    71
    Vote Rating
    0
    J@y is on a distinguished road

      0  

    Default Local state management vs Server session management

    Local state management vs Server session management


    I'm still feeling confuse of session state management in javascript application.

    As I'm moved from the traditional server side programming to the Ajax world, in my point of view, the data carried between the pageload can now be handled in the client side by saving it in the memory, so...can I say that the server side session could be replaced by this way of implementation?


    I know there may have some security issues on it, but I think it could be handled by the server side.

    Anyone can give me some suggestions? thanks

  2. #2
    Sencha User MiamiCoder's Avatar
    Join Date
    Mar 2009
    Location
    Miami, FL
    Posts
    142
    Vote Rating
    2
    MiamiCoder is on a distinguished road

      0  

    Default


    Client-side state management:
    • In some scenarios, it reduces network traffic and/or simplifies your client application, because you are not doing roundtrips
    • Generally, you can store less data than if you used the server side approach
    • You have less control over the integrity and consistency of the state, due to the environment where you're saving it (the client)
    • State is confined to a computer, cannot follow the user
    Server-side:
    • Needs roundtrips to the server and the complexities that come with those
    • You have more control: what, where, how long you keep it
    • Can follow the user accross system boundaries
    You have to decide what's better for your situation.

  3. #3
    Sencha User chesstrix's Avatar
    Join Date
    Apr 2008
    Posts
    117
    Vote Rating
    1
    chesstrix is on a distinguished road

      0  

    Default


    MiamiCoder is spot on.

    A word of warning with client side state management. We turned on the standard Ext cookie state manager on a panel we have that contains 7 tabs with each tab containing a grid and the cookie was over 14K in size and blew the header limits on the web server. Ouch!

    We now run with our own http state provider, based on the Ext one, for that reason alone.

Thread Participants: 2