Cross Platform Mobile Development

At LiSC, mobile computing plays an important role in carrying out a diverse range of research, with the development experience passed into our undergraduate teaching. Our new Social Computing programme which starts in September also has a strong focus on the moving target of mobile development. With mobile a central theme in what we do in our group I felt now would be a good time to write up some timely reflection on the topic as I recently attended a cross platform mobile event.

Developing mobile applications for a rich user experience is not easy, pretty far from it. You need a deep understanding of the programming languages and development tools for each mobile platform you want to reach. There are pros and cons to going native – it offers the best opportunities for a developer in terms of the end-user experience, by having access to all that the latest and greatest smartphones have to offer in terms of hardware and sensors. However it involves developing an entirely different codebase if you want to reach out to other mobile platforms. For example the top 3 platforms are Android, iOS, and Windows Phone (in that order) – you’d need to develop and maintain an app silo for each of these platforms and submit to different app stores. A massive amount of work.

 smartphone growth

At LiSC we teach native app development for Windows Phone (WP) in our degree programmes, the tools are fantastic, and easily match and best competitors Android and iOS in terms of the developer experience. It’s still not ideal, especially given the current market share of WP. In setting the scene for mobile app dev we tell students this: first and foremost we teach the fundamental approaches in developing mobile applications for any platform that covers design & resource constraints, asynchronous programming, saving state, and cloud-connected. These approaches are universal when developing any mobile app, regardless of platform or tools. Inevitably, students pop the burning question with a critical slant – “why don’t we do development for other platforms as well – why can’t we do Android, iOS AND WP?” There are lots of reasons why we don’t do this, amongst them are setting up multiple development environments, emulator configuration complexities, and different hardware needs in the case of iOS – not to mention the unrealistic requirement of having to learn three sets of completely different languages and development tools. Note I’m also making the safe assumption they would be disappointed with their mobile app efforts after a few weeks of native Android or iOS dev – I know I was, in fact actually quite bitter about it.

Effective and accessible cross platform ‘one-size-fits-all’ tools usually get a ‘meh’ response from seasoned mobile developers, likely been let down by poor experiences in the past. It’s a big deal for folks who make a living out of developing commercial mobile apps, and in recent years we have seen a number of cross platform tools emerge trying to address the issue. For example Phonegap/Cordova, Appcelerator’s Titanium, and Xamarin (formerly Mono) are some of the main tools currently available. They all offer cross platform development in some flavour with their own unique selling point. For example some lean towards HTML5/Javascript, while others have developed their own wrappers around native SDK libraries, and some offer a combination of both. None of these tools are perfect but some stand out more than others. Just a few years ago the best cross platform tools could offer in terms of code sharing was 30-40% across different platforms, now tools such as Xamarin offer 60-80% code sharing – a significant amount which equates to less time and money spent in reaching other platforms.  A big enabler of code sharing growth is the Portable Class Library (PCL)  an approach that allows you to develop and deploy your own code library that can be accessed by any mobile platform. This not-to-be-sniffed-at claim was the hook for me to go and see the guys behind Xamarin at an event in London. The idea was that LiSC could benefit from such tools for our research, with the possibility of passing down our experiences into teaching mobile development to our students.

xamarin2.5

full house at event – lots of indie native iOS and Android developers in crowd

So what is Xamarin in simple terms? It’s a tool that allows developers to use one language, C#, to develop full native mobile applications for Windows Phone, Android, and iOS. You can use the familiarity of Visual Studio or their own IDE. They have done an amazing job of mapping nearly 100% of all native libraries for all platforms onto the C# .net equivalent. For example local storage, databases, phone sensors, cloud services, even iBeacons are all accessible using C#, everything you’d want to do natively you can, and more. Aha! But what about performance? There is very little performance penalty that is worth mentioning, even full blown 3D games run just as fast as you’d expect them to if developed using native languages and tools.

xamarin4

Visual Studio folks were also at the event speaking about the latest features of VS2013

With a plan, I went down to see what all the fuss was about direct from the horse’s mouth. When I arrived at the swish Olympia venue I couldn’t believe the amount of devs that had shown face, was expecting a cosy room with a bunch of nerds trying to pull off some high-jinx. Instead around 300-400 folk were milling about waiting for things to kick off, many of whom where indie native developers – this was a big surprise. Basically everyone was looking for a robust solution to make their life easier in reaching out to multiple mobile platforms. The event was good, live coding demos and candid Q&A. Essentially a walkthrough showcasing what you can expect to achieve quickly, it was impressive. I’m currently using the Business edition for Android and iOS and plan to evaluate it for a few months for its potential suitability as part of our curriculum in the Lincoln School of Computer Science. In the meantime I’ll be keeping a close eye on both Xamarin and Visual Studio for further updates and developments.

As expected, there was a decent post-event drinks-up with MS and Xamarin throwing a private party at local pub The Albion. There was plenty of food and a few decent pints while talking with devs on their experiences of native app dev and what they’d like to get out of cross platform tools. Overall it was well worth the trip and from what I seen on the day I expect Xamarin to grow as a company and pull more developers into their community.

xamrin5

 sooosauges!

Leave a comment

Subscribe Scroll to Top