This document discusses portable class libraries (PCLs), which allow sharing of code across platforms like Xamarin Android and iOS. PCLs use a single assembly that can target multiple platforms. They enable centralized code sharing and debugging across platforms. PCLs are a subset of the .NET framework and cannot reference platform-specific libraries. The document lists many Microsoft and third party libraries available as PCLs and provides examples of using PCLs with inversion of control containers. It encourages developers to create and use PCLs to easily share code across platforms.
5. Why Portable Class Libraries?
• Centralized Code Sharing
• How you expect it to work
• Debug seamlessly into and out of PCL
• Project/Assembly Sharing
• NuGet
6. Platform Independent APIs
• Platform-specific libraries can’t
be referenced
• E.g. No Silverlight Control Toolkit
• No P/Invoke to C/C++
• PCL is a subset of .NET
9. Microsoft NuGet Libraries
•
•
•
•
•
•
•
•
•
Async for .NET Framework 4, Silverlight 4 and 5, and WP 7.5 & 8
Microsoft BCL Build Components
Microsoft BCL Portability Pack
Microsoft Composition
Microsoft Compression
Microsoft HTTP Client Libraries
Microsoft Immutable Collections
Microsoft ASP.NET SignalR .NET Client
ODataLib
10. Available to Everyone!
• Easier to use
• Easier to create
• True Cross
Platform Portable
Class Libraries
13. Inversion of Control (IoC)
• Service Locator
• Obtain Service/ViewModel with
strong abstraction layer
• Platform Specific Code
• Through Interfaces
17. Summary
• Portable Class Libraries are
AWESOME!
• Create + Share PCLs EASY
• Be aware of PCL “profiles”
• Lowest Common Denominator
• Portable Class Libraries are
18. Resources
• Source Code
• http://bit.ly/planet-xamarin
• Getting Started with PCL
• http://bit.ly/pcl-get-started
• Me
• @JamesMontemagno
• www.MotzCod.es
Platform-specific libraries cannot be referenced (eg. Community.Csharp.Sqlite.WP7)
PCL is a subset and may not include classes that might be available in full class library.
Change to httpclient
Let’s look at Xamarin and VS 2013 to build modern apps on
iOS, Android, and Windows
Let’s start with something familiar
Let’s look at Xamarin and VS 2013 to build modern apps on
iOS, Android, and Windows
Let’s start with something familiar
Platform-specific libraries cannot be referenced (eg. Community.Csharp.Sqlite.WP7)
PCL is a subset and may not include classes that might be available in full class library.
Let’s look at Xamarin and VS 2013 to build modern apps on
iOS, Android, and Windows
Let’s start with something familiar