Feeds

Microsoft, Xamarin give Visual Studio a leg-up for... iOS and Android?

All the world's a mobe following open-source hug

Combat fraud and increase customer satisfaction

Microsoft is giving a leg up to Windows developers building apps for iOS and Android using C# and Visual Studio, with dev specialist Xamarin.

Xamarin has announced support for Portable Class Library (PCL), a subset of the .NET Framework that works across multiple platforms.

The development was made possible after Microsoft last month released PCL to open source.

Members of MSDN are also getting a financial incentive to experiment with the tools and to bring C# onto the non-Microsoft platforms.

They are being offered a 90-day free trial of Xamarin, rather than the normal 30-day period. There are discounted Xamarin subscriptions, such as Xamarin Business for iOS and Android at $1,399 (down from $1,798), and an online Go Mobile training course will be free for MSDN subscribers who sign up before the end of the year.

Nat Friedman, Xamarin chief executive, said the deal really does put Microsoft’s code on non-Microsoft platforms.

“Microsoft long ago had this idea of PCL as a developer tool to share code between different platforms, but their idea of different platforms in the past was Windows Store, Windows Phone, Silverlight and ASP.NET or something like that," he said. "Now they’ve released the PCL reference assemblies as open source, and we are integrating them into Xamarin so you can share code between Windows, Android and iOS."

How deep is the partnership? Developers may be sceptical, based on history. In 2007 Microsoft announced a partnership with Novell to build Moonlight, an open-source version of the Silverlight browser plug-in, but it was a curiously half-hearted partnership. Friedman says this time it is different.

Friedman is closely associated with that history.

Xamarin was formed when Linux shop Novell abandoned Mono, an open-source project to bring Microsoft’s .NET Framework to Linux. It was founded by Miguel de Icaza, the originator of Mono, and Friedman, who’d worked on Mono from its early days.

“I think it’s enormous. It represents a strategic decision that Microsoft made, that people want to build native apps, they want to reach multiple platforms, and Microsoft is trying to give the developer community what they want,” Friedman said.

If Microsoft is serious about becoming a devices and services company, this is a partnership that makes sense, considering that only a small minority of devices run Windows.

Xamarin’s approach to cross-platform development is distinctive in that it does not include the user interface.

'Write once, run anywhere ... you end up with lowest common denominator apps'

Friedman said: “When people think of cross-platform development they think of 'Write once, run anywhere', things like PhoneGap or Appcelerator. You write your code once, design a single user interface. The challenge with this approach is that you end up with lowest common denominator apps, the UI is mediocre because you have to look the same everywhere, it doesn’t conform to the native platform conventions or take advantage of special features on each device.

“We tell you to separate the user interface from the device-specific layer of the app. The rest of the app is what we call the app logic. It contains your authentication code, your network protocols, your data layer, data synchronisation, any business logic, all of that is shared code. What you don’t share in the Xamarin model is the user interface. You build a native user interface for each platform. You still do it in C# so 100 per cent of your app is written in C#, but you get access to all the native APIs.

“On average our developers are able to share about 75 per cent of their code between devices. The approach is focused on portability without sacrificing the user experience.”

Friedman said that since the release of Xamarin 2.0 in February 2013, which included support for Microsoft’s Visual Studio, the platform as grown rapidly. “This year we’ve more than tripled the number of customers, the company grew from 40 people to over 100 now, revenue has grown strongly.”

Xamarin’s tools are ideal for Microsoft platform developers who want to support smartphones and tablets. They can continue to write in C# and to reuse code written for Windows. Xamarin supports Microsoft’s Azure Mobile Services, which uses cloud services as a back-end for mobile applications. “You will see Xamarin appear as a first-class citizen in the Azure Mobile Services web page,” said Friedman.

The price is substantial though. There is a free edition, but it is not much use with its limit of 64k of compiled code, no Platform Invoke to native libraries, and no support for Visual Studio. The Indie edition costs $299 per platform per developer – so you buy it twice if you want to support both iOS and Android – and also lacks Visual Studio support and other features. The one you want is the Business Edition, at $999.00 per platform.

Xamarin is only sold as a subscription. Friedman says that a permanent licence makes no sense. “With new versions of iOS and Android coming out people have to upgrade anyway. There’s no real benefit to a permanent licence.”

Microsoft’s collaboration with Xamarin is good news for C# developers, but falls short of what would be ideal, which is for full iOS and Android support to be bundled with MSDN, at least in the higher editions. “I agree, I think it would be cool,” said Friedman. “We didn’t quite get there yet.” ®

High performance access to file storage

More from The Register

next story
Android engineer: We DIDN'T copy Apple OR follow Samsung's orders
Veep testifies for Samsung during Apple patent trial
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Windows XP still has 27 per cent market share on its deathbed
Windows 7 making some gains on XP Death Day
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
prev story

Whitepapers

Designing a defence for mobile apps
In this whitepaper learn the various considerations for defending mobile applications; from the mobile application architecture itself to the myriad testing technologies needed to properly assess mobile applications risk.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.