Difference between Phonegap and Sencha Touch

AndroidCordovaSencha Touch

Android Problem Overview


I read many documents regarding to Phonegap and Sencha Touch. But i still confused with these two.

I have already created one native android application. Now, i want to create same application which run on multiple device. So, i am confused with these two frameworks.

  • Which is the best one from these two to use and why ?

  • What is the difference between Phonegap and Sencha Touch ?

  • What is the difference between sencha touch and sencha touch 2 ?

Android Solutions


Solution 1 - Android

Sencha Touch is an HTML5 mobile framework. It will help you to develop a web application with HTML, JavaScript and CSS. There are more similar frameworks, like jQuery Mobile or Lungojs.

On the other hand, PhoneGap is a platform that allows you to use mobile devices features, such as GPS, camera, etc., through a JavaScript interface.

In conclusion, to create an app using these technologies, you would implement the design and the logic in HTML5 (with Sencha Touch if you wish), would use PhoneGap to make use of the device features and wrap the app as a native application.

Solution 2 - Android

I would like to add that in Sencha touch its possible to use some device features. Currently i am workin on web app which is build to android device and i am using camera(http://docs.sencha.com/touch/2-1/#!/api/Ext.device.Camera). It works pretty cool.

PhoneGap its self is only layer between javascript and Devices, and generally its only browser, you can use native javascript to operate DOM or you can use frameworks such as JqueryMobile.

Sencha touch is HTML5 framework with awesome js layer. You dont need to use any external frameworks to make application(but if you want sure you can do that). in addition from version 2 they supports native build to android, iOs, and probably blackberry (but here i am not sure i just saw few articles). In new alpha version there is compiler for winphone and IE10.

For my project i made small app using phonegap + jquery but i would say it doesnot look native, too slow. Right now i have rewritten to Sencha Touch and it really cool because i cant see any issues with speed, also i have command line to build project. On the other hand i have small issue that some how sencha touch is not workin on Prestigio device so i will investigate if this issue is in my App or its Sencha touch issues

Oh yes and the most important issue for me. PhoneGap apk file is near 2mb, Sencha touch apk is 600kb. Functionality is totally the same. Evenmore in sencha touch i have added a bit more files :)

Solution 3 - Android

What is the difference between Phonegap and Sencha Touch ?

Sencha Touch is a full and rich framework for creating mobile user interfaces and related data modelling, server communications and business logic. Like Sencha ExtJS for desktop/tablet apps, you code most of the app using a clean MVC design based on Javascript classes. HTML is generated by these classes that treats HTML like an assembly language. This abstracts the differences/bugs/qwerks between the various mobile platform browsers and browser versions saving the developer from most of the pain that HTML based solutions exhibit. Instead the developer assembles higher-level components that provide features such as data modelling and collection binding, drag/drop and UI animations. You also get smooth scrolling and auto data pre-fetching of potentially infinite data collections while internally delivering optimised DOM performance through DOM element reuse. This is made possible because you no longer code the HTML or XML directly, rather Javascript classes create/destroy/recycle DOM elements for you. You can still customise components using HTML templates.

ExtJS 5 now supports ViewModels (MVVM) and so its anticipated that Sencha Touch 3.x will also.

You can use Sencha Touch to create web applications that look and feel like mobile apps OR you can compile them into native apps that ship with either a PhoneGap native wrapper or Sencha's own native wrapper. Sencha is focusing future efforts on the PhoneGap native wrapper over it's own and provides several device related classes that integrate with the PhoneGap APIs and sometimes provides simulations of these APIs when PhoneGap is not loaded (e.g. testing in a desktop browser).

PhoneGap provides a bridge for Javascript code to call native device features (like Digital compass, Microphone, Camera, Battery, Device capabilities/status, File system etc). These are provided via PhoneGap plugins that are re-implemented with identical Javascript interfaces on each OS platform. Plugins may or may not integrate with these hardware or other operating system features (e.g. Barcode scanning plugins use the Camera, while SQLite database engine accesses the local filesystem). PhoneGap ships with several standard plugins but there are currently 550+ Cordova plugins registered.

The PhoneGap team have looked to the future where some of these hardware APIs are making their way into browser APIs and sought to follow the emerging standards in order to ensure as smooth as possible transition for developers as this trend emerges.

Which is the best one from these two to use and why ?

Hopefully you'll now see that they are not competing but rather complimentary technologies that are frequently used together.

You can develop simple PhoneGap apps that don't rely on any other frameworks but today most mobile developers will use PhoneGap with one of the following popular javascript frameworks that do compete with each other: AngularJS, Kendo UI, jQuery Mobile or Sencha Touch.

What's the difference between Cordova and PhoneGap ?

You didn't ask this but it needs answering in this context. The best answer is here.

What is the difference between Sencha Touch and Sencha Touch 2 ?

The original Sencha Touch 1.x and Sencha ExtJS 4.1 are now both deprecated but both used an earlier Javascript class model. Sencha Touch 1.x also lacked many other features including integration with PhoneGap and the new Sencha Command build system.

Sencha Touch 2.x brought in a new smarter and leaner class design that has recently been fully adopted by the ExtJS 5.x . ExtJS 5.x also brings View Models (MVVM to replace MVC) that we expect will be in (yet to be released) Sencha Touch 3.x

If you plan to use PhoneGap and Sencha Touch together, you might also be interested in Sencha Touch Live, a free open source app I created that will significantly boost your productivity. With a single command it can create, compile, deploy and run a new app on a device (or device emulator/simulator). You can then "live edit" the Sencha Touch code one or more device/emulators. You just save the file and it reloads the app onto the devices. It even auto compiles your SCCS files into CCS. So you rarely need to recompile/redeploy/rerun or restart debuggers, just edit and save and immediately view the results on multiple devices. Unlike PhoneGap Developer App it was based on, you can use any of the PhoneGap plugins. Tons of other cool features to enjoy!

Solution 4 - Android

We have been developing with Phonegap and jQueryMobile for more than 5 months. To add some value to this discussion, I have to say that Phonegap has no speed issues with iPhone 5 and new Android 4.x devices because they are extremely fast. If you target iPhone 4 and old devices, you may feel the app kind of slow. That is true. But if develop for the future, Phonegap is a really true alternative if you do not want to get into the Objective-C world. But do not forget that native apps are real thing and other frameworks won´t be the same... they will be pretty close.

Solution 5 - Android

If you are a web developer primarily used to building websites with HTML, CSS, and some JavaScript, you will find jQuery Mobile to be a lot easier and hence quicker to develop with than Sencha Touch. But if you are a professional JavaScript programmer who likes the “MVC way” of doing things, you’ll like Sencha Touch.

Also, jquery mobile gives you a lot of flexibility, which may not always be a good thing

Solution 6 - Android

Why not both ? Phonegap/Cordova is not ui frame work PG/Cordova is between native functions and ui framework. So you can use Sencha and Phonegap together

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDeep MehtaView Question on Stackoverflow
Solution 1 - AndroiddavidsView Answer on Stackoverflow
Solution 2 - AndroidVova BilyachatView Answer on Stackoverflow
Solution 3 - AndroidTony O'HaganView Answer on Stackoverflow
Solution 4 - AndroidAriel ErlijmanView Answer on Stackoverflow
Solution 5 - AndroidTarunView Answer on Stackoverflow
Solution 6 - AndroidJosephy BesimView Answer on Stackoverflow