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

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

内容简介: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).


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

查看所有标签

猜你喜欢:

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

走出电商困局

走出电商困局

黄若 / 东方出版社 / 2013-11-1 / 38.00

高速增长的时代趋于结束,迅猛运转的加速器早已锈蚀 这是一场转型,更是一次新的机遇 《走出电商困局》是本年度最畅销管理书籍《我看电商》作者黄若的最新力作,意在深度剖析电商行业发展 ,破解电商困局。经历过10年超常规的快速增长,电商行业即将进入较为平稳的发展期。多年来这个行业不断融资不断烧钱却大多无法盈利的怪圈怎样突破?在很多企业面临估值下跌,资金吃紧,用户流失的关键节点,怎样从零售经营的......一起来看看 《走出电商困局》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

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

UNIX 时间戳转换