Wednesday, April 17, 2013

Mobile Framework



PhoneGap vs Titanium

titaniumphonegap
One of the most common technical discussion topic when planning to develop any mobile/web app is selection of right framework. There are various HTML5 frameworks that help developers by providing CSS styling and APIs to cut short the pain of dealing with HTML5. When it comes to development of mobile apps, there are two famous solutions for cross platform development, PhoneGap and Appcelerator Titanium.
Architecture
PhoneGap is HTML/JS/CSS. PhoneGap is not just a native wrapper of a web app. Apps developed using PhoneGap are web apps running inside a UIWebView control. Through PhoneGap API, the “web app” has access to the mobile functions such as geolocation, camera etc. On the other hand Titanium doesn’t compile your HTML, CSS or Javascript code into “native bits”. They are packaged to resources as executive bundles much like an embedded image file. When an application runs, these resources are loaded into a UIWebView control and run there as Javascript code. From architectural standpoint these two frameworks are very similar.
Flexibility
Apps built using Titanium are native and they can’t be reused among different platforms.
Code once, deploy everywhere- PhoneGap promotes code reusability and portability so that same code can be deployed among different various mobiles, tablets and TV with minimal change. In fact when done smartly, the same code base can be used to create mobile apps as well as the mobile website.
Performance
One advantage of Titanium over Phonegap is that Titanium provides access to device native UI functionalities, which means Titanium apps are native apps developed using web technologies. PhoneGap does not expose many UI components to the JavaScript. Apps developed using PhoneGap are web apps running inside a UIWebView control. Titanium Apps become native apps whereas PhoneGap apps start their life as WebApps and die as web apps.
Licensing
Phonegap used to be under MIT license but is now Apache licensed just like Titanium.
PhoneGap Build
One more cool thing with using PhoneGap is their PhoneGap Build services, which lets you package mobile apps in the cloud. Upload your HTML, CSS & JavaScript assets to PhoneGap Build and they will compile it for you.
Summary
If you are looking to create an app with native look and feel using your existing web development skills Titanium is the right choice, but if you want to be able to “port” your app to various platforms and devices more easily, PhoneGap is the one to go for. There are more than 80,000 apps developed using PhoneGap as of July 2012. Letsgomo has created some great apps using Phonegap and a few of these have even been featured on Apple App Store and Google Play Store.

Source: http://letsgomo.com/mobile-frameworks/the-great-framework-battle-phonegap-vs-titanium/


And the winner is: PhoneGap! The reasons why are actually simple.
PhoneGap and Appcelerator Titanium are both very popular open-source JavaScript frameworks for packaging and deploying mobile applications. At Universal Mind, we have clients that leverage both and clearly both frameworks have countless successful implementations on numerous platforms. However, there are enough significant differences between the two products that it doesn’t really make that much sense to compare them directly. The fundamental difference is that PhoneGap is a web-based solution where Appcelerator Titanium is a pure JavaScript API that creates native code. At the core, they serve different functions for an organization.
At this stage we see many more PhoneGap implementations than Appcelerator Titanum for a few simple reasons. Appcelerator allows developers to utilize JavaScript to write a mobile application and compile down to native code for deployment. PhoneGap allows you to utilize HTML5 standards to write your mobile applications while also providing a JavaScript SDK to access native device capabilities. This clear differentiator is not one to be taken lightly. Simply put, if you want to re-use the same code that you deploy with your HTML5 enterprise desktop apps across other tablet, mobile and connected TV platforms, PhoneGap is the right choice.
PhoneGap is a web app that runs in a native web browser view. It lets you utilize HTML5, CSS, and JavaScript, as well as all of the frameworks, like jQuery Mobile, Sencha, etc. described above. Appcelerator is pure JavaScript that compiles to Native Code. PhoneGap supports more platforms but Appcelerator may give you better performance in specific instances.
I have dropped literally 30+ HTML5/CSS/JavaScript applications into PhoneGap, which run without issue on the desktop, and deployed them to Android, iOS, and Google TV without changing one line of code. PhoneGap clearly promotes the most re-use and provides the easiest transition from desktop to mobile.
Appcelerator is like writing a native application with JavaScript and the Titanium SDK. Thus, if your goal is to re-use your HTML5 code base across mobile, tablet, desktop and TV then PhoneGap has to be the natural choice. Appcelerator touts improved performance because they compile to native code but truthfully we don’t see many use cases where this is a differentiating factor. Organizations usually choose Native iOS or Native Android over a “Native JavaScript” option. PhoneGap also supports deployments to more device platforms than Titanium because it doesn’t need to compile to a native form. It is probably a more natural analysis to compare Native Platform development to Appcelerator.
PhoneGap:
  • JavaScript API that provides access to Native Functions
  • Supports HTML5/CSS3
  • Supports Web Standards & Re-use Across Enterprise Apps
  • Supports DOM based JavaScript Libraries/Frameworks
  • Supports the most platforms
Appcelerator Titanium:
  • JavaScript API that provides access to Native Functions
  • Compiles to Native Code
  • Could provide better performance
 Source: http://www.universalmind.com/mindshare/entry/mobile-html5-phonegap-vs-appcelerator-titanium

0 comments:

Post a Comment