Introduction to Xamarin Philly Code Camp 2014

68
Cross-platform mobile development in C# with Xamarin

description

Introduction 2 Xamarin and cross platform development in C# with Brent Schooley, James Montemagno, and Greg Shackles. Presented at Philly Code Camp 2014

Transcript of Introduction to Xamarin Philly Code Camp 2014

Page 1: Introduction to Xamarin Philly Code Camp 2014

Cross-platform mobile development in !C# with Xamarin!

Page 2: Introduction to Xamarin Philly Code Camp 2014

Your Presenters!

Greg Shackles! Brent Schooley!James Montemagno!Senior Engineer!Olo!

Developer Evangelist!Twilio!

Developer Evangelist!Xamarin!

[email protected]!

@gshackles!

[email protected]!

@brentschooley!

[email protected]!

@jamesmontemagno!!motzcod.es!

Page 3: Introduction to Xamarin Philly Code Camp 2014

Philly Xamarin Developer Group!

meetup.com/PhillyXamarin!§  Monthly Meetups!§  Ran by local developers!§  Next meetup: July 8th!!

Page 4: Introduction to Xamarin Philly Code Camp 2014

Agenda!

Part 1:!§  Introduction!§  Architecting Mobile Apps!§  Overview of Xamarin!§  Live Coding Adventure!§  Q&A!

Part 2:!§  What’s new in Xamarin 3!§  Live Coding Adventure!§  Introduction to

Xamarin.Forms!§  Live Coding Adventure!§  Q&A!

Page 5: Introduction to Xamarin Philly Code Camp 2014

Automatically test your app on!hundreds of mobile devices !

Create native iOS, Android, Mac and Windows apps in Visual Studio and C#

Page 6: Introduction to Xamarin Philly Code Camp 2014

What is native?!

Page 7: Introduction to Xamarin Philly Code Camp 2014

The Anatomy of a Native App!

Xamarin apps look and feel native because they are native!

Native User Interfaces! Native API Access! Native Performance!

Page 8: Introduction to Xamarin Philly Code Camp 2014

Architecting !Mobile Apps!

Page 9: Introduction to Xamarin Philly Code Camp 2014

The Silo Approach!

Build App !Multiple Times!

Page 10: Introduction to Xamarin Philly Code Camp 2014

The Write-Once-Run-Anywhere Approach!

Lowest Common!Denominator!

Page 11: Introduction to Xamarin Philly Code Camp 2014

Xamarin’s Unique Approach!

Native With !Code Sharing!

Page 12: Introduction to Xamarin Philly Code Camp 2014

How does it work?!

Page 13: Introduction to Xamarin Philly Code Camp 2014

Windows APIs!

Page 14: Introduction to Xamarin Philly Code Camp 2014

iOS APIs | 100% Coverage!

Page 15: Introduction to Xamarin Philly Code Camp 2014

Android APIs | 100% Coverage!

Page 16: Introduction to Xamarin Philly Code Camp 2014

Anything you can do in Objective-C or Java !can be done in C# with Xamarin using Visual Studio!

Page 17: Introduction to Xamarin Philly Code Camp 2014

Xamarin.iOS does full Ahead Of Time (﴾AOT)﴿ compilation to produce an ARM binary for Apple’s App Store.

Native Performance

Xamarin.Android takes advantage of Just In Time (﴾JIT)﴿ compilation on the Android device.

Page 18: Introduction to Xamarin Philly Code Camp 2014

Always Up to Date

Same day support for iOS 5, iOS 6, iOS 6.1, iOS 7, iOS 7.1!

Page 19: Introduction to Xamarin Philly Code Camp 2014

Emerging Technologies & Devices Always up-‐to-‐date with the latest APIs from

Apple and Google.

Android Wear Google Glass Amazon Fire Phone Amazon Fire TV!

Page 20: Introduction to Xamarin Philly Code Camp 2014

Let’s talk about !code sharing…!

Page 21: Introduction to Xamarin Philly Code Camp 2014

Xamarin’s Unique Approach!

Native With !Code Sharing!

Page 22: Introduction to Xamarin Philly Code Camp 2014

Code Sharing: Accelerate Development

Android  

iOS  

Mac  

WinPhone  

WP  

Page 23: Introduction to Xamarin Philly Code Camp 2014

File Linking

Page 24: Introduction to Xamarin Philly Code Camp 2014

Shared Code Projects

Page 25: Introduction to Xamarin Philly Code Camp 2014

Portable Class Libraries •  1 Assembly •  Multiple Platforms •  Including: •  Xamarin.Android •  Xamarin.iOS

Page 26: Introduction to Xamarin Philly Code Camp 2014

Portable Class Libraries Features • Centralized Code Sharing • How you expect it to work • Debug seamlessly into and out of PCL

• Project/Assembly Sharing • NuGet

Page 27: Introduction to Xamarin Philly Code Camp 2014

Distribute Everywhere A Xamarin app is an app, distribute it everywhere

Page 28: Introduction to Xamarin Philly Code Camp 2014

Products

Page 29: Introduction to Xamarin Philly Code Camp 2014

Xamarin.Mac

Xamarin Studio

Xamarin Test Cloud

Component Store

Xamarin.iOS

Xamarin.Android

Xamarin for Visual Studio

.NET Mobility Scanner

Page 30: Introduction to Xamarin Philly Code Camp 2014

Development Environment

Xamarin Studio PC or Mac

Visual Studio Plugin VS 2010/2012/2013

Page 31: Introduction to Xamarin Philly Code Camp 2014

Visual Studio Integration

Page 32: Introduction to Xamarin Philly Code Camp 2014

Visual Studio Integration

Debug to: •  Emulators •  Devices

Integrated into toolbar •  Status •  Logs •  List of devices

Just Click Start Debugging!

Page 33: Introduction to Xamarin Philly Code Camp 2014

Xamarin Studio

Page 34: Introduction to Xamarin Philly Code Camp 2014

Android Designer

Page 35: Introduction to Xamarin Philly Code Camp 2014

iOS Designer

Page 36: Introduction to Xamarin Philly Code Camp 2014

Xamarin Component Store

Build Apps Faster

Page 37: Introduction to Xamarin Philly Code Camp 2014

.NET Mobility Scanner

http://scan.xamarin.com How mobile is your .NET? •  Scan .exe or .dll to determine compatibility •  Generates full report:

Page 38: Introduction to Xamarin Philly Code Camp 2014

Unrivaled Mobile Development Training!Live unlimited mobile development training from mobile experts, !in your time-zone, on your schedule and as often as you'd like!

xamarin.com/university!

Page 39: Introduction to Xamarin Philly Code Camp 2014

Live Coding Adventure 1!

Page 40: Introduction to Xamarin Philly Code Camp 2014

Q & A!!Get your free C# t-shirt:!xamarin.com/shirt!

@gshackles! @brentschooley! @jamesmontemagno!

Page 41: Introduction to Xamarin Philly Code Camp 2014

15 Minute Break!

Page 42: Introduction to Xamarin Philly Code Camp 2014

Cross-platform mobile development in !C# with Xamarin!

Page 43: Introduction to Xamarin Philly Code Camp 2014

Your Presenters!

Greg Shackles! Brent Schooley!James Montemagno!Senior Engineer!Olo!

Developer Evangelist!Twilio!

Developer Evangelist!Xamarin!

[email protected]!

@gshackles!

[email protected]!

@brentschooley!

[email protected]!

@jamesmontemagno!!motzcod.es!

Page 44: Introduction to Xamarin Philly Code Camp 2014

Agenda!

Part 1:!§  Introduction!§  Architecting Mobile Apps!§  Overview of Xamarin!§  Live Coding Adventure!§  Q&A!

Part 2:!§  What’s new in Xamarin 3!§  Live Coding Adventure!§  Introduction to

Xamarin.Forms!§  Live Coding Adventure!§  Q&A!

Page 45: Introduction to Xamarin Philly Code Camp 2014

What’s new in!Xamarin 3!

Page 46: Introduction to Xamarin Philly Code Camp 2014

Major Elements of Xamarin 3!

1.  Xamarin Designer for iOS!2.  Xamarin Studio & Visual Studio Enhancements!3.  Easy code sharing!4.  Xamarin.Forms!

Page 47: Introduction to Xamarin Philly Code Camp 2014

Xamarin Designer for iOS!

Fully integrated into Xamarin Studio & Visual Studio!!iOS 6 & 7 Storyboard support!!Intuitive event handling!!Support for auto-layout!!Live preview of custom controls!!!!!!!!!!

Page 48: Introduction to Xamarin Philly Code Camp 2014

Xamarin Studio: Beautiful new look!

Page 49: Introduction to Xamarin Philly Code Camp 2014

NuGet Package Manager!

NuGet support combined with the Xamarin Component Store gives Xamarin developers the most comprehensive ecosystem of libraries at their fingertips!

Page 50: Introduction to Xamarin Philly Code Camp 2014

Xamarin Designer for iOS in Xamarin Studio!

Page 51: Introduction to Xamarin Philly Code Camp 2014

First Class F# Support!

Page 52: Introduction to Xamarin Philly Code Camp 2014

Shared Projects!

The easiest way to share code!!Eliminates the hassle of file-linking!!Easier to collaborate with other Xamarin Studio and !Visual Studio users !

Page 53: Introduction to Xamarin Philly Code Camp 2014

Live Coding Adventure 2!

Page 54: Introduction to Xamarin Philly Code Camp 2014

Portable  Class  Libraries  

Page 55: Introduction to Xamarin Philly Code Camp 2014

Xamarin + Xamarin.Forms!With Xamarin.Forms: !

more code-sharing, native controls!Traditional Xamarin approach!

Shared UI Code!

Page 56: Introduction to Xamarin Philly Code Camp 2014

Xamarin + Xamarin.Forms!

Shared UI Code!

Quickly and easily build native user interfaces using shared code!!Xamarin.Forms elements map to native controls and behaviors!!Mix-and-match Xamarin.Forms with native APIs!

Page 57: Introduction to Xamarin Philly Code Camp 2014

What’s Included!

§  40+ Pages, Layouts, and Controls!§  Build from code behind or XAML!

§  Two-way Data Binding!!§  Navigation!

§  Animation API!

§  Dependency Service!

§  Messaging Center!

Page 58: Introduction to Xamarin Philly Code Camp 2014

Pages!

Content! MasterDetail! Navigation! Tabbed! Carousel!

Page 59: Introduction to Xamarin Philly Code Camp 2014

Layouts!

Stack! Absolute! Relative! Grid! ContentView! ScrollView! Frame!

Page 60: Introduction to Xamarin Philly Code Camp 2014

Controls!

ActivityIndicator! BoxView! Button! DatePicker! Editor!

Entry! Image! Label! ListView! Map!

OpenGLView! Picker! ProgressBar! SearchBar! Slider!

Stepper! TableView! TimePicker! WebView! EntryCell!

ImageCell! SwitchCell! TextCell! ViewCell!

Page 61: Introduction to Xamarin Philly Code Camp 2014
Page 62: Introduction to Xamarin Philly Code Camp 2014
Page 63: Introduction to Xamarin Philly Code Camp 2014

Live Coding Adventure 3!

Page 64: Introduction to Xamarin Philly Code Camp 2014

Xamarin Recap!

§  iOS, Android, Mac, and Windows apps all in C#!

§  Full API Coverage!

§  Native Performance!§  Native User Interface!§  Code Sharing Between All Platforms!

Page 65: Introduction to Xamarin Philly Code Camp 2014

Philly Xamarin Developer Group!

meetup.com/PhillyXamarin!§  Monthly Meetups!§  Ran by local developers!§  Next meetup: July 8th!!

Page 66: Introduction to Xamarin Philly Code Camp 2014

Key Attendees!

xamarin.com/evolve!

Page 67: Introduction to Xamarin Philly Code Camp 2014

Unrivaled Mobile Development Training!Live unlimited mobile development training from mobile experts, !in your time-zone, on your schedule and as often as you'd like!

xamarin.com/university!

Page 68: Introduction to Xamarin Philly Code Camp 2014

Q & A!!Get your free C# t-shirt:!xamarin.com/shirt!

@gshackles! @brentschooley! @jamesmontemagno!