Moving Gepsio Platform Support Forward with .NET Standard

Gepsio currently supports several different versions of the .NET Framework, but it has long been a goal to support the code on a variety of platforms, including the Universal Windows Platform (UWP) and Xamarin. Microsoft is making strides in the standardization of the .NET platform that should make this goal attainable while allowing the Gepsio codebase to move forward with relative ease into these new platforms.
Microsoft recently introduced .NET Core, and, with it, an API set called .NET Standard. .NET Standard is a set of APIs that all .NET platforms have to implement. As of this writing, the current version of .NET Standard is version 1.6, which supports the following platforms:
  • .NET Core 1.0
  • .NET Framework 4.6.2
  • Mono 4.6
  • Xamarin.iOS 10.0
  • Xamarin.Android 7.0
  • Universal Windows Platform 10.0
Some investigation has been performed on the Gepsio code base with the goal of understanding the impact of moving the Gepsio code base to .NET Standard 1.6. The good news is that the vast majority of the code base moved over without much of an issue, giving hope that the migration of the Gepsio code base away from its sole focus on the .NET Framework and into a broader view of the current platform landscape is achievable.

There is, however, one blocking issue which prevents Gepsio from adopting .NET Standard 1.6 today. Although .NET Standard 1.6 supports the System.Xml namespace, it does not support the System.Xml.Schema namespace. Since XBRL heavily leverages the XML Schema specification, and since Gepsio leverages data from XBRL schemas in its implementation, Gepsio must implement XML Schema support in its codebase in the absence of support from .NET Standard. With System.Xml.Schema unavailable, Gepsio will not be able to leverage the classes in the namespace using .NET Standard 1.6.

There are, at this point, two options for Gepsio:

  • Provide an independent implementation of XML Schema. Gepsio could, if necessary, provide a “homegrown” implementation of XML Schema support. Since an XML Schema document is, at its core, an XML document, Gepsio could leverage the classes available in System.Xml to read in a schema document and parse it using the requirements in the XML Schema specification. This work would become non-trivial, as the implementation would need to support the specification’s type system and notions of simple and complex types, as well as exposing all of that information to the pieces of Gepsio which require schema information. In this plan, Gepsio would be required to implement the XML Schema implementation “from scratch”.
  • Wait for XML Schema support in a future version of .NET Standard. Gepsio could also do nothing and wait for the .NET Standard to support the System.Xml.Schema namespace and then move over to that version of the Standard at that time.
The second option seems to be a more practical approach, since it would not require that an entire XML Schema implementation be written from the ground up. The question is: how long will it take for .NET Standard to provide that implementation?
As it turns out, not too long.
The next version of .NET Standard, labeled 2.0, is slated to support the XML Schema namespace. As of this writing, 924 APIs from the System.Xml.Schema namespace will be supported. Work on .NET Standard is already underway and is slated to support the following platforms:
  • .NET Core vNext
  • .NET Framework 4.6.1
  • Mono vNext
  • Xamarin.iOS vNext
  • Xamarin.Android vNext
  • Universal Windows Platform vNext
Given all of this, the plan for Gepsio is as follows:
  1. Wait for .NET Standard 2.0 to be released. Currently, this is slated to release with the next version of Visual Studio.
  2. Load the current Gepsio code into the next version of Visual Studio.
  3. Migrate the Gepsio projects in Visual Studio away from a simple .NET Framework class library and over to .NET Standard.
  4. Ensure that Gepsio’s XML implementation, both from the standpoint of XML instances and schemas, support .NET Standard 2.0
  5. Cut a release and push out to NuGet.
  6. Continue to move forward with the (admittedly long-delayed) continual improvement of Gepsio’s support for the XBRL standard, now in an environment where several platforms can use the same code base.
Advertisements