Straight talking 69
by Tim Anderson
We talk to Miguel de Icaza about Microsoft’s Xamarin acquisition, and takes a look at the latest from Embarcadero.
HardCopy Issue: 69 | Published: June 1, 2016
In February 2016 Microsoft announced its acquisition of Xamarin, a company which makes cross-platform tools for writing iOS, Android and Mac applications with C#.
Xamarin itself was co-founded in 2011 by Miguel de Icaza and Nat Friedman, both of whom had worked on the GNOME desktop for Linux and on the Mono project, an open source implementation of Microsoft’s .NET Framework. The origins of Mono go back to the earliest days of .NET, when de Icaza saw early versions of C# and liked it well enough to launch his open source version.
Embarcadero’s RAD Studio 10.1 Berlin
Embarcadero (now part of IDERA) has released RAD Studio 10.1 ‘Berlin’, the latest iteration of its Windows IDE for cross-platform development, including its excellent Delphi visual tools and compiler.
A big change in this version is a new installer which is faster and lets you add and remove features more quickly and easily through a new Feature Manager. There are also numerous improvements throughout the suite. A few notable ones are:
- UF8String and RawByteString support on iOS and Android.
- Android 6.0 support.
- A floating form designer for both VCL and FireMonkey, so you can take more advantage of multiple displays.
- High-DPI awareness in the FireMonkey framework on Windows, and in the IDE itself, improving the appearance and user experience on systems with more than 96 ppi.
- Many improvements to the Bluetooth LE support including Windows 10 platform support.
Microsoft’s investment in Visual Studio does not make it easy for competitors, yet Delphi remains unmatched for fast and highly compatible native code applications on Windows, and improving mobile and cross-platform support now lets developers port their code to multiple platforms.
Microsoft was wary of Mono at first, as was much of the open source community, but the persistence of de Icaza and his team paid off when iOS and Android took off and mobile apps became a huge part of the computing landscape. Microsoft-platform developers with C# skills could use Xamarin’s platform to port code or build C# clients to .NET back-ends. Mac support was also useful, given the growing popularity of Macs, especially at the high end and among developers.
Xamarin’s approach was also cleverly thought through. Each platform has a different user interface (UI) with different controls and features, so an inevitable challenge for cross-platform development is how to achieve high code sharing without compromising the user experience by building applications that do not look or behave quite right.
Xamarin’s initial philosophy was to use cross-platform code only for the non-visual part of the application, and to use the native interface builders for Mac, iOS or Android. This remains an option, but in 2014 the company also came up with Xamarin Forms, a cross-platform UI framework based on Microsoft’s XAML language. Xamarin Forms does not render any controls, since this is still done by the native platform, but it does provide an abstraction that lets you write a cross-platform graphical user interface (GUI).
There are numerous cross-platform mobile frameworks out there, but Xamarin’s tools solved a big problem for Microsoft: how to make it easy for developers to support multiple client platforms with applications that use services such as the Azure cloud platform, Office 365 and SQL Server. Microsoft bundled Xamarin in with Visual Studio 2015 product, the snag being that developers soon discovered that the cost of a Xamarin subscription was likely to be higher than that of Visual Studio.
Democratising cross-platform development must have been a key goal of Microsoft’s acquisition. At the Build conference at the end of March 2016, with the acquisition now completed, Microsoft announced that Xamarin’s tools would be both free and open source.
At Xamarin’s Evolve conference in Orlando, at the end of April 2016, de Icaza told me more about how Microsoft plans to integrate Xamarin’s team and technology. Friedman will now be in charge of mobile development tools at Microsoft, in parallel to the existing Visual Studio and .NET teams, and under the overall supervision of Executive Vice President Scott Guthrie. As de Icaza told me, “Our goal is to help developers go mobile, and hopefully with Azure. What Scott told me was that my mandate is to give developers what they want and my space is mobile, so go make it happen.”
Another key point is that the Xamarin team is largely staying intact. “Nobody is moving. We have a big centre in San Francisco that is mostly marketing and sales, and engineering in Boston. We are not planning to move anyone to Redmond [where Microsoft is based].”
The new .NET world
The Xamarin acquisition should be seen alongside Microsoft’s .NET Core project, its own independent effort to take .NET cross-platform and open source. Both .NET Core and the Xamarin Tools are overseen by the .NET Foundation, a separate forum of which de Icaza has been a director since its formation in March 2014. Microsoft’s .NET Core runs on Windows, Mac and Linux. Now that the two companies are together, might Mono and .NET Core become the same thing? “We are trying to converge in as many places as possible, but it is not very easy. We have done the low-hanging fruit. We have replaced between 40 and 60 per cent. Technically they are all getting merged,” de Icaza said, suggesting this is a long-term goal.
It must be emphasised that .NET Core and the .NET Framework are not the same thing. The .NET Framework is the long-standing and mature implementation of .NET that is integrated and serviced with Windows, while .NET Core is a new cut-down implementation which you deploy with your application. Although much code can be ported easily, it is not just a matter of changing the target of an existing application. In particular, GUI applications are not supported in .NET Core. Xamarin supports cross-platform GUI applications for the Mac, though not with Xamarin Forms; instead you have to build the GUI using Apple’s XCode tools.
Despite these limitations, cross-platform C# and .NET is now the official direction. Following the Xamarin acquisition, you can build a C# application for Windows, Mac, iOS and Android, and get full support from Microsoft.
In the new .NET world, Visual Studio is a more powerful development tool than before. Xamarin has always supported Visual Studio, but now that it is part of Microsoft its integration will improve. The company is already previewing new tools that enable developers to design and build iOS applications without leaving Visual Studio, although a connected Mac is still required in the background. At the Build event, we saw the iOS Simulator running on Windows through remoting technology, so that you get visual debugging entirely within the Windows desktop. The Evolve event brought another announcement, which is the ability to attach an iOS device to a PC using USB, and debug on that device using a round-trip to the connected Mac under the covers.
Many developers now use Macs, and for them as well, the tools for C# and .NET are improving. Xamarin has its own IDE, called Xamarin Studio, which used to be cross-platform but is now Mac only, allowing a new native Mac user interface which is currently in preview. Unlike Microsoft’s Visual Studio Code, which also runs on the Mac, Xamarin Studio is a full IDE, and supports targeting iOS, Android and Mac applications. This is likely to be extended to ASP.NET, giving Mac developers a full-featured tool for targeting Microsoft’s web platform.
“We need to add project support for ASP.NET, Razor, and a couple of other things,” de Icaza told me. His plan (though this is not an official roadmap) is to reuse code written to support ASP.NET in Visual Studio so that it also runs within Xamarin Studio, making it a kind of Visual Studio for the Mac.
The stakes are high because the decline of the PC and the small market share for Windows Phones threaten the long-term success of C# and .NET. Repositioning C# (and incidentally F# as well) as a cross-platform language, and backing it with high quality tools and libraries, means a more secure future for the language, and for those skilled in its use.