Cross Platform Application Development

One of the challenges of modern software development is to have applications adapt to devices across various platforms with many different form factors. The devices are more fragmented than ever today and it's an uphill task to develop applications for different platforms and yet have consistent user experience.

That, coupled with the fact that each platform has its own language and development environment, makes it really expensive and time consuming to develop for each OS using it's native platform technology. To mitigate this problem, lot of cross platform technologies have cropped up that promise 'Develop Once, Deploy Everywhere' paradigm. There are pros and cons for each technology and it really depends on the target audience for the application.

The way people use technology to stay connected and consume information has changed dramatically over the last few years and their expectations have increased at the same time. Enterprise users expect the same kind of user experience when using applications for work as they would when they use apps for leisure. It's not uncommon for people to have their personal apps along side the apps they use for work productivity on the same device. They are demanding the apps they use for work are intuitive and easy to use.

So, It's a constant dilemma for the app development teams on what platform and technology to choose when starting out with building a new app.

  • Should we target just one platform or all major platforms?
  • Should we go 'native' or 'cross platform'?
  • What cross platform technology is the best suitable for us?

cross platform software development Native stack offers the richest development experience and they usually provide all the necessary tools (IDE's, Emulators etc) and artifacts required for developing and debugging applications. This approach is certainly the best one if the development team is familiar with the language and they are focused on developing for that platform only.

Applications developed this way don't usually have compatibility problems and there will be wide support from third party library developers. For ex, if you'd like to use a maps in your application, you have plenty of options to choose from. Google, MapBox, OpenStreet Map etc.,

The main disadvantage of going native is, you can only target one platform at a time. Or you need to have a different team for each platform and it's usually the most expensive way to develop applications. The cost of development using this approach will be 2x. The common business logic cannot be shared between different platforms and will have to be re-written for each platform separately.

Most of the app development teams (esp., early stage startups) don't have the luxury of having multiple teams work on different platforms. They can either choose to go with single platform or choose one of the cross platform technology.

Choosing the right technology

There's no silver bullet for choosing the right technology for developing cross platform applications. Most of the major cross platform technologies out there are promising and they help solve the problem for their target audience. It really depends on what kind of effort the team is willing to spend on development and the user experience they wish to give their users.

At Reztech, we've worked with lot of different cross platform technologies and these are our recommendations.

Xamarin

Developing applications using Xamarin gives the developers the closest experience to developing using native technologies. Developers who are familiar with Microsoft stack and C# programming language can take advantage of their existing skill set and develop for iOS, Android and Windows devices at the same time. 80% of the code could be shared between the different platforms, thus reducing the cost.

Xamarin provides a way to target multiple operating systems using just C#. The developers do not need to learn Objective-C, Swift or Java. Also, C# is a modern programming language and the full power of C# is available to be used in Xamarin apps. This makes it possible to develop high quality apps that look and feel like native and at the same time help share code with other platforms.

This is one of my favorite cross platform technology and we've developed several applications for iOS and Android using Xamarin. I couldn't have been more happier. I recommend it all the time to our clients. There is absolutely no way to distinguish between the apps developed using Xamarin and native apps and most of our clients are surprised that this isn't built using native libraries.

Highly recommended.

Use Xamarin if :

  • You want to develop cross platform applications that uses just one programming language for all the platforms.
  • You want your app to look and feel like a native application.
  • You want your app to leverage all the libraries that are available for the native platforms.
  • Reduce development cost by sharing 80% of the code between different platforms.

Disadvantages :

  • Expensive : There is a $2000 price tag for each developer per year. Although, this is peanuts when you look at the grand scheme of things and the amount of money that can be saved by saving developers time.
  • The UI code cannot be shared. It may not save much time for the apps that are UI intensive and do not have much business logic to share.
  • Developers need to install all the native SDK's. They also need to have Mac available for iOS development and Windows 8+ for Windows Phones. Android could be developed either in Mac or Windows.

PhoneGap

PhoneGap is another popular cross platform development tool, where the applications can be developed entirely using HTML, CSS & JavaScript. The applications developed using PhoneGap have no dependency on native SDK's and they can be developed on either Windows or Mac machines. 100% of the code, including UI code, can be shared across different platforms.

The Phonegap applications run in the context of a browser that takes up the 100% of the height and 100% of the width of the browser. Phonegap provides an API to enables developers to have access to native functionality like Camera, Microphone, Location etc., using JavaScript. The developers will only have to interact with the Phonegap API and it in turn handles the communication with the native device OS.

This kind of approach makes it really easy to develop applications quickly since large number of developers are already familiar with HTML, CSS and Javascript. It also expedites the development since Phonegap applications could also be developed using Cloud based IDE's and can be developed from anywhere.

However, the biggest advantage of applications developed using Phonegap is also it's biggest disadvantage. Applications that run entirely in a browser cannot have the same performance as apps that run natively. It's very difficult to match the user experience with native apps.

Technically, Phonegap provides access to device features like Camera, Location, Microphone etc., it's hard to get them to work consistently on lower end Android devices.

Use Phonegap if :

  • Business logic is more important than User Experience.
  • The app doesn't require access to native functionality like camera
  • Application performance is not very critical.
  • You want UI code to be shared 100% across all platforms.

Disadvantages of Phonegap :

  • Cannot have rich user experience that can match native development.
  • Hard to debug and troubleshoot during development.
  • Some of the native features don't work on lower end devices.

Recommended only to applications where having functionality is more important than having a great user experience.

Phonegap has a rich eco system and there are lot of third party libraries that makes it easy to develop application that look as close to native as possible. Things have improved a lot over the last few years and it can only get better from here.

Here are some of the third party libraries we've used here at reztech to develop Phonegap applications.

Developing applications using Cross Platform technologies is a way to go. Each of these technologies have their pros and cons. Should you need any help in developing mobile applications, I'd be glad to help you out.

You can reach out to our team at Reztech or email me directly at preetham@reztech.com

comments powered by Disqus