Feeds

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

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

3 Big data security analytics techniques

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

Top three mobile application threats

More from The Register

next story
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Inside the Hekaton: SQL Server 2014's database engine deconstructed
Nadella's database sqares the circle of cheap memory vs speed
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
Oh no, Joe: WinPhone users already griping over 8.1 mega-update
Hang on. Which bit of Developer Preview don't you understand?
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
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
IRS boss on XP migration: 'Classic fix the airplane while you're flying it attempt'
Plus: Condoleezza Rice at Dropbox 'maybe she can find ... weapons of mass destruction'
Ditch the sync, paddle in the Streem: Upstart offers syncless sharing
Upload, delete and carry on sharing afterwards?
prev story

Whitepapers

Top three mobile application threats
Learn about three of the top mobile application security threats facing businesses today and recommendations on how to mitigate the risk.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
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.
SANS - Survey on application security programs
In this whitepaper learn about the state of application security programs and practices of 488 surveyed respondents, and discover how mature and effective these programs are.