Cross-Platform Functionality with .NET Core


Since the release of .NET Core on Microsoft stack, .NET based products are now cross-platform. There was good response when .NET core was released as an open-source platform with additional functionalities that were missing in the previous .NET Framework. .NET Framework was ignored by the open source communities for a long time, as Microsoft never focused on the other platforms. The release of .NET Core has made it possible to run the same app on iOS, Android, tvOS, watchOS, macOS, and Windows OS. 


A Look Back: As .NET Framework lacked the cross-platform ability, it was used with an open-source, cross-platform, and .NET compatible tool Mono. After the introduction of Xamarin, it’s tools were used with C# shared codebase, to write native Android, iOS, and Windows apps using native user interfaces. This allowed the sharing of code across multiple platforms, including Windows, macOS, and Linux. Until April 2017, Xamarin was used by 1.4 million developers in 120 countries around the world. Later Xamarin was integrated with .NET Core to create server applications that run on multiple platforms. Xamarin provided features of native platforms like,


  1. Native User interface controls for UI and UX of specific platforms. 
  2. Native API Access by exposing the functionality of the platform and device.
  3. Native Performance by using platform-specific hardware acceleration.


Present times: .NET Core was introduced as a light-weight, cross-platform, open-source, modular framework. It decouples the .NET from Windows and runs the application in a non-Windows environment. It also allows the running of different versions of the same application. As .NET Core is part of the NuGet packages, we can download the essential modules required for the app. These modules are easily integrated with the existing apps and do not require installation on the client’s machine. This way it eases the portability of apps.


.NET Standard Library to build cross-platform libraries

Sharing libraries between the projects is a common scenario. The way of sharing libraries has changed in .NET core. The libraries created the need to be compatible with full .NET framework applications and other frameworks that adhere to .NET Standard libraries. .NET Standard is a specification for the .NET APIs to establish uniformity in the .NET ecosystem. It defines a uniform set of Base Class Libraries for all .NET implementations. It enables portable libraries to be used across all .NET implementations and eliminates the conditional compilation of shared sources. .NET standards are version specific and the higher versions expose more APIs or rather they also expose the APIs of previous .NET standard versions. So, if you have a library working with .NET standard v1.3, then having a later version of .NET Standard 1.4, 1.6, 2.0 will also be able to run the library. Targeting the .NET standard versions against your library will allow them to run on all the platforms (.NET Core, .NET (Full) Framework, Xamarin) that implement the same version of the .NET Standard.

Libraries are created so they can be shared among the projects. .NET Core also gives you the ability to create a NuGet package and shares it on NuGet.


What .NET Core means for the Business?

Using .NET Core for a cross-platform application lowers the total cost of ownership. It will allow the user to run many services and web applications in the same hardware/servers or VM’s in the cloud and increases the usage of the resources. By using stateful services you are leveraging the performance of .NET core while you run processes in low latency accessing data. This works as a cost saver and increases the capacity to run more services platforms. Reduces migration cost in cloud platforms. Eg: Migration of windows application into Linux. Further, you pay less to run more services on cloud


TakeAway: Large enterprises are quickly adopting .NET Core for their cross-platform functionalities. We have insisted on why we prefer .NET Core for the apps. Now we are excited to work on .NET 5, a unified single framework for cloud, desktop, and mobile-based applications. 


At BundleN, we experiment with stack combinations on our own time.

For potential clients interested in this stack, we can always give a demo of what we have up until that point of time. You can reach us at sales@BundleN.com