Best practice ExtJS DSP session storage

Hi Guys,

I’m relatively new to DreamFactory (absolutely love it) and very new to ExtJS, but I’ve managed to put together a small MVC app which lets me log in to my DSP.

Right now, I am storing the response from /rest/user/session in a class which contains my app config. Is this the best way? How does everyone else do it ?

I see there is a sessionStorage proxy, the advantage being if the user hits F5 in the browser, the session tokens could persist whereas right now they are lost. Does anyone have any examples of how to use this ?

I should point out that I’m not using a Client SDK as such. I’ve imported (Ext.require) the common.DreamFactory.js file from the ToDo example and I’m using it like common.DreamFactory.login(email, password, function(o) { … etc } - again this may be the totally wrong approach - although it has successfully returned a session/token from the DSP.

Thanks for your help / feedback

Tim

Definitely stick with session storage.
We do that in the new javascript SDK coming up.


I’ll see if there’s a more sencha specific example.

Hey Jason

Thanks for the reply.

I’ve been progressing this since my original post and I’ve decided to use a Sencha store which I populate via a memory proxy. This stores the response from user/session so I can access it anywhere in the ExtJS app. It doesn’t survive a browser refresh though, but my next step is to use sessionStorage instead. Once I’ve figured it out I’ll post some code…

Tim