Which Cross-Platform Framework Should You Choose?
When it comes to cross-platform development for mobile, the most popular frameworks are Appcelerator Titanium, Xamarin and PhoneGap. But which one is right for you?
Join the DZone community and get the full member experience.Join For Free
with an aim to become competitive and responsive in the market, the mobile app development companies are trying to deliver apps on as many platforms as possible. however, they face tough times when it comes to sticking to the budget and matching with the speed of the competitors.
since the mobile market is highly dictated by ios, android and windows devices, if you want to develop a particular app, you may atleast need to develop it for these three devices/platforms unless you can afford to ignore one or all these platforms. we know the standard approach that companies follow for developing apps is native development. however, expecting speed and cost-efficiency in native development doesn’t make sense since it requires you to obtain respective sdks and tools of each platform, hire developers of each platform, create multiple code bases and design ui/ux for each platform exclusively.
in these cases, it is more sensible to follow what modern companies and app developers do i.e. ‘write once and run anywhere’ with cross-platform development since it allows you to develop apps that can run on multiple platforms. with cross-platform development, you can reduce the cost of development below the threshold of the total sum of native development costs for each platform.
when it comes to cross-platform development for mobile , the most popular frameworks that come to one’s mind are appcelerator titanium, xamarin and phonegap. all these frameworks solve the purpose of developing a single app for multiple platforms. however, there are vast technical, business and philosophical differences.
so which cross-platform development should you choose? which framework is easier, better and supports your requirements?
let us take a deep dive into all these three cross-platform frameworks and try to find out which one suits you best.
phonegap is an opensource and simplest cross-platform framework compared to xamarin and titanium. it allows creating mobile apps utilizing web apis, i.e. it wraps up web applications in a native app shell and then implements them on native stores for different platforms. it uses a cloud-based service called 'build' with which you can compile apps for several operating systems without the need to install sdks of each platform.
- small and simple native api sets enable easy porting to different environments.
- supports all platforms and operating systems which includes ios, android, windows phone 8, blackberry, firefox os and ubuntu.
- lower performance of apps as the original codes of the app remains that of a web app and launches via a web browser. this means the performance of phonegap apps doesn’t come close to native apps
- too many fragmented libraries and frameworks at a very basic level
user interface of app varies depending on the quality of web view rendered
- better performance due to native api usage, which also gives access to elements and features of ios and android
- the look and feel of titanium apps are better than apps built on other platforms as the ui is essentially native
- no support for third-party libraries
- difficulty in developing complex applications
since it doesn’t use html5 and css, the animations and dom elements are laggy and less responsive
xamarin, originally called monotouch is another cross-platform framework that has picked up the development market with its own ide. it works on c# within .net framework and allows you to create native apps by utilizing native apis and uis of each platform.
xamarin comes with xamarin.forms library which allows you to write native uis for once and then share and convert them to platform-specific uis. xamarin currently supports ios, android and windows platform. it also allows developing apps for blackberry by compiling android apps.
- xamarin has testcloud which allows you to test your apps automatically
- provides 100% code reuse with xamarin.forms ui development using shared code base and logic. this saves a lot of time and resources
- supports patterns like mvc and mvvm
- xamarin.android supports google glass devices, android wear, and firephone
- learning curve is relative. if your team knows c#, it is comparitively easy to get started with xamarin
- does not provide access to certain android specific ui controls.
- impacts load time as it has its own runtime
- does not support sharing of codes outside xamarin environment for native or html5 development
this is just a background analysis of the technical and business differences between phonegap, titanium and xamarin which clearly says – there is no perfect world. the selection still depends on the purpose, scope and resource availability.
let us dig deeper and compare these three side-by-side rationally.
from the above comparison, it is clear that all the three platforms have their own share of features and support. all these frameworks are important in the mobile landscape.
as a company or developer, you should choose the one that meets the requirements and purpose of your solution. none of these are a wrong choice, however, one might be better than the other depending on your requirements.
Published at DZone with permission of Manmay Mehta. See the original article here.
Opinions expressed by DZone contributors are their own.