Monday, January 6, 2014

Cross platform Mobile Application development



hello guys,

I am again here with my new blog, today I want to share with you my experience with cross platform mobile application development .

sometimes people ask me what should I use sencha or titanium? (A kind of stupid question)

The question should be
First : Tiatnium or Phonegap?
Second : if Phonegap : sencha or Jquerymobile ?

if I choose phonegap what to use with phonegap sencha or jquery
I will disscuss pros and cons of each platform

Lets first start with Phonegap

PhoneGap it self is only a 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 or sencha.

Phonegap is itself very good to use as an option for cross platform app, we can implement any android functionality with phonegap, but we need to use something like jquerymobile or sencha for UI like requirements, here is something that goes against my decision of using phonegap with my mobile application

Now lets discuss few popular options to use with phonegap

Jquery+Phonegap : I can not say anything good about jquery mobile. Here I describe what all issues a developer faces when he starts with jqm along with phonegap for app development

white screen between pages
sometimes a white screen is seen when user switches between pages, this really makes a worse user experience

issue on github that confirms:


bug open for two years now!! tells a lot about JQM with phonegap

side panel won't scroll but background content will

there are many issues as listed here

https://github.com/jquery/jquery-mobile/issues/4024, some of them more than 2 years old

app performas too bad doest look like native just looks like a mobile website. Is this that you want your application to look like?

another issue that is still remanins issues, version after version launch for JQM but issue remains

Oh yes and the most important issue for me. PhoneGap apk file is near 2mb, Sencha touch apk is 600kb. For exactly same functionality.

Jquery + sencha : I did not find any issues like jquery with sencha its cool
but it is something that is a not as easy to learn (especially for native Developers who work Android apps with Java)

Sencha touch is a MVC framework with javascript, If you go with using this option for your app, you should avoid reading official documentation atleast to start with (poor documented)

there are many better tutorials available for Sencha app

here is app with 4+ ratings developed for iPhone platform


for Android

Here is sample sencha app on playstore


Titanium

This is something that I prefer when it comes to cross platform, but by no means I support cross platform app development. Another fact that more than 94% of applications are still native in market

I found Titanium development much faster as compared to native Android, just write a line of code and you are done with integrating google maps to your app !! isn't it exciting :)

Facebook is inbuild, just pass your appId and secret code and done, Cool. Even in Alloy framework with Titanium Twitter is also integated


Drawbacks:
  1. apk size is much much large as compared to native apps.
  2. When it comes to interacting with hardware like I needed a custom camera for my app, any cross platform approach fails here


Xamarin:

This is a newer technology for cross platform app developemnt, this is based on microsoft technologies, Xamarin team is working with Microsoft on this technology, you can try this technology if you are good with c#

I will write more about this in my next blog

Please weigh in with your suggeestions

Thanks