Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
S E A M L E S S L Y B L E N D I N G C r e a t i v e & T e c h n o l o g y o n
M o b i l e , T a b l e t a n d W E B
W W W . B L U E T U B E I N C . C O M
Introduction to Xamarin
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 3
Xamarin?
Xamarin Overview
• What it is
• What it isn‟t
• What the future holds
• What you‟ll need
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 4
Xamarin?
Xamarin Overview
• Okay… What else?
• Tips & tricks
• Resources
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 5
What it is…
Xamarin Overview
• Oh, you mean Monotouch?
• Mono for android?
• Xamarin.ios === Monotouch
• Xamarin.Android === Mono for Android
• Tip: google both
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 6
What it is…
Xamarin Overview
• Native?
• Compiles to native APP using:
• Objective C (iOS)
• Java (Android)
• iOS: Ahead of Time (AOT) Compiler
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 7
What it is…
Xamarin Overview
• Native?
• Native Libraries and APIs
• iOS: CocoaTouch, CoreGraphics, Quartz 2d, etc.
• ANDROID: PINVOKE, bindings, etc.
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 8
What it is…
Xamarin Overview
• C#
• C# 2.0 language features
• soon to be C# 4.0
• “Most” .NET base libraries (via Mono)
• Some variation between iOS and Android
• LINQ
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 9
What it is…
Xamarin Overview
• C#
• Generics
• Lambdas
• etc.
• Garbage Collection
• managed C# objects only
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 10
What it is…
Xamarin Overview
• iOS Objective C library support
• Xamarin “binding” to Obj C libs
• Examples:
• Google Maps, Analytics
• Red Laser
• TestFlight
• Etc.
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 11
What it is…
Xamarin Overview
• iOS Objective C library support
• Don‟t reinvent the wheel
• Many already on Github, etc.
• https://github.com/mono/monotouch-bindings
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 12
What it‟s not…
Xamarin Overview
• Shared UI Platform
• Not a great idea anyway due to varying UI
paradigms
• JIT compiling not possible
• Limits reflection code
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 13
What it‟s not…
Xamarin Overview
• Limited generics support
• Most of the useful stuff is there
• Garbage collection not perfect
• Due to the native/managed interaction
• Needs „help‟ – more disposal code than most
.NET-based solutions
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 14
What it‟s not…
Xamarin Overview
• Other limitations
• iOS:
http://docs.xamarin.com/guides/ios/advanced
_topics/limitations
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 15
What the future holds…
Xamarin Overview
• Things in Alpha/Beta channels
• C# 4.0 support
• Async/await
• Portable libraries
• iOS Designer in Xamarin Studio
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 16
What you need…
Xamarin Overview
• Xamarin license
• Specifics ON Website, RECENT changes
• https://store.xamarin.com/
• Starter edition for independent devs
• FREE
• Limited a bit
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 17
What you need…
Xamarin Overview
• Xamarin Studio
• iOS specific:
• A Mac
• XCode
• Apple Developer account
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 18
What you need…
Xamarin Overview
• Android specific:
• Android SDK
• Xamarin STUDIO installation now includes the
SDK
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 19
Other things it can do
Xamarin Overview
• Visual Studio integration
• Still need a Mac for IOS
• XCode for iOS UI design
• Until Xamarin ios designer ready
• No extra needs for Android
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 20
Other things it can do
Xamarin Overview
• Code sharing for mobile
• Done with file “linking”
• Able to share C# code between
iOS, Android, Windows phone, .NET
• Xamarin.Mac for Mac
• development in C#
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 21
Tips & Tricks
Xamarin Overview
• SQLite-net
• ORM for SQLite
• Maps C# classes to SQLite tables
• Easy to use
• https://github.com/praeclarum/sqlite-net
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 22
Tips & Tricks
Xamarin Overview
• Injection
• TinyIOC
• Simple
• https://github.com/grumpydev/TinyIoC
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 23
Tips & Tricks
Xamarin Overview
• Event Aggregator
• TinyMessenger
• Loosely coupled communication
• https://github.com/grumpydev/TinyMessenger
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 24
Tips & Tricks
Xamarin Overview
• Android Emulators
• Get a test device
• X86 has made life easier
• In Xamarin Studio, set the project to support
x86 by selecting the x86 checkbox under
Options > Build > Android Build > Advanced
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 25
Tips & Tricks
Xamarin Overview
• Test cloud!
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 26
Tips & Tricks
Xamarin Overview
• Garbage collection
• Sgen vs. Boehm
• SGEN recommended, boehm the default
• Unhook button event handlers
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 27
Tips & Tricks
Xamarin Overview
• Garbage collection
• Xamarin examples show:
Button.TouchUpInside += (sender, e) = {
//do something
};
• Avoid this
• Why?
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 28
Tips & Tricks
Xamarin Overview
• Xamarin studio tips
• Drag & drop files to nest them
• Merging iOS storyboards can be difficult
• XML, but…
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 29
Tips & Tricks
Xamarin Overview
• Xamarin studio tips
• File linking to share code between
Android, Windows phone, .NET projects, etc.
• No platform specific code
• Linking is the best option until portable libraries
are available to use
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 30
Tips & Tricks
Xamarin Overview
• Xamarin studio tips
• iOS XCode integration gotchas
• Sometimes tries to destroy your project
• Save early, save often
• Commit to SVN, GIT often
• Xamarin component store
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 31
Resources
Xamarin Overview
• Xamarin resources
• xamarin.com
• Guides: http://docs.xamarin.com/guides
• Recipes: http://docs.xamarin.com/recipes
• Samples:
http://docs.xamarin.com/samples-all
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 32
Resources
Xamarin Overview
• Android
• developer.android:
http://developer.android.com/index.html
• Device stats:
http://developer.android.com/about/dashboards/index.html
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 33
Resources
Xamarin Overview
• iOS
• Developer Library:
https://developer.apple.com/library/ios/navigation/index.html
SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 34
The end
Xamarin Overview
• These slides will be on Bluetube‟s blog
• http://blog.bluetubeinteractive.com
• Questions?

More Related Content

Xamarin Overview

  • 1. S E A M L E S S L Y B L E N D I N G C r e a t i v e & T e c h n o l o g y o n M o b i l e , T a b l e t a n d W E B W W W . B L U E T U B E I N C . C O M
  • 3. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 3 Xamarin? Xamarin Overview • What it is • What it isn‟t • What the future holds • What you‟ll need
  • 4. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 4 Xamarin? Xamarin Overview • Okay… What else? • Tips & tricks • Resources
  • 5. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 5 What it is… Xamarin Overview • Oh, you mean Monotouch? • Mono for android? • Xamarin.ios === Monotouch • Xamarin.Android === Mono for Android • Tip: google both
  • 6. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 6 What it is… Xamarin Overview • Native? • Compiles to native APP using: • Objective C (iOS) • Java (Android) • iOS: Ahead of Time (AOT) Compiler
  • 7. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 7 What it is… Xamarin Overview • Native? • Native Libraries and APIs • iOS: CocoaTouch, CoreGraphics, Quartz 2d, etc. • ANDROID: PINVOKE, bindings, etc.
  • 8. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 8 What it is… Xamarin Overview • C# • C# 2.0 language features • soon to be C# 4.0 • “Most” .NET base libraries (via Mono) • Some variation between iOS and Android • LINQ
  • 9. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 9 What it is… Xamarin Overview • C# • Generics • Lambdas • etc. • Garbage Collection • managed C# objects only
  • 10. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 10 What it is… Xamarin Overview • iOS Objective C library support • Xamarin “binding” to Obj C libs • Examples: • Google Maps, Analytics • Red Laser • TestFlight • Etc.
  • 11. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 11 What it is… Xamarin Overview • iOS Objective C library support • Don‟t reinvent the wheel • Many already on Github, etc. • https://github.com/mono/monotouch-bindings
  • 12. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 12 What it‟s not… Xamarin Overview • Shared UI Platform • Not a great idea anyway due to varying UI paradigms • JIT compiling not possible • Limits reflection code
  • 13. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 13 What it‟s not… Xamarin Overview • Limited generics support • Most of the useful stuff is there • Garbage collection not perfect • Due to the native/managed interaction • Needs „help‟ – more disposal code than most .NET-based solutions
  • 14. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 14 What it‟s not… Xamarin Overview • Other limitations • iOS: http://docs.xamarin.com/guides/ios/advanced _topics/limitations
  • 15. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 15 What the future holds… Xamarin Overview • Things in Alpha/Beta channels • C# 4.0 support • Async/await • Portable libraries • iOS Designer in Xamarin Studio
  • 16. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 16 What you need… Xamarin Overview • Xamarin license • Specifics ON Website, RECENT changes • https://store.xamarin.com/ • Starter edition for independent devs • FREE • Limited a bit
  • 17. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 17 What you need… Xamarin Overview • Xamarin Studio • iOS specific: • A Mac • XCode • Apple Developer account
  • 18. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 18 What you need… Xamarin Overview • Android specific: • Android SDK • Xamarin STUDIO installation now includes the SDK
  • 19. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 19 Other things it can do Xamarin Overview • Visual Studio integration • Still need a Mac for IOS • XCode for iOS UI design • Until Xamarin ios designer ready • No extra needs for Android
  • 20. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 20 Other things it can do Xamarin Overview • Code sharing for mobile • Done with file “linking” • Able to share C# code between iOS, Android, Windows phone, .NET • Xamarin.Mac for Mac • development in C#
  • 21. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 21 Tips & Tricks Xamarin Overview • SQLite-net • ORM for SQLite • Maps C# classes to SQLite tables • Easy to use • https://github.com/praeclarum/sqlite-net
  • 22. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 22 Tips & Tricks Xamarin Overview • Injection • TinyIOC • Simple • https://github.com/grumpydev/TinyIoC
  • 23. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 23 Tips & Tricks Xamarin Overview • Event Aggregator • TinyMessenger • Loosely coupled communication • https://github.com/grumpydev/TinyMessenger
  • 24. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 24 Tips & Tricks Xamarin Overview • Android Emulators • Get a test device • X86 has made life easier • In Xamarin Studio, set the project to support x86 by selecting the x86 checkbox under Options > Build > Android Build > Advanced
  • 25. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 25 Tips & Tricks Xamarin Overview • Test cloud!
  • 26. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 26 Tips & Tricks Xamarin Overview • Garbage collection • Sgen vs. Boehm • SGEN recommended, boehm the default • Unhook button event handlers
  • 27. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 27 Tips & Tricks Xamarin Overview • Garbage collection • Xamarin examples show: Button.TouchUpInside += (sender, e) = { //do something }; • Avoid this • Why?
  • 28. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 28 Tips & Tricks Xamarin Overview • Xamarin studio tips • Drag & drop files to nest them • Merging iOS storyboards can be difficult • XML, but…
  • 29. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 29 Tips & Tricks Xamarin Overview • Xamarin studio tips • File linking to share code between Android, Windows phone, .NET projects, etc. • No platform specific code • Linking is the best option until portable libraries are available to use
  • 30. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 30 Tips & Tricks Xamarin Overview • Xamarin studio tips • iOS XCode integration gotchas • Sometimes tries to destroy your project • Save early, save often • Commit to SVN, GIT often • Xamarin component store
  • 31. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 31 Resources Xamarin Overview • Xamarin resources • xamarin.com • Guides: http://docs.xamarin.com/guides • Recipes: http://docs.xamarin.com/recipes • Samples: http://docs.xamarin.com/samples-all
  • 32. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 32 Resources Xamarin Overview • Android • developer.android: http://developer.android.com/index.html • Device stats: http://developer.android.com/about/dashboards/index.html
  • 33. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 33 Resources Xamarin Overview • iOS • Developer Library: https://developer.apple.com/library/ios/navigation/index.html
  • 34. SEAMLESSLY BLENDING CREATIVE AND TECHNICAL ON MOBILE, TABLET & WEB WWW.BLUETUBEINC.COM 34 The end Xamarin Overview • These slides will be on Bluetube‟s blog • http://blog.bluetubeinteractive.com • Questions?