ExtJS MVC アプリケーションでユーザー固有の (セッション) 情報をどこに保存すればよいですか?
ユーザー固有の情報を持つオブジェクトを含むことができるカスタム ベース コントローラーを定義し、それをアプリケーションで使用するのは正しいですか?
例:
Ext.define("MyApp.controller.BaseController", {
extend: "Ext.app.Controller",
session: Ext.create("MyApp.lib.UserSession"),
init: function() {
var me = this;
me.session.init();
/** some code **/
},
doSomething: function() {
var me = this;
var counter = me.session.get("counter");
}
});