Windows Mobile 8,415 views
Posted Friday, August 12, 2016 by ED CHARBENEAU, Developer Advocate for Progress
READ MORE: https://www.progress.com...
Exciting times lie ahead for .NET developers. Earlier this year during Build, Microsoft’s biggest developer event, clear roadmaps were given on the future of .NET and C#. Microsoft is re-positioning .NET to be a platform that can be written anywhere and run anywhere, which is a big departure from its long history of proprietary technologies.
Microsoft is also reinventing itself in other ways, such as its developer tooling and the way it communicates with developers in general. This more open side of Microsoft has even started to win over some of the most skeptical of developers. But what does all this mean for .NET developers in the future?
Frameworks and Libraries
The state of .NET today is a little scattered. Restructuring projects always seems to make them worse before they get better, and this is no different. The road ahead has been a bit fuzzy since the introduction of .NET Core and perhaps got a little fuzzier with the recent announcement of adding Xamarin to the mix.
While these are exciting times, they are unclear and uncertain for developers.
With the current structure of .NET, creating code that spans across different Microsoft platforms means working with portable class libraries (PCL). The PCL has shared functionality, but is very limited when compared to the .NET framework, and understanding how the PCL is supported on various platforms is less than straightforward. In addition, working across the complete .NET ecosystem means working with up to three different base libraries: Base Class Library (.NET Framework), .NET Core, and Mono Class Library (Xamarin). As such, developer fatigue really begins to set in when trying to grasp which APIs are available for a given scenario.
Thankfully, Microsoft understands the issue at hand and has a clear vision of how .NET will work in the future. A big part of this strategy is to deprecate the PCL and replace it with a contract for common API support. This new contract will be called the .NET Standard Library. The .NET Standard Library will also include a specific set of reference assemblies that all .NET Platforms must support, known as the .NET Platform Standard.
The .NET Standard Library decouples the application models from the base libraries and tooling. This scenario allows for better code reuse and a smaller learning curve. Having a decoupled approach also means that the .NET Standard Library can be updated with less friction (AKA breaking changes), which will mean more innovation at a faster pace. As the .NET Standard Library API surface increases with newer versions, some platforms will be left behind and become legacy. The upside is that new and yet to be created platforms have a clear foundation to build upon.
The Language of the Future is C#
Since C# is the most popular language in .NET, it’s necessary to include it in the conversation. While C# is a very mature language, it has an exciting future as well. Much like the .NET framework, C# is being developed as an open source project. Now that C# is open source, its development will be visible to the public, including the roadmap.
Much like with the .NET Standard Library, Microsoft is promising a faster release cycle with C#. These out-of-band releases will include new language features to further enhance an already robust and mature language. In future releases we’ll see some interesting new ways for developers to write C#:
- Local functions will allow functions inside of methods that will have access to variables in scope.
- Tuples let functions return multiple results. The results can be named so that the code remains readable.
- Pattern matching extensions for C# enable many of the benefits of algebraic data types and pattern matching from functional languages, but in a way that smoothly integrates with the feel of the underlying language. Pattern matching is able to switch on the necessary type of data and offers greater flexibility when working with non-primitive data types.
- Immutable objects are a feature being discussed for beyond C# 7. Immutable objects are an explicit shorthand way of writing immutable classes with the added benefit of the compiler being able to identify them as immutable.
Because of Roslyn, the cross-platform compiler-as-a-service, C# can be written and run on any platform. Roslyn enables C# to run in IDEs (integrated development environments) and editors, and it opens the door to support from any linter, refactoring tool and code generation tooling. In the future, expect to see more uses for C# in more places.
Exciting Future for .NET
.NET is always changing and improving as a platform. The sheer amount of changes happening and the speed at which they are delivered will cause some difficulties along the way. However, gone are the days of Microsoft secrecy - enjoy the new open development process and transparent roadmaps that have been outlined. There’s certainly an exciting future ahead for .NET; its cross platform, open source, and full of features one would expect from a modern set of tools and languages.
READ MORE: https://www.progress.com...