The technology of .NET Core makes sense for a cross-platform world. That’s why this is a Microsoft strategy developers need to pay attention to. Some of the more pessimistic feedback about the .NET Core plans tends to underestimate the scope of the changes, or to assume a rather idealized past when .NET was built as a more modular cross-platform stack all along.
Open sourcing .NET doesn’t simply replicate Mono, or even fill in Mono’s holes. Those are just the initial opportunities. Mono is starting to use the ‘reference source’ that’s available for the .NET framework but long term, says Microsoft’s Immo Landwerth, they’ll take .NET Core: “.NET Core is the componentized version of Mono and of the full framework that we work on with Mono; it will over time become the de facto cross platform implementation for our stacks.”
Many of the benefits of open sourcing .NET go far beyond making the code available or even getting it onto other platforms, which is what’s driving Microsoft’s decisions here.
ASP.NET 5 will run on Linux and Mac as well as on Windows, and that’s a big deal for Microsoft. Engaging the community on other platforms gives .NET a brighter future everywhere. But the biggest impact is on the architecture.
Making the development of .NET modular and agile is what Microsoft had to do to make .NET open source, but it’s a huge benefit for the technology itself; it means faster updates with higher quality that are a better fit to what .NET developers ask for. It will also solve compatibility and versioning problems that have plagued .NET developers for years on Windows – and put off many potential developers.
.NET Core and .NET Framework
.NET Core doesn’t mean a new, complete, modular .NET overnight, that’s built once and integrated on every platform; although that’s where Microsoft wants to get to – although that’s not the full story for Windows. The Windows Store and Windows Phone platforms will use .NET Core in the future, just like the Mac and Linux versions of the .NET Core stack. And there will be a Windows version of the .NET Core stack.
But .NET Core is not going to replace the current .NET Framework For one thing, as director of program management Jay Schmeltzer explained to us, “The two are designed to be functionally equal from an API standpoint, as much as possible, and specifically where MVC and Store/Phone apps are concerned. That said, and though many components are identical, they’ll never have an exact 1:1 API equivalency.”
At the moment, Landwerth told us, “we estimate greater than 80% of the APIs are common across .NET Core and the full framework.”
Indeed, the .NET Framework doesn’t go away. Schmelzer says he expects it to be what some Windows developers will stick with. “For Windows Desktop development, the full framework will continue to be the framework for developers using technologies like Windows Forms and WPF while .NET Core will be the framework of choice for developers building Windows Store, Windows Phone and ASP.NET apps.”
.NET Core will get new features first. But .NET Framework will get most of them too because it carries on being what runs .NET on the Windows desktop (and it will get new components on demand as libraries, as well as roughly annual major updates, which also include improvements in WPF that aren’t relevant to .NET Core). You can use portable class libraries or shared projects to share code between .NET Core and .NET Framework apps.
But you don’t have to build twice – or five times if you support multiple platforms. If .NET Core does what you need, build your app there and get far better cross platform support – although not write once, run anywhere.
Cross Platform and .NET Core
It certainly doesn’t mean WPF on every platform, because that’s simply not appropriate. Xamarin’s forms may not be as sophisticated as WinForms but they’re a better approach to doing cross-platform UI because what you get on each platform is the native controls and interface applicable to that platform – not some one-size-fits-nowhere generic look. If you don’t think you can build a serious .NET app in Xamarin, consider that Microsoft used it to build the mobile client app for Intune, its cloud management service, to make it easy to support Android quickly.
Cross-platform isn’t supposed to mean the same everywhere; it means compatible but suiting each platform. Some features — like file access — are on every platform and cross-platform systems have to make those easy. But there are unique features on each platform, as well as different design and interface style; you can’t homogenize those without taking away the reasons people want to use those platforms.
The biggest disadvantage is that it will take time to make the transition. The out-of-band libraries are already in the repository and more pieces will show up as the .NET team moves the code from their internal Team Foundation Server system to GitHub, but it’s going to take a few months just to get .NET Core there, let alone to build on it.
But when Microsoft talks about the “full framework” it’s talking more about the monolithic state of the current architecture, rather than suggesting that what’s built with .NET Core will be only a minimal subset. Moving faster may mean some things will break, but developers will always have the option to work with the more experimental or more stable bits.
Of course, like any other Microsoft project, .NET Core might simply not get the adoption to continue; .NET developers are rightfully wary of committing resources to a bold new .NET strategy when they’ve been burned before. But because it’s built both to simplify life for the Microsoft teams building different Microsoft platforms and to take .NET to other platforms – where Microsoft is increasingly building apps and would like to use common code for some of that itself – it’s unlikely that .NET Core will wither away.
The real question will be knowing when .NET Core is mature enough to use for your particular project, whether that’s an app or a library or a framework. There needs to be a better way of doing that than tracking the project on GitHub.
But this is Microsoft showing an unprecedented level of transparency and willingness to take feedback about .NET. If you’ve got questions and ideas, you’ll find the .NET team on Stack Overflow and in the .NET Foundation and on GitHub, ready to talk about making .NET Core the future. The way the new .NET is being built is as significant as what’s being built into the new .NET stack.