Upload
dan-ardelean
View
34
Download
1
Embed Size (px)
Citation preview
#GDGCochabamba
Desarollo multiplataforma con el framework .NET
Dan Ardelean | Microsoft MVP & Xamarin Certified Mobile Dev @danardelean | [email protected]
.NET today—reusing code
Difficult to reuse skills
• Need to master 3+1 base class libraries
Difficult to reuse code
• Need to target a fairly small common denominator
Difficult to innovate
• Need implementations on each platform
.NET tomorrow
.NET Standard
Reuse skills
• Master one BCL, not a Venn diagram
Reuse code
• Common denominator is much bigger
Faster innovation
• Target .NET Standard & run anywhere
What is .NET Standard?• .NET Standard is a specification
• A set of APIs that all .NET platforms have to implement
.NET Standard
.NET Framework
.NET CoreXamarin
~
~
HTML specification
Browsers
2.0
1.6
1.3
Versioning in .NET Standard• Higher versions incorporate all
APIs from previous versions.• Projects targeting version X.Y can
reference libraries & projects targeting any version between 1.0 and X.Y
• Concrete .NET platforms implement a specific version of .NET Standard• From that platform you can
reference libraries up to that version
1.0
.NET Standard 2.0
Has much bigger API surface
• Extended to cover intersection between .NET Framework and Xamarin
• Makes .NET Core 2.0 bigger as it implements .NET Standard 2.0
~70%
+20K
Can reference .NET Framework libraries
• Compat shim allows referencing existing .NET Framework code – without recompilation
• Limited to libs that use APIs that are available for .NET Standard
What version should you target?• The higher the version, the more APIs you have
• The lower the version, the more platforms support it
Lower Version
More Reach
Higher Version
More APIs
Difference to Portable Class Libraries (PCL)
• PCLs were an after thought, i.e. each platform could decide which APIs to includes• No systematic approach to versioning
• Computed intersection profiles
• Each PCLs is targeting a specific set ofplatforms• Not compatible with newer platforms
• Hard to understand compatibility relationships
Platform 3Platform 1
Platform 2
Intersection
Profiles
https://github.com/Microsoft/BikeSharing360_Websites
https://github.com/Microsoft/SmartHotel360