portable class library deep dive

19
Portable Class Library Deep Dive #ShareMoreCode James Montemagno, Developer Evangelist @JamesMontemagno www.MotzCod.es

Upload: james-montemagno

Post on 07-May-2015

610 views

Category:

Technology


3 download

DESCRIPTION

Slides from Houston Xamarin C# Developers Group in Houston Texas on December 16th 2013: PCL Deep Dive: With a single solution in Visual Studio, build native cross-platform apps for iOS, Android, and Windows all in C#. Dive into platform specific code with Service Locators (IoC) an PCL support

TRANSCRIPT

  • 1.Portable Class Library Deep Dive #ShareMoreCode James Montemagno, Developer Evangelist @JamesMontemagno www.MotzCod.es

2. Portable Class Libraries 1 Assembly Multiple Platforms 3. Portable Class Libraries 1 Assembly Multiple Platforms Including: Xamarin.Androi d Xamarin.iOS 4. Why Portable Class Libraries? Centralized Code Sharing How you expect it to work Debug seamlessly into and out of PCL Project/Assembly Sharing NuGet 5. Platform Independent APIs Platform-specific libraries cant be referenced E.g. No Silverlight Control Toolkit No P/Invoke to C/C++ PCL is a subset of .NET 6. What can I use? 7. Well Documented 8. 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 9. Available to Everyone! Easier to use Easier to create True Cross Platform Portable Class Libraries 10. Awesome PCL Libraries MvvmCross ReactiveUI Akavache Async Persistent Key-Value Store Splat Image Loading Budgie Twitter Library Azure Mobile Services Json.NetSO MANY MORE!!! 11. Demo 12. Inversion of Control (IoC) Service Locator Obtain Service/ViewModel with strong abstraction layer Platform Specific Code Through Interfaces 13. Examples XPlatUtils PortableIoC Ninject About 1000 other ones. 14. Or Your Own?!?! 50 Lines of Code http://bit.ly/50-lines-ioc 15. Demo 16. Summary Portable Class Libraries are AWESOME! Create + Share PCLs EASY Be aware of PCL profiles Lowest Common Denominator Portable Class Libraries are 17. Resources Source Code http://bit.ly/planet-xamarin Getting Started with PCL http://bit.ly/pcl-get-started Me @JamesMontemagno www.MotzCod.es 18. Q&A