A number of developers who want to build web applications want to create a mobile version of the same. Ext JS 4 and Sencha Touch seem to be the preferred libraries for the desktop and mobile versions respectively. This is due to the similarities in the API in both. However there are a number of minute differences that you may need to take care while using both.
The table below shows some of the common differences between Ext JS 4 and Sencha Touch.
Concept | Ext JS 4 | Sencha Touch |
---|---|---|
Inheritance |
Ext.define(“MyPanel”,{ extend : “Ext.form.Panel”, items : […], cls : “” }) |
Ext.define(“MyPanel”,{ extend : “Ext.form.Panel”, config:{ items : […], cls : “” } }) |
Viewport | Explicitly create Ext.container.Viewport instance and specify the layout | Viewport instance is created with Card layout automatically |
Rendering to the screen | renderTo:Ext.getBody() | fullscreen:true |
Form components’ label | {xtype:”textfield”,fieldLabel:””} | {xtype:”textfield”,label:””} |
Button event | {xtype:”button”,listeners:{click:””}} | {xtype:”button”,listeners:{tap:””}} |
MVC Controller references | refs: [{ref:”variableName”,selector:””}] | refs:{ variableName:”selector” } |
MVC Controller event handlers | init:function(){this.control({})} | control:{} |
The two about MVC will be changing after SenchaCon 2013. There will be synergy between the two frameworks!
Oh..that’s very good…