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).


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

查看所有标签

猜你喜欢:

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

勇敢新世界‧互聯網罪與罰

勇敢新世界‧互聯網罪與罰

許煜、劉細良 / CUP / 2005 / $48

我天天上網數小時,為的是要在節目裡面介紹世界的最新動態,尤其是網絡這個世界本身日新月異的變化。所以我不可能不注意到BT、共享軟件、 Wikipedia、網絡監管等各種影響政治、社會、經濟及文化的重要網絡現象。但是我發現市面上一直沒有一本內容充實全面,資料切時的中文參考書,直到這本《互聯網罪與罰》。而且,最大的驚喜是它易讀好看,簡直就像故事書。 梁文道 鳳凰衛視 《網羅天下......一起来看看 《勇敢新世界‧互聯網罪與罰》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具