News:  .NET 2015 (01/05/2015)

.NET 2015
I’ve just finished catching up with a recording from dotnetconf 2015 (http://www.dotnetconf.net/):



http://channel9.msdn.com/Events/dotnetConf/2015/Welcome-and-NET-2015-Overview



I am going to attempt to share the knowledge gained here.



Being a .NET developer has gradually become a more and more complex propositions over the 13 years since its launch and after viewing the video it is safe to say that it is only getting more complex as Microsoft and others attempt to extend support to a variety of different platforms.



With increments of .NET we are used to getting updates to the .NET languages, the underlying Framework and technologies built on it, such as ASP.NET. With .NET 2015 we have a couple of new .NET variants to get to grips with, amongst other things.



.NET 2015 could be summarised as .NET Framework 4.6 or .NET Core 5 both based on underlying shared runtime components, compilers and with intrinsic support from NuGet package management. .NET Core is a rewritten, stripped down version of the .NET Framework better suited to deployment scenarios where the full extent of the .NET Framework is not required.



A slightly fuller list of the constituent elements of .NET 2015 might be:

  • C# 6 (and VB 14)
  • Roslyn (the .NET Compiler Platform) – new(ish) C# and VB compilers, new language features, compiler-as-a-service and open source
  • NET Framework 4.6
  • ASP.NET 5 - which does not support VB.NET or web forms!
  • NET Native - an ahead-of-time compiler that compiles apps directly to native code and contains a minimal CLR runtime. Windows Store apps start up to 60% faster and use 15-20% less memory when compiled with .NET Native.
  • NET Core 5, as highlighted above, but also key is that .NET Core is also supported by Microsoft on Linux and Mac OSX as well as Windows. This is a ‘biggie’.

Wow. Plenty of changes to get our heads around. That’s not everything either.



A related concept that might be new is that of Universal Windows apps which will run on .NET Native (ARM, x86, x64). The concept, or ‘app model’ has actually been around for a little while. It allows code sharing between Windows Phone & Windows apps (8.1+) and are deployed to the Windows Store. Further, Xamarin has plans to support the app model for Android and iOS development.



You might be asking ‘how does the .NET framework client profile fit into all this’, if you are as behind the times as me. The .NET Client Profile is a subset of the .NET Framework, which was provided with .NET Framework 4 and earlier versions and was optimized for client applications. A bit like .NET Core 5 then, but largely not. Starting with the .NET Framework 4.5, the Client Profile has been discontinued and only the full redistributable package is available.



Microsoft is also making a big deal of a number of the constituent parts of .NET 2015 being open sourced/ community driven. This may well be a big deal but it isn’t something that holds my interest particularly currently as I’m too busy trying to understand what all these parts are, how they might fit together and what it means for the industry and me, as a developer.



Let’s have a third pass through .NET 2015 adding a little more flesh. I like Beth Massi’s breakdown of the topic http://blogs.msdn.com/b/bethmassi/archive/2015/02/25/understanding-net-2015.aspx:



Frameworks and Runtimes



The .NET Framework consists of 2 main components: the Common Language Runtime, the execution engine, and the Framework Class Library, which provides a code library developers can build upon.



.NET Framework 4.6 is the next full version of the framework as we know it today and will be delivered with Windows Update and with Windows 10.



.NET Core 5 is a general purpose, modular framework that can be used across a wide variety of app models and platforms, is available as open source, can be deployed modularly & locally (side-by-side), and will be supported by Microsoft on Windows, Linux and Mac OSX, though is only available for Windows at the time of writing. It is a refactored set of base class libraries (corefx) and runtime (coreclr) which includes a new JIT compiler (“RyuJIT”), the .NET Garbage Collector, native interop and many other .NET runtime components.



Compilers



The .NET Compiler Platform ("Roslyn") provides open-source C# and Visual Basic compilers. Roslyn produces platform independent Intermediate Language (IL) and is used when building against .NET 2015, including Framework and Core. There are also key language innovations in both VB and C#.



“RyuJIT” is the new default just-in-time (JIT) compiler for .NET on x64. The JIT compiler takes IL and compiles it for the particular machine architecture the first time it is executed at run-time. Used for desktop and server-based scenarios, RyuJIT is an overhaul of the previous 64-bit JIT compiler that significantly reduces startup times.



.NET Native compiles C# to native machine code that performs like C++, so developers continue to benefit from the productivity and familiarity of the .NET Framework with the performance of native code. This takes the place of the JIT run-time compilation we are used to.



App Models



App models extend the common libraries of .NET Framework 4.6 and .NET Core 5. Windows Forms, WPF, ASP.NET Web Forms, MVC 5, etc., app models that you are familiar with today are part of the .NET Framework 4.6, come with many new features, as well as benefit from the new innovations in the languages, Roslyn compiler, and RyuJIT. It is important to note that not all these app models and related languages are supported by .NET Core5, far from it. However, some app models are new and designed to run on the optimized .NET Core 5 only.





I’m primarily a web developer so am particularly interested in ASP.NET. ASP.NET 5 is a lean .NET app model for building modern web apps. It was built from the ground up to provide an optimized development framework for apps that are either deployed to the cloud or run on-premises. Based on user feedback some features have been dropped to ensure ASP.NET 5 is as lean as possible, e.g. web forms and VB support. It includes the MVC 6 framework, which now combines the features of MVC and Web API into a single web programming framework, as well as SignalR 3 - enabling you to add real time functionality. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. Almost all features are now implemented as NuGet modules, allowing you to optimize your app to have just what you need. It also now has built in support for dependency injection, whereas previously you had to rely on 3rd parties. In fact dependency injection is key to its architecture.



ASP.NET 5 can run on top of .NET Framework 4.6 or .NET Core 5. Today, ASP.NET 5 uses the Mono runtime to run on Linux and Mac. Once .NET Core supports Linux and Mac, then ASP.NET 5 will move to using .NET Core for those platforms.





References



http://blogs.msdn.com/b/bethmassi/archive/2015/02/25/understanding-net-2015.aspx

http://www.hanselman.com/blog/IntroducingASPNETVNext.aspx

http://www.dotnetrocks.com/default.aspx?showNum=1121

http://stephenwalther.com/archive/2015/02/24/top-10-changes-in-asp-net-5-and-mvc-6

http://en.wikipedia.org/wiki/.NET_Framework

https://weblogs.asp.net/scottgu/introducing-asp-net-5

Back to News