Live data from Hacker News

.NET Standard 2.0 is final

github.com

11–20 of 69 posts

Re: .NET Standard 2.0 is final

#11
post #9

I don't really get what the purpose of this spec is. I would much prefer if they spent the time on improving the .NET Core story. In typical MS manner .NET seems to get more confusing all the time.

> improving the .NET Core story

They are. NET Core fully implements NET Standard.

Re: .NET Standard 2.0 is final

#12
post #9

I don't really get what the purpose of this spec is. I would much prefer if they spent the time on improving the .NET Core story. In typical MS manner .NET seems to get more confusing all the time.

This /is/ geared heavily towards improving the .NET Core story. The purpose of this spec is to provide library authors with a set of APIs that they can expect will exist on .NET Standard 2.0-implementing runtimes (a list of which are supplied). This allows library authors to write code that works when deployed across multiple implementations and it allows application writers to trust that their dependencies will work on the platform of their choice.

Two major implementations of .NET Standard 2.0 are the traditional .NET Framework and .NET Core, so libraries targeting .NET Standard 2.0 can be used on both platforms without modification.

Re: .NET Standard 2.0 is final

#13

Compatibility mode sounds like a godsend for those of us who have had to hold back due to compatibility issues with third party code/libraries. It's a risk, to be sure, but awesome that it's an option now. Side note: very much looking forward to UWP targeting .NET standard. Not long now before you'll be able to develop UWP apps for Ubuntu and Mac OS :)

[deleted]

Re: .NET Standard 2.0 is final

#16

Compatibility mode sounds like a godsend for those of us who have had to hold back due to compatibility issues with third party code/libraries. It's a risk, to be sure, but awesome that it's an option now. Side note: very much looking forward to UWP targeting .NET standard. Not long now before you'll be able to develop UWP apps for Ubuntu and Mac OS :)

Microsoft's Xamarin Forms 3.0 (stable release later this year) allows you to target Linux and Mac[1] and is very similar to UWP conceptually - UI written once, run anywhere. It's just that Xamarin's "anywhere" is much larger :)

Disclosure: I work on Xamarin team at Microsoft

[1]https://forums.xamarin.com/discussion/85747/xamarin-forms-fe...

Re: .NET Standard 2.0 is final

#17

So just so I'm clear, .NET ECMA Spec ⊆ .NET Standard ⊆ (.NET Core ∩ Mono ∩ Xamarin ∩ Unity) ⊆ .NET Core ⊆ .NET Framework Correct?

Here's an analogy using classes and interfaces to explain it

https://gist.github.com/davidfowl/8939f305567e1755412d6dc0b8...

Re: .NET Standard 2.0 is final

#18
For people confused about what .NET Standard is and how it relates to .NET Core:

Here's an FAQ: https://github.com/dotnet/standard/blob/master/docs/faq.md Here's a series of short videos from the product team explaining it: https://www.youtube.com/playlist?list=PLRAdsfhKI4OWx321A_pr-...

Short excerpt from the FAQ:

  .NET Standard is a specification that represents a set of APIs that all .NET platforms have to implement. This unifies the .NET platforms and prevents future fragmentation. Think of .NET Standard as POSIX for .NET.

  Having a standard solves the code sharing problem for .NET developers by bringing all the APIs that you expect and love across the environments that you need: desktop applications, mobile apps & games, and cloud services.
Conceptually, I think of it in terms of browsers and browser standards. The relationship between .NET Standard and the various .NET platforms (.NET Core, .NET Framework, Mono, Xamarin, UWP, etc.) is similar to HTML specifications (e.g. https://www.w3.org/TR/html5/) and individual browsers. Newer HTML features are available on newer browsers, and some browser feature implementation is contextualized (e.g. some web features don't make sense on a mobile phone browser). I know there are rabbit holes to #wellactually on that, so if it doesn't work for you don't worry about it, but as an analogy I've found it helpful.

Having a defined feature matrix makes it easier to see which APIs are available for a given platform and version.

(Microsoft employee, .NET team member, Nazgûl)

Re: .NET Standard 2.0 is final

#19

Compatibility mode sounds like a godsend for those of us who have had to hold back due to compatibility issues with third party code/libraries. It's a risk, to be sure, but awesome that it's an option now. Side note: very much looking forward to UWP targeting .NET standard. Not long now before you'll be able to develop UWP apps for Ubuntu and Mac OS :)

Microsoft's Xamarin Forms 3.0 (stable release later this year) allows you to target Linux and Mac[1] and is very similar to UWP conceptually - UI written once, run anywhere. It's just that Xamarin's "anywhere" is much larger :) Disclosure: I work on Xamarin team at Microsoft [1] https://forums.xamarin.com/discussion/85747/xamarin-forms-fe...

Question for you - I have created a few (okay, two) UWP apps, but the limited success of the store has made me look to using Xamarin. Only thing is, Xamarin's XAML is sufficiently different from UWP's XAML that I got disoriented and gave up.

If I want to target cross platform apps (including Linux and Mac), should I wait for Xamarin Forms 3 or will UWP eventually expand to cover Mac & Linux?

I'm only a hobby programmer so I don't want to waste hours learning something that will be a dead end.

Any insight you might have would be very useful! thanks

Re: .NET Standard 2.0 is final

#20

So just so I'm clear, .NET ECMA Spec ⊆ .NET Standard ⊆ (.NET Core ∩ Mono ∩ Xamarin ∩ Unity) ⊆ .NET Core ⊆ .NET Framework Correct?

ECMA spec is for the CLI, essentially the specification for runtime like type system and GC and all the other things that make an environment work at all

Net Standard is a specification of APIs. So in order to be compliant to the standard you must have a class named X with parameters string Y, int Z.

"Net Framework" is the name for the Windows "full .net framework" -- this doesn't have a descriptive name since it was before all the rest, but basically its an SDK that is a superset of the Net Standard (and therefore is .Net Standard compliant / interoperable)

Mono is a open source implementation of "Net Framework" that runs on multiple platforms (linux, etc). It attempts to treat full .NET Framework's surface area as a spec but re-implement it cross platform. It is _also_ a open source CLI implementation. So in common speech "mono" like ".net" can refer to either the "basic sdk" _or_ the runtime environment.

Xamarin is forks of mono for iOS, Android and Mac platforms plus libraries that include full support for interacting with those platforms Native SDKs

Unity is a fork of Mono plus gaming tooling and runtime tools. Microsoft does not maintain this, it's a separate company.

Post reply on HN