Skip to main content Skip to footer

Xamarin and PhoneGap Comparison

Cross-Platform Development

Mobile application development can be an intimidating thought for many programmers. Most companies wish to develop mobile applications to get their businesses noticed, but many of them may not have personnel with fluency in Objective C or Java. Further, each mobile platform requires its own skillset for successful application development with unique languages, tools, and behaviors. This translates into 3 times the development time of a single application as well as 3 separate projects to maintain. Thus native application development may seem like an imposing and potentially expensive concept. Fortunately several companies have stepped in to ease this burden. There are two major approaches to cross platform development. The first approach is to take what is essentially a web application, and wrap it as a native app (which is the style used by PhoneGap). This approach might appeal most to web developers who are looking to expand into mobile, and provide an application that better approximates a mobile feel than a website. The second approach is to use a cross platform tool that uses a common language to generate native applications (which is Xamarin’s method). Xamarin (and more specifically Xamarin.Forms) allows developers to code once in C# and Xaml to simultaneously develop for iOS, Android, and Windows Phone. As a result, Xamarin is often favored by .NET developers who are looking to expand into mobile development. ComponentOne has tools that could be used with either platform (Wijmo 5 in the case of PhoneGap or Xuni for Xamarin.Forms) so it will be a partially a matter of personal taste which platform will ultimately be better for a company. Both have some strong positives and potential negatives.

PhoneGap

PhoneGap allows software developers to build applications using JavaScript, HTML5, and CSS, and it provides a common API for accessing the features of mobile devices such as sensors and cameras. These applications are hybrid apps being neither fully native (since they’re rendering inside of webviews) nor purely web-based (since they have access to the native Device APIs and are packaged as apps). PhoneGap functionality can be extended via plugins which can provide additional functionality for a given platform. Perhaps most importantly, PhoneGap is open source and free.

Xamarin

We already have some blogs written on the topics of Xamarin.Forms and Mono so I will summarize things here. Xamarin provides a platform to leverage its open source implementation of .NET (Mono) that allows developers to write once in C# and create applications in iOS, Android, and Windows Phone simultaneously using Xamarin.Forms. Xamarin development can be done in either Visual Studio or their own IDE called Xamarin Studio. The platform provides a high level of performance, a large amount of code reuse, and the advantages of using C# and the .NET platform.

Side-by-Side Comparison

Xamarin.Forms

PhoneGap

Developers can code in C# and XAML

Developers can write in JavaScript, HTML, and CSS

Develop for iOS, Android, and Windows Phone simultaneously

Supports iOS, Android, Windows Phone, Blackberry, Symbian, Bada, WebOS

Requires a Xamarin License

Open source and Free

Applications are native

Applications are not fully native

High Performance

Medium Performance

Applications capture the correct look and feel for each platform

Capturing the correct look and feel for each platform often requires extra work

Large amount of shared code

Libraries, frameworks, and platform specific optimizations fragment the landscape

Conclusion

Ultimately every developer will have their own preference for which of these solutions will fit their development plan best. PhoneGap leverages web development skills while Xamarin focuses on .NET skills which is perhaps the most straightforward line to draw. ComponentOne provides tools for mobile application development no matter which path you decide to take.

MESCIUS inc.

comments powered by Disqus