Right now, there are three application types within the Microsoft community:
- .NET Framework
- .NET Core
- Xamarin/Mono developers
(For those not in the business, these are typically Web Application Developers, Cloud Service Developers, and Mobile App Developers respectively)
As seen in the diagram below, we see that each stack references its own Base Library.
Each base library (Base Class, Core, and Mono) defines the set of functionality that each application framework (Xamarin, .NET Core, or .NET Framework) has to implement.
Say that you developed a web application in the .NET Framework and your client told you that they wanted you to create a mobile application as well. This poses a huge problem as each application framework has widely varying capabilities and behavior. Some class libraries that are available to you in .NET Framework just wouldn’t exist in Xamarin or vice versa.
This makes it incredibly difficult to develop systems that are truly cross-platform, and creates an entirely foreign experience when trying to develop on multiple platforms.
Previously, this issue was meant to be solved with the introduction of PCL’s or “Portable Class Libraries.” Instead of specifying what each application framework had to implement, you would instead pick and choose what would be included in your implementation based on what is common throughout all the previous PCL’s. Since there was so little in common, you would actually make it more difficult to adopt any PCL because they had such limited functionality.
Think of it as trying to choose a restaurant for three of your friends: One is a vegetarian, one has a nut allergy but really likes meat, and the other one has a gluten allergy. Because each person has their own preference, it’s difficult to consolidate which restaurant that you can go to that will satisfy all three!
So the solution might be an obvious one: create a single library that will unify all of the existing base class libraries, and create a common ecosystem that will ultimately make application development more unified across the Microsoft platforms. .NET Standard specifies the API’s that all application frameworks must implement.
This solves the previous issue with PCL’s, in that every developer that will use .NET standard knows exactly what API is exposed in each version of it. The subsequent versions of .NET Standard will just add on top of what is exposed in .NET Standard 1.0.
What this means is, if you design your application model off an earlier version, you know that it will be compatible with every subsequent version because they’re a subset of Version 1.0.
If that doesn’t make sense, think of it this way: Latin is the root of many languages, if you design your language around Latin, then you are actually making it easier to adopt by people who speak higher “versions” of Latin. Like, French, Spanish, and Italian. The closer you are to Latin, the more likely people that speak Latin-based languages will understand you.
With Microsoft evolving .NET framework, the widespread adoption of .NET Core throughout the development community, and the open source release of Xamarin; .NET Standard is the final piece of the puzzle in Microsoft’s vision of its software development ecosystem.
During a virtual panel discussion on InfoQ Phillip Carter, the Program Manager on the .NET team at Microsoft, was quoted saying:
“For .NET, the biggest focus right now is .NET Standard Library 2.0…”
It is clearly something that every .NET developer should be aware of, and with any luck it’ll finally be the one ring that will unify the .NET world.
For more information, check out the .NET Standard documentation at https://docs.microsoft.com/en-us/dotnet/articles/standard/library.