Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Cross Platform Mobile Development with Xamarin


Published on

Published in: Technology
  • Be the first to comment

Cross Platform Mobile Development with Xamarin

  1. 1. Xamarin Mobile Cross Platform Development
  2. 2. bryan costanich em: tw: @bryancostanich slides:
  3. 3. Sample Code
  4. 4. Xamarin Platform (The Pitch)
  5. 5. One Language + Framework LINQ Lambdas Task Parallel Library (TPL) Compile-Time Checks Garbage Collection C# º
  6. 6. Native Perf. + UX Compiles Down to Native Code Not Interpreted All Native UX Controls Full Platform SDK Access iOS: Selectors/Obj-C Runtime Android: JNI Fast Enough for Games º
  7. 7. Reuse Story C# Libraries Obj-C Bindings + Binding Projects .jar Bindings + Binding Projects C via pInvoke C++ via Cxxi º
  8. 8. Other Platforms Windows - via .NET Mac - via Xamarin.Mac Linux - via Mono Ouya, XBOX, PSP, etc. Etc.
  9. 9. Community + Support Huge C# Community IRC + Great Support º
  10. 10. VS + Xamarin Studio Visual Studio Xamarin Studio Android Designer iOS Designer (Beta) Debugging AutoComplete Refactoring Project Management Integrated Source Control
  11. 11. General XPlat Considerations
  12. 12. Design Platform-Specific UX UX in iOS != Android != Windows Phone UX Metaphors are Different: Navigation Controller vs. Back Button Write-Once, Run-Anywhere is Problematic Users Expect Native UX º
  13. 13. Choose Device Targets iPhone != iPad Beware Android Fragmentation Form Factor + Capability Differences Inform UX Pro-Tip: Minimize Targets º
  14. 14. Building an X-Plat Architecture
  15. 15. Architecture Layers Separation of Responsibility Encapsulation Core Code Sharing º
  16. 16. VS Project/Solution Setup
  17. 17. Code Sharing - Linking vs. PCL Portal Library Projects - Take a Lot of Work Great Discussion Here: Takeaway: PCL is clean, but difficult to implement Linking is less “clean” but simpler Our Recommendation Now: File Linking for Most Projects Walkthrough Here: Linking º
  18. 18. WP7 + Android New Blank Solution: "[AppName]" New C# Lib Project: "[AppName].Core" Test Project: “[AppName].Core.Tests” New Mono for Android Project: “[AppName].Droid” New WP7 Project "[AppName].WP7" º
  19. 19. Shared Data + Data Access Layer Data Access Layer SQLite on iOS + Android, C# SQLIte on WP7: SQLite.NET ORM Use Generics for CRUD Convenience Methods: TaskDatabase.cs º
  20. 20. Platform Abstractions Handling Divergence and Taking Advantage of Platform Features
  21. 21. Conditional Compilation Pre-Defined Symbols: #if __MOBILE__ #if __ANDROID__ #if __IOS__ #if WINDOWS_PHONE #if SILVERLIGHT Can Add Additional in Build Settings
  22. 22. Architectural Abstraction Sometimes, You Wanna Provide Different Implementations for Different Platforms Interfaces º
  23. 23. Component Store Tons of Components Cross-Platform IDE-Integration - drop-in! Revenue Model for User Submitted
  24. 24. Xamarin.* Libraries XPlat API Abstractions Open Source* Mobile Social Auth
  25. 25. Other XPlat Libs MonoCross - MvvmCross - Vernacular - MonoGame - Cocos2D - º
  26. 26. Q+A