36
Who’s this guy… really? James Montemagno Developer Evangelist [email protected] http://motz.codes @JamesMontemagno

MVP Mix 2015 - Introduction to Xamarin Development

Embed Size (px)

Citation preview

Page 1: MVP Mix 2015 - Introduction to Xamarin Development

Who’s this guy… really?

James Montemagno

Developer Evangelist

[email protected] http://motz.codes @JamesMontemagno

Page 2: MVP Mix 2015 - Introduction to Xamarin Development

Xamarin—A Complete Mobile Solution

Design Develop Integrate

Learn

Xamarin Platform

Test Monitor

Page 3: MVP Mix 2015 - Introduction to Xamarin Development

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

Page 4: MVP Mix 2015 - Introduction to Xamarin Development

What is native?

Page 5: MVP Mix 2015 - Introduction to Xamarin Development

Native User Interfaces Native API Access Native Performance

Page 6: MVP Mix 2015 - Introduction to Xamarin Development

Mobile Development Approaches

Page 7: MVP Mix 2015 - Introduction to Xamarin Development

Silo Approach

Build App!Multiple Times!

!

Page 8: MVP Mix 2015 - Introduction to Xamarin Development

Write-Once-Run-Anywhere Approach

Lowest!Common!

Denominator! Black box

Page 9: MVP Mix 2015 - Introduction to Xamarin Development

Xamarin’s Unique Approach

Native with!Code Sharing!

Page 10: MVP Mix 2015 - Introduction to Xamarin Development

How Xamarin Works

Page 11: MVP Mix 2015 - Introduction to Xamarin Development

Windows APIs

Page 12: MVP Mix 2015 - Introduction to Xamarin Development

iOS

100% API Coverage

Page 13: MVP Mix 2015 - Introduction to Xamarin Development

Android

100% APICoverage

Page 14: MVP Mix 2015 - Introduction to Xamarin Development

Native Performance

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

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

Page 15: MVP Mix 2015 - Introduction to Xamarin Development

Always Up-to-Date

Track record of offering same-day support:iOS 5, iOS 6, iOS 7, iOS 7.1, iOS 8

Full support for:•  Google Glass•  Android Wear•  Amazon Fire TV•  Apple Watch•  More!

Page 16: MVP Mix 2015 - Introduction to Xamarin Development

Everything You Love

Page 17: MVP Mix 2015 - Introduction to Xamarin Development

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

Page 18: MVP Mix 2015 - Introduction to Xamarin Development

Visual Studio – 2010 and Higher

Page 19: MVP Mix 2015 - Introduction to Xamarin Development

Xamarin Studio – Mac or PC

Page 20: MVP Mix 2015 - Introduction to Xamarin Development

Xamarin Android Player

High Speed Android Emulator•  Mac or PC•  Runs side-by-side Windows

Phone EmulatorFree for Xamarin Subscribers:•  Xamarin.com/Android-Player

Page 21: MVP Mix 2015 - Introduction to Xamarin Development

Let’s Build An App

Page 22: MVP Mix 2015 - Introduction to Xamarin Development

Xamarin Development

Page 23: MVP Mix 2015 - Introduction to Xamarin Development

Platform Specific Code

UI UI UIGPS, Text To

Speech, Settings, Battery,

Lights, Notifications,

etc…

GPS, Text To Speech,

Settings, Battery, Lights,

Notifications, etc…

GPS, Text To Speech,

Settings, Battery, Lights,

Notifications, etc…

§  Write Less Code

§  Share More Code

Page 24: MVP Mix 2015 - Introduction to Xamarin Development

Plugins for Xamarin

§  Access Platform Specific APIs from a Common API

§  From Anywhere:§  Single Project§  PCL§  Shared Code

§  github.com/xamarin/plugins

Page 25: MVP Mix 2015 - Introduction to Xamarin Development

Let’s use a Plugin

Page 26: MVP Mix 2015 - Introduction to Xamarin Development

Portable Class Libraries

Page 27: MVP Mix 2015 - Introduction to Xamarin Development

Xamarin + Xamarin.Forms

With Xamarin.Forms: !more code-sharing, native controls!

Traditional Xamarin approach!

Xamarin.Forms!

Page 28: MVP Mix 2015 - Introduction to Xamarin Development

What’s Included

Xamarin.Forms!

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

§  Two-way Data Binding!!§  Navigation!

§  Animation API!

§  Dependency Service!

§  Messaging Center!

Page 29: MVP Mix 2015 - Introduction to Xamarin Development

Pages

Content MasterDetail Navigation Tabbed Carousel

Page 30: MVP Mix 2015 - Introduction to Xamarin Development

Layouts

Stack Absolute Relative Grid ContentView ScrollView Frame

Page 31: MVP Mix 2015 - Introduction to Xamarin Development

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 32: MVP Mix 2015 - Introduction to Xamarin Development

Xamarin.Forms Example

Use a single API to generate native, platform-specific user interfaces

At runtime, each Xamarin.Forms page and its controls are mapped to platform-specific native user interface elements

Page 33: MVP Mix 2015 - Introduction to Xamarin Development

Let’s take a look

Page 34: MVP Mix 2015 - Introduction to Xamarin Development

Resources

•  MVP Mix Tweets App –  http://github.com/jamesmontemagno/mvpmix-‐tweets

•  Slides •  http://www.slideshare.net/jamesmontemagno

•  Plugins for Xamarin •  http://github.com/xamarin/plugins

•  Component Store •  http://components.xamarin.com

•  Linq2Twitter •  https://linqtotwitter.codeplex.com

Page 35: MVP Mix 2015 - Introduction to Xamarin Development

Get Started Xamarin.com

Page 36: MVP Mix 2015 - Introduction to Xamarin Development

Thank you! Q&A

James Montemagno

Developer Evangelist

[email protected] http://motz.codes @JamesMontemagno