PDA

View Full Version : Ext JS 4 porting to Sencha Touch



moccasin
21 Feb 2012, 6:39 PM
New to Ext JS 4 and evaluating...

Question: If an application is developed using the Ext JS 4, is it possible to port it to Sencha Touch? If so, please provide links to reference docs. Thanks for your time.

mitchellsimoens
21 Feb 2012, 7:12 PM
This has been talked about a lot. Parts of it can be but the logic and flow of an Ext JS is going to be different than a Sencha Touch app because the UI is going to be different.

moccasin
21 Feb 2012, 7:35 PM
So for example, if many custom classes were written for Ext JS 4, can these classes be readily used in/ported to Sencha Touch? I know the UI will definitely differ a lot.

mitchellsimoens
21 Feb 2012, 7:37 PM
it depends on the custom class. If it's a widget/view then no. Sencha Touch 2 uses the config object where Ext JS 4 doesn't really use it, it's present but not fully developed like it is in Sencha Touch 2.

moccasin
22 Feb 2012, 7:52 PM
Just to be more specific...

Take for example the application used in the Ext JS4 MVC Guide - http://docs.sencha.com/ext-js/4-0/#!/guide/application_architecture

Can any of the Model and Controller classes be ported to Sencha Touch quickly without re-writing the whole thing? If so, please provide reference links. Thanks.

mitchellsimoens
23 Feb 2012, 6:03 AM
Sencha Touch 2's Controller class won't work 100% with Ext JS 4. You can use this.control in the init method like in Ext JS 4 but for things like refs or views they have to be in the config object where as in Ext JS 4 it doesn't use the config object. The config object for models should be used in Sencha Touch 2 whereas in Ext JS 4 it doesn't use the config object.

moccasin
26 Feb 2012, 7:58 PM
How about data classes - models and stores? According to presentation in SenchCon, Ext JS and Sencha Touch use the same data layer. Does that mean that models and stores (after being defined) can be used within the Ext JS as well as Sencha Touch?

mitchellsimoens
27 Feb 2012, 5:26 AM
Sencha Touch version uses the config object to define things like fields and proxy where Ext JS 4 doesn't.

moccasin
27 Feb 2012, 4:40 PM
Is it safe to say that other than the config object in Sencha Touch, the data classes can be easily ported from Ext JS4 without major rewrites?

dcoan604
27 Feb 2012, 6:04 PM
@Mitchell: Can you please elaborate on the config option and how it applies to ExtJS 4? This is the first I've heard it mentioned in a "not really in Extjs" context....yet from reading the docs, I was left with the idea that every class in ExtJs used it, or could use it...and that it added functionality such as auto creating getters and setters. Yet I've struggled to understand how to use it correctly, and maybe this is why.

@moccasin, sorry for the derail.

mitchellsimoens
28 Feb 2012, 5:52 AM
Is it safe to say that other than the config object in Sencha Touch, the data classes can be easily ported from Ext JS4 without major rewrites?

Setting that aside, shouldn't be a problem.

mitchellsimoens
28 Feb 2012, 5:53 AM
@Mitchell: Can you please elaborate on the config option and how it applies to ExtJS 4? This is the first I've heard it mentioned in a "not really in Extjs" context....yet from reading the docs, I was left with the idea that every class in ExtJs used it, or could use it...and that it added functionality such as auto creating getters and setters. Yet I've struggled to understand how to use it correctly, and maybe this is why.

Ext JS 4 has the ability but the internal classes do not use it. Back when 4.0.0 came out, the config object system wasn't fully integrated as there wasn't time. Also in IE this would further affect performance greatly.