• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Xamarin v.Now
 

Xamarin v.Now

on

  • 2,528 views

Presentation to Xamarin User Group in San Francisco, 19-Sep-2013... all the latest in Xamarin technology including iOS, Android, Xamarin Studio, Portable Class Libraries, Async/Await and TestCloud.

Presentation to Xamarin User Group in San Francisco, 19-Sep-2013... all the latest in Xamarin technology including iOS, Android, Xamarin Studio, Portable Class Libraries, Async/Await and TestCloud.

Statistics

Views

Total Views
2,528
Views on SlideShare
2,523
Embed Views
5

Actions

Likes
1
Downloads
25
Comments
0

1 Embed 5

https://twitter.com 5

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Xamarin v.Now Xamarin v.Now Presentation Transcript

    • Craig Dunn Developer Evangelist Xamarin craig@xamarin.com @conceptdev v.Now The future is now :)
    • Agenda • About Xamarin • Xamarin 2.0 • v.Now C# 5 - async await iOS UI Designer iOS 7 Google Play Services for Android Test Cloud
    • About Xamarin • Apps are native, performance is native • Entire platform SDK available to your code: - iOS: StoreKit, EventKit, iCloud, etc - Android: Play Services, Compatibility Library, etc • Share C# across Xamarin, Windows & WinPhone apps • Leverage platform-specific libraries: iOS: Objective-C Android: Java user experience performance features
    • About Xamarin • Mono C# + .NET implementation for Linux started in 2001/released 2004 • MonoTouch (for iOS) - 2009 • Mono for Android - 2011 • MonoDevelop IDE • MonoMac open source project iPhoneOS 3.0, pre-iPad Android 2.3 Gingerbread C# 1.0
    • About Xamarin • Mono C# + .NET implementation for Linux started in 2001/released 2004 • MonoTouch (for iOS) - 2009 • Mono for Android - 2011 • MonoDevelop IDE • MonoMac open source project Mono 3.2 .NET 4.5 C# 5 iOS 7 Android 4.3 Jelly Bean
    • Xamarin 2.0 • Xamarin Studio • Xamarin.iOS Visual Studio • Xamarin.Android • Component Store • Free Starter Edition http://xamarin.com/guide/ http://blog.xamarin.com/announcing-xamarin-2.0/
    • How Does it Work? Windows C# Xaml C# Network,  Storage,   Business  Logic UI wire -­‐up logic run/me pla2orm .NET UI your  code
    • How Does it Work? Mono  .NET  RunBme Windows  PhoneAndroid iOS WindowsMac Shared  Code  (C#) .NET XamlAndroid  Xml Storyboards XIB Xamarin.Android Xamarin.iOS Xamarin.Mac C# C# C# C# Xaml C# H7pClient  &  WebServices                      SQLite.NET  &  database                    IO                    more... UI wire -­‐up logic run/me pla2orm UIUIUIUIUI your  code
    • Mac OS X WindowsWindows IDE iOS Android Mac Windows/Phone Xamarin Development Environments Xamarin Business Edition+ Mac +
    • Mac OS XWindows Visual Studio Xamarin Build Host Xamarin.iOS for Visual Studio plug-in Build Host configuration iOS Projects iOS Property Pages iOS build, deploy, debug iOS Output panes Device iOS Simulator Apple iOS SDK Xcode Interface Builder Compiler Keychain Certifications Provisioning Profiles Network access iOS apps in Visual Studio?!
    • Xamarin Development Environments • Coding Auto-complete Refactoring • User Interface Design GUI tools • Debugging • Build & Deploy Simulators & Devices Testing & Production/App Stores
    • IOS C# on iPhone, iPad and iPod touch
    • iOS Development Environment Xamarin Studio Visual Studio
    • iOS UI Designer Xcode - now Xamarin Designer - beta
    • iOS Development Environment • Code signing • App configuration • Deployment Keychain - certificates
    • iOS Development Environment • Code signing • App configuration • Deployment Provisioning Portal http://developer.apple.com
    • iOS Development Environment • Code signing • App configuration • Deployment
    • DEMO iOS
    • ANDROID C# on Android (Google Play, Kindle, ...)
    • Android Development Environment Xamarin Studio Visual Studio
    • Android UI Designer Xamarin Studio Visual Studio
    • Android Development Environment Shared runtime for debugging only. Linking reduces size Choose CPU arch
    • Android Development Environment • AndroidManifest.xml Permissions App configuration use [Activity] and other attributes
    • Android Development Environment • Deployment Signing wizard
    • DEMO Android
    • CROSS PLATFORM Portable code...
    • What is a Portable Class Library? Subset of .NET that is supported across the set of target platforms. Starting with File > New App gives you platform- specific code, eg. Windows Store
    • What is a Portable Class Library? Subset of .NET that is supported across the set of target platforms. Some Microso! platforms (eg. Windows Phone) are more restricted than Xamarin.
    • What is a Portable Class Library? Subset of .NET that is supported across the set of target platforms. Some Microso! platforms (eg. Windows Phone) are more restricted than Xamarin. but no dynamic (AOT)
    • What is a Portable Class Library? Profile1 NetForWSA, Net4, SL4, WP7, XBox360
    • What is a Portable Class Library? Profile2 NetForWSA, Net4, SL4, WP7
    • What is a Portable Class Library? Profile104 NetForWSA, Net45, SL4, WP75
    • PCL Example Tasky Portable XML An abstract implementation of a data storage class, with implementation for each platform Profile 158
    • PCL Example The Portable Class Library is compiled in a way that is sharable. We create a Provider for each platform
    • DEMO Tasky Portable
    • ASYNC AWAIT C# 5 tailor-made for mobile!
    • Mobile Apps • Need responsive user interfaces • App features are o!en dependent on: network access database functionality or I/O complex processing on mobile CPUs stuff that takes some time • You want to run these on a different thread to keep the UI responsive... they should be ASYNCHRONOUS! Fast! Long running tasks! Threads! All
    • DEMO Async Await
    • Old-style callbacks 1) Download Html string 2) Download Jpeg image 3) Save to Photo Album 5) Error Handling 4) Return Html length 6) InvokeOnMainThread Callback Hell
    • Callback Hell Old-style callbacks 1) Download Html string 2) Download Jpeg image 3) Save to Photo Album 5) Error Handling 4) Return Html length 6) InvokeOnMainThread
    • Old-style callbacks • Spaghetti code: Callbacks are the new “GOTO” Control flow jumps around in ways that are difficult to read & understand from the source Error handling is difficult to implement, required in many different places Changes in the chain can have unintended consequences http://tirania.org/blog/archive/2013/Aug-15.html
    • 1) Download Html string 2) Download Jpeg image 3) Save to Photo Album 5) Error Handling 4) Return Html length Comparison Async-ified 6) InvokeOnMainThread
    • 1) Download Html string 2) Download Jpeg image 3) Save to Photo Album 5) Error Handling 4) Return Html length Comparison 6) InvokeOnMainThread one place not required Async-ified
    • Comparison 1) Download Html string 2) Download Jpeg image 3) Save to Photo Album 5) Error Handling 4) Return Html length 6) InvokeOnMainThread old new!
    • DEMO Tasky Parse
    • TEST CLOUD Scalable, repeatable real device testing
    • Test Cloud
    • Test Cloud
    • Test Cloud
    • Test Cloud
    • RECAP
    • Recap • Build iOS & Android apps in C# with .NET Latest language features • Use Xamarin Studio or Visual Studio • Apps are native, with native performance • Share C# code • Latest C# 5 features • Component Store http://components.xamarin.com • Test Cloud http://testcloud.xamarin.com
    • Questions? Developer Evangelist Xamarin craig@xamarin.com @conceptdev Craig Dunn • Documentation http://docs.xamarin.com/ • Samples http://github.com/xamarin http://xamarin.com/download