58

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 ?

1

6 Answers 6

42

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.

6
  • Thanks for your reply. If i use only sencha touch to create my mobile application, then does it support all these APIs?? And one more thing is that which are the requirements if i want to create it using sencha touch??
    – Deep Mehta
    Commented Feb 1, 2013 at 10:11
  • If you only use Sencha Touch you won't be able to use the device features nor to package the app and publish it to the App Store/Google Play, you'd have to upload it to your web server and access it through a web browser. Check PhoneGap docs, is quite easy to use docs.phonegap.com/en/2.3.0/guide_getting-started_index.md.html
    – davids
    Commented Feb 1, 2013 at 10:27
  • Okie...got it buddy....i have already created a sample phonegap application through Eclipse as mentioned in the link you gave me.Now the problem is that i want to use sencha touch for UI specifically in it.So, how can do that?? and what are the requirements to do that??
    – Deep Mehta
    Commented Feb 1, 2013 at 11:33
  • What do you mean by requirements? Just add your assets under the www folder and modify index.html as you wish, as it's going to be your main app HTML
    – davids
    Commented Feb 1, 2013 at 11:37
  • Requirements in the sense that give me the steps to develop sencha touch application because i can't find it. one thing is that i have already downloaded Sencha touch 2.1.0 zip file. But now what i have to do to create application??
    – Deep Mehta
    Commented Feb 1, 2013 at 11:44
38

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 :)

2
  • Thanks for the reply.Can you please give me all the proper steps to develop sencha touch application. Because i cannot find the proper way to do that.
    – Deep Mehta
    Commented Feb 1, 2013 at 11:40
  • 1
    docs.sencha.com/touch/2-1/#!/guide/getting_started i started from this video, it show me how to find documentation and how to start working with it. then if you have question you will ask and learn :) Commented Feb 1, 2013 at 11:58
27

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!

1
  • 1
    Since Secha trippled their licence price I moved to using the popular and free Ionic framework which I also found faster to code so this answer will likely age with time. Commented Nov 22, 2016 at 1:06
9

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.

0

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

4
  • 1
    Yup.. true.. but jqm is damn slow. trust me.
    – Ubaid
    Commented Feb 19, 2013 at 7:33
  • 2
    I think I must agree with this too, Sencha Touch is nice but if you glance down their forums every question is unanswered & its so glitchy. JQM has seriously improved over the past few months and works better on more devices. I made a few apps with ST2.1 and so much is glitchy like the maps centering, and asking about it here on SO or at the Sencha forums has no answer, infact looking at everyone else's questions no one answers anything. Use Sencha if you're prepared to go with their paid support as the framework doesn't work as spec to docs.
    – Tarang
    Commented Mar 31, 2013 at 8:05
  • You didn't mention PhoneGap.
    – Luke
    Commented Aug 21, 2013 at 20:25
  • 1
    Dude, he said to compare Phonegap and Sencha touch. Commented Oct 25, 2013 at 17:19
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.