2011-12-20 52 views
0

我有2个选项来创建存储和跨我的应用程序使用它,但我不能决定哪个是最好的或者为什么: 我可以使用:煎茶触摸:声明商店

Ext.regStore('CustomerList', { 

,并使用

store:'CustomerList', 

Ext.StoreMgr.get('CustomerList') 

OR

HSA.stores.CustomerList = new Ext.data.Store({ 

及用途:

HSA.stores.CustomerList 

哪一个是要处理存储的最佳方式和为什么(在这种情况下)? 欢呼

贾森·罗杰斯

回答

0

我使用MVC与煎茶触摸和创建/访问我的商店按以下方式:

Ext.regStore('Updates', { }); 

var updatesStore = Ext.getStore("Updates"); 

需要注意的是,当我不使用MVC,我创建商店以相同的方式,但通过使用应用程序的命名空间访问它:

app.stores.updates.load();