What's the Difference between .NET Core, .NET Framework, and Xamarin?

栏目: IT技术 · 发布时间: 4年前

内容简介:Learn the difference between .NET Core, .NET Framework and Xamarin and which you should use for your application development.If you're developing on the Microsoft stack or hear updates regarding Microsoft-related technologies for building software, you wil

Learn the difference between .NET Core, .NET Framework and Xamarin and which you should use for your application development.

If you're developing on the Microsoft stack or hear updates regarding Microsoft-related technologies for building software, you will likely come across terms such as .NET Framework, .NET Core, .NET Standard, and Xamarin. You might have read the documentation about them but you're still confused about how they differ and when to pick one over the other. In this post, I'll talk about .NET Framework, .NET Core, Xamarin and their differences.

.NET Framework

The .NET Framework was released in 2002 and primarily runs on Windows. It ships as part of the Windows operating system and updates through Windows Update when new versions become available or through optional standalone installers. It includes the class library (.NET Framework Class Library) which provides language interoperability among the supported languages and the Common Language Runtime (CLR), which is the environment where the code is executed.

The Inception of Xamarin

The .NET Framework primarily runs on Windows and if you use Linux, you can't develop .NET applications on Linux or publish your .NET programs to non-Windows operating systems. However, Microsoft later published the Common Language Infrastructure , which is an open specification developed by Microsoft and standardized by ISO and Ecma. With this standard, a version of the .NET Framework was developed to run on Linux and it is called Mono . Mono has evolved to support a wide range of operating systems and applications. Mono is a cross-platform implementation of the .NET Framework and it's used to build desktop and mobile apps for any operating system.

Xamarin is a company that started in 2011 with a focus on building a suite of tools that allowed cross-platform development with C#. They maintained the Mono project, including MonoTouch which allowed developers to build iOS apps with C#, and Mono for Android for building Android apps in C#. The Mono project has evolved since Xamarin took over and they released Xamarin.iOS, Xamarin.Android, Xamarin.Mac, and other tools that enable the development of cross-platform native apps in C#.

Xamarin.iOS and Xamarin.Android are implementations of Mono for iPhone and Android-based smartphones. In February 2016 Microsoft acquired Xamarin Inc. and has gradually integrated the Xamarin platform and tools with the Visual Studio and .NET offering. So today, Xamarin is a platform that extends the .NET developer platform with tools and libraries for building apps for Android, iOS, tvOS, watchOS, macOS, and Windows. Xamarin apps use Mono as the .NET implementation for running the apps and you can create these projects from Visual Studio or Visual Studio for Mac. The unique features that Xamarin brings to the .NET ecosystem include:

  • Base framework for accessing native features
  • Extensible Markup Language , known as XAML, for building dynamic mobile apps using C#
  • Libraries for common patterns such as Model View ViewModel (MVVM)
  • Platform-specific libraries
  • Editor extensions to provide syntax highlighting, code completion, designers, and other functionality specifically for developing mobile pages

Evolving into .NET Core

.NET Framework is a monolithic framework that runs only on Windows and has to be installed for every machine that needs to run .NET apps on Windows. Its monolithic nature also caused a slow release cycle. In today’s world where serverless and microservices architectures are heavily adopted, we need a lightweight framework with little memory footprint to run our applications, and the .NET framework doesn't play well in this space. However, Microsoft wants to innovate and satisfy this user base. Thus, .NET Core was built from scratch to lay the foundation for the future of the .NET platform and to include a flexible and modular architecture that would allow Microsoft to innovate on their offerings.

.NET Core is a lightweight, modular, and cross-platform implementation of .NET for creating modern web apps, microservices, libraries, and console applications that run on Windows, Linux, and macOS. .NET Core is composed of Nuget packages so that you can install only the modules or packages needed to run your app, and you can bundle them together with your application and your users do not need to install the framework on their machine.

Its modular architecture means a faster release cycle from the .NET team. It being lightweight, modular, fast and cross-platform means you can use it for microservices applications and deploy them in Linux containers. You can also run it on serverless platforms.

While there are different implementations of .NET, the goal is to maintain one consistent API through .NET standard specification. While the Common Language Interface (ECMA 335 specification) establishes a small set of standard libraries for .NET implementation, the .NET Standard specification encompasses a broader range of APIs. Its goal is to:

  • Define a uniform set of BCL APIs for all .NET implementations to implement, independent of workload
  • Enable developers to produce portable class libraries that are usable across .NET implementations, using this same set of APIs
  • Reduce conditional compilation of shared source

Conclusion

In this post, I briefly went through the history of .NET and its varying implementations. The Common Language Interface is an open specification standardized by ISO and Ecma, which defines a set of APIs that any implementation of .NET should adhere to. The classic .NET Framework is an implementation of this specification, as is .NET Core (which is an evolution of .NET Framework but designed to be platform-agnostic and modular) and Xamarin (which includes Mono, Xamarin.iOS, Xamarin.Mac, and Xamarin.Android).


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Docker——容器与容器云

Docker——容器与容器云

浙江大学SEL实验室 / 人民邮电出版社 / 2015-9-1 / 89.00元

本书从实践者的角度,在讲解Docker高级实践技巧的同时,深入到源代码层次,为读者梳理出Docker容器技术和基于Docker的容器云技术(如Kubernetes)的实现方法和设计思路,帮助读者理解如何在实际场景中利用Docker解决问题并启发新的思考。全书包括两部分,第一部分深入解读Docker容器技术,包括Docker入门、架构总览、Docker容器核心原理解读,以及Docker高级实践技巧;......一起来看看 《Docker——容器与容器云》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具