The Truth About Cross Platform Xamarin Development
What I’ve learnt about cross platform development in 2015 using Xamarin!
If you’ve heard of cross platform development but are unsure on what the practical implications of developing in this environment are, I’d like to be honest about what the reality is and where the difficulties have been whilst using cross platform development tools like xamarin or unity.
The premise is that using something like xamarin you can reuse essentially 50,60,70 even up to 80% of your code on all platforms. The idea is great as the obvious advantages are clear, logic consistency and time efficiency. These two primary advantages all have further subadvantages such as user experience continuity and lower development costs.
Using xamarin for developing a cross platform app using the fairly new sub platform Xamarin Forms looks at all three main platforms and decids what is common between them. Then they create a library of sub controls that can be used to create a user interface that deploys to its native version. Generally speaking we have found that as you might predict using three platforms over two reduces the percentage of shared code you can achieve because ultimately each platform has its own quirks. We experienced developing a cross platform app on iOS, android and Windows this year in addition to an app on just iOS and android. The difficulties came with having the third Windows platform when it just didn’t render more complex xaml user interfaces adequately to use the one code base. This meant that custom renderers were required to achieve the desired design and therefore reducing the percentage of shared code between platforms. Generally speaking we found that Windows tended to be a spanner in the works when developing iOS and android, and android tended to be a spanner in the works when just developing alongside iOS. The point being in order of difficulty to develop using xamarin it goes iOS, android then Windows with Windows being the most difficult.
That in mind Windows also support the new metro style Windows 10 apps in xamarin forms which effectively means you can build an app on four platforms, which span over conventional desktop environments all the way to iPads, which is pretty powerful if you think of the potential. For example an app where a fixed position is required to take orders on a touchscreen and then waiter pad devices that run the same ordering system on an iPad for a mobile approach to queue busting or mobile order taking. All from one code base, this is very efficient.
But it takes hard work and although we have learnt a lot this year about programming techniques and syntax alone in xamarin forms, I have pondered whether it would have been easier approaching the apps in a purely paltform specific manner. This kind of attitude became prevailent when the requirements for more advanced user interface interaction was desired, for example drag and drop effect (not hugely supported in Xamarin Forms) or things like advanced animation effects or the like.
Despite the above critique of Xamarin use in a commercial setting, this year has seen some huge leaps in the Xamarin platform in terms of compatibility, platform support and stability, and you’d have to go a long way to detract from it’s advantages. Somehow it doesn’t sit well to think that the future of app development will remain a task entailing development repetition and broad skillset experience. The main thing I hear people saying recently is “We want an App” not “We want an iOS App, Android App and Windows App” people just want an app, one app, one code base, one user experience and in my view the only [best] way to achieve this is via a cross platform setting. That doesn’t necessarily mean Xamarin specifically but cross platform development per se.
Currently we only need to cater for a small handful of platforms but in the next five years it’s clear TV is going to be a big part of app development and things are only going to get worse if you have to use a different calibre of developer for every platform.