-
1 Dec 2011 6:26 AM #1
Why config for Touch MVC applications?
Why config for Touch MVC applications?
I am noticing more and more differences between the Touch and Ext JS 4 MVC conventions. Why in a Touch app must I put everything under 'config' or else it does not work?
It is a bit unintuitive that I must put everything in the config because this is not the way it is done in non-MVC or even in the Ext JS 4 MVC way. Is this going to change in the Touch release, or is this intentional?Code:Ext.define('MyApp.view.Viewport', { extend: 'Ext.Panel', config: { fullscreen: true, layout: 'fit', items: [ { xtype: 'panel', layout: { type: 'card', align: 'stretch' }, items: [ { xtype: 'somelist' } ] } ] } });
-
1 Dec 2011 6:37 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,170
- Vote Rating
- 33
That's because the new class system updates for Touch 2.0. "config" is insanely more powerful and diverse when it comes to Touch 2.0 relative to Ext JS 4.
In Ext 4, I rarely use config, because it doesn't necessarily buy you too much. In touch 2.0, you get a ton more out of the box. The framework code actually uses config all over the place.
Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.


Reply With Quote