7. Two Languages,
One Framework.
.NET Framework + BCL
Managed Runtime/Garbage Collection
LINQ
Lambdas
Async/Await + Task Parallel Lib.
Compile-Time Checks
C
F
#
#
8. Native
Performance
Native 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
9. Massive Code
Reuse
Share C# Code Across Platforms
C# Libraries
Obj-C Bindings + Binding Projects
.jar Bindings + Binding Projects
C via pInvoke
C++ via CPPSharp
(github.com/mono/CppSharp)
18. Design PlatformSpecific 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
23. Code Sharing PCL vs. File
Linking
PCL Libraries - Great for Components
File Linking - Better for Apps
PLP - Take a Lot of Architectural Work, Linking
is Easy
Our Recommendation: File Linking for Projects
Both VS and XS have Project Linker Add-ins
24. Project Setup
New Blank Solution: "[AppName]"
New C# Lib Project: "[AppName].Core"
Test Project: “[AppName].Core.Tests”
New Xamarin.iOS: “[AppName].iOS”
New Xamarin.Android: “[AppName].Droid”
New Windows Project
"[AppName].WinStore"
26. Shared Data +
Data Access Layer
SQLite on iOS + Android, C# SQLIte on
Windows Market Apps:
http://code.google.com/p/csharp-sqlite/
SQLite.NET ORM
Use Generics for CRUD Convenience
Methods:
TaskDatabase.cs