2
votes

I'm planning to build a hybrid mobile app, I have already progressed pretty well with the server-side using Express 3, and PAssport for authentication. Now I need to make a decision on what framework or library to use for the clinet-side.

I was wondering if I could get some recommendations and perhaps pros and cons of going with frameworks like Sencha Touch, JQuery Mobile, Phonegap.... and if there is anyother ones that you think it's worth considering please mention them here,

Thanks for any pointers or advice

2
Hello Amir. I was just curious how you were able to build via phonegap a mobile app with nodejs back-end? Do you have any example of a simple nodejs app with simple frontend that you were able to build via phonegap? I can't find any. Thanks a lot.Woppi
You can try this lib which is a comprehensive boilerplate using Ionic (angular) on the client side of the mobile app and node for backend. Hope it helps. github.com/kumartarun/Ionic-passport-AngularAmir Mog

2 Answers

4
votes

JQuery Mobile and Sencha Touch are JavaScript libraries that will let you create an HTML5 application that looks like a native application. Cordova/Phonegap lets you wrap your HTML5 app in native code and provides a common JavaScript API that gives you access to native functionality, like taking a picture with the camera or getting the users Contacts. Another benefit of using Cordova is that it creates native applications for you using the same HTML5 app, so you can publish these files to App stores and increase your distribution. With a JQuery/Sencha Touch only app, you can't distribute on app stores because your hybrid app is simply a website (so, I guess it'd only be a mobile app.)

There are hundreds of blog posts comparing different JavaScript frameworks like Sencha vs jQuery vs Dojo, so you should just go off and do some of that reading. Personally I would suggest Dojo as I think it is the most powerful and enterprise ready framework, but it can have a steep learning curve. One thing I like about Dojo though is the build system, you can pick and choose the modules you want so that you don't have to end up including an enormous .js file like JQuery. I have no idea if jQuery can do this, but a lot of user apps I have seen that use Cordova and JQuery end up including all of jQuery and then jQuery mobile.

If you want to access native device features and/or package the web app as a native app and distribute it on the stores, you should use one of those JavaScript frameworks in combinations with Cordova. (Cordova is the new name for PhoneGap.) Phonegap/Cordova is not really used to build mobile web apps, it's used to extend the capabilities of mobile web apps and allow them to access native device functionality in a completely cross platform way.

2
votes

Ionic is a new framework available for making hybrid apps that I am liking a lot so far. The framework is built with Sass and AngularJS on top of PhoneGap. Ionic just handles the front end so you still build your app with PhoneGap. I found that since it uses AngularJS your javascript code ends up being a lot cleaner and you will save development time making your app slick compared to what you would have to write with jQuery. It also has some beautiful UI elements. The ionic team has done a lot of speed optimizations with the framework so your app will feel more native than your typical hybrid app built purely with PhoneGap. The framework is still in alpha but I have been impressed with it.