27 Apr 2012 11:20 PM #1
Understand the diffrece between extjs and touch
Hi. I written Lots of code using ExtJS 4.0.7 these days
If I want my apps to run on mobiles as well how difficult is it to move to sencha touch?
What are the diffrences?
30 Apr 2012 12:42 PM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
There isn't too much difference. You use the config object quite a bit and there are some syntax differences but the feel of the two is very similar.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
8 Nov 2012 8:19 AM #3
Differences between ExtJS and Sencha Touch
Why ExtJS and Sencha Touch have different cores?
An example is the getHtml method defined in Ext.dom.Element.
el.getHTML(); // I guess it's wrong, in the guides (http://docs.sencha.com/ext-js/4-1/#!/guide/class_system) is written: use getHtml instead of getHTML
el.getHtml(); // I guess it's right
8 Nov 2012 11:22 AM #4
There are a lot of differences, that depending on the complexity of your application can result in a lot of rework to translate it into the Touch framework. So much so in fact some community members have simply massaged their ExtJS apps to run on tablets (primarily for use on the tablet - not mobile as this requires a completely different UI interaction with the reduced screen real estate).
Some differences that essentially have stopped us using shared UI code between Touch and ExtJS:
(some simple stuff we fixed with overrides and im sure Sencha will address in the future)
- Config object is the big difference with generated setters and getters at run-time in Touch
For us to use shared code between the frameworks we had to ensure we used setters and getters and added the accessors via our extensions to the ExtJS framework
- element access in ExtJS - el and getEl no such thing in touch, touch has element
Create an override and add the function getEl() to touch and problem solved with shared code
- Obviously ui components in Touch are lightweight-"ish" and don't have the bloat like ExtJS
- We hit a difference in model and data store behavior between the 2 frameworks where Touch considers any model object with the same id or idProperty as essentially the same object and will update any datastore that has that object in it with a page load - Not so with ExtJS
- A lot of missing features in touch with components that you get with ExtJS- Component validation (vtype), errors.....
- Missing key components. Grid (Yes there is a ux for this but it should be rolled into the framework) We use grids in our Mobile and tablets apps...
Ultimately Touch is very similar to ExtJS and you should understand it very quickly and get a feeling for some of the differences.