Feeds

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

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

Boost IT visibility and business value

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.” ®

The Essential Guide to IT Transformation

More from The Register

next story
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
KDE releases ice-cream coloured Plasma 5 just in time for summer
Melty but refreshing - popular rival to Mint's Cinnamon's still a work in progress
Leaked Windows Phone 8.1 Update specs tease details of Nokia's next mobes
New screen sizes, dual SIMs, voice over LTE, and more
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
The Essential Guide to IT Transformation
ServiceNow discusses three IT transformations that can help CIO's automate IT services to transform IT and the enterprise.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Build a business case: developing custom apps
Learn how to maximize the value of custom applications by accelerating and simplifying their development.