introduction to xamarin

39
Introduction to mobile development with Xamarin

Upload: guy-barrette

Post on 25-May-2015

265 views

Category:

Technology


0 download

DESCRIPTION

Introduction to Xamarin for DevTeach Oceanwide

TRANSCRIPT

Page 1: Introduction to Xamarin

Introduction to mobiledevelopment with Xamarin

Page 2: Introduction to Xamarin

Guy Barrette

MVP Windows AzureFreelance Solutions Architect

Co-animateur duVisual Studio Talk Show

[email protected]

@guybarrette

Page 3: Introduction to Xamarin

Mobile Development Approaches

Page 4: Introduction to Xamarin

Silo’d ApproachBuild Apps Multiple

Times

•Multiple Teams

•Multiple Code Bases

•Different toolsets

Page 5: Introduction to Xamarin

Write Once, Run Anywhere Approach

Black Box

•Mobile Web site

• PhoneGap/Cordova

Page 6: Introduction to Xamarin

Write Once, Run Anywhere Approach

• Build a mobile version of an

existing Web site

•No apps to deploy to the stores

Page 7: Introduction to Xamarin

Write Once, Run Anywhere Approach

•Use PhoneGap/Cordova with

HTML5

• Basically, a native app with a

Web viewer displaying HTML5

pages

•Native look is simulated with CSS

• Apps are packaged as native

apps

Page 8: Introduction to Xamarin

Xamarin approach

Page 9: Introduction to Xamarin

Xamarin’s Unique Approach

•Native User Interface

•Native Performance

• Shared code across

platforms

•C# & .NET Framework

• Full API Coverage

Page 10: Introduction to Xamarin

Xamarin?

Page 11: Introduction to Xamarin

Xamarin HistoryOver a Decade of Enterprise Production Use

2000

Ximian Founded

2001

MonoStarted

2003

Ximian Acquired by Novell

2009

First iOS product (now Xamarin.iOS) launches

2011

Xamarin Founded

First Release of Xamarin.Android

2012

First release of Xamarin.Mac

LaunchPartnerProgram

2013

Xamarin 2.0

Component Store

Evolve 2013

Xamarin TestCloud

Microsoft Partnership

Reach 200,000Developer

Mark

500,000+ Developers

100+ Partners100+ Components

2014

Xamarin 3.0

Xamarin Forms

Evolve 2014

Insights

Simulator

Page 12: Introduction to Xamarin

Microsoft and Xamarin Partner Globally

With Xamarin, developers combine all of the productivity benefits of C#, Visual Studio 2013 and Windows Azure with the flexibility to quickly build

for multiple device targets.” S. Somasegar, Corporate Vice President, Microsoft

Page 13: Introduction to Xamarin

How does this work?

Page 14: Introduction to Xamarin

Write Everything in C#

iOS, Android, Windows, Windows Phone, Mac

2.5+ Billion Devices!

Page 15: Introduction to Xamarin

100% API Coverage

•Anything you can do in Objective-C

or Java can be done in C# and

Visual Studio with Xamarin!

Page 16: Introduction to Xamarin

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 17: Introduction to Xamarin

Code Sharing: Accelerate Development

Code-sharing stats from iCircuit, built with Xamarin and featured on the App Store.

Source: http://praeclarum.org/post/42378027611/icircuit-code-reuse-part-cinq

•Up to 90% Code Reuse

• Leverage existing libraries

NuGet Support

Page 18: Introduction to Xamarin

Portable Class Libraries

• 1 Assembly• Multiple Platforms• Including:• Xamarin.Android• Xamarin.iOS

Page 19: Introduction to Xamarin

Distribute EverywhereA Xamarin app is an app, distribute it

everywhere

Page 20: Introduction to Xamarin

2 Xamarin UI approaches

Page 21: Introduction to Xamarin

Platform Specific UI

•UI Is platform specific

• Tuned for each platform

•UI code is non sharable

• Best to get the optimal UI

on each platform

Page 22: Introduction to Xamarin

Xamarin.Forms

• Cross-platform UI toolkit abstraction

• Share UI code across platforms

• Rendered natively on each platform

• 95% code reuse• OK for many apps

styles but not for everything

Page 23: Introduction to Xamarin

Development Environment

Xamarin StudioPC or Mac

Visual Studio Plugin

VS 2010/2012/2013

Page 24: Introduction to Xamarin

Cost - Software

Cost per dev and per device platform:• iOS• Android

Page 25: Introduction to Xamarin

Cost - Hardware• Android

Development can be done on Windows or

Mac

• iOS

A Mac is required

Development can be done on a Windows

machine but compilation MUST be done on a

Mac

Compilation can be done on a networked Mac

Page 26: Introduction to Xamarin

Cost - Hardware

•Emulators are OK

for development

•But always test on

physical devices

Page 27: Introduction to Xamarin

Xamarin Studio• Optimized for cross-

platform mobile development

• Explore native APIs with code completion

• World class Android and iOS designers

• Powerful debugging on simulator or device

Page 28: Introduction to Xamarin

Android Designer

• Worlds best Android designer

• Available in:• Xamarin Studio • Visual Studio

• Create UI with drag & drop simplicity

• Target multiple screen sizes, resolutions and Android versions

• Layouts saved in standard Android XML files

Page 29: Introduction to Xamarin

iOS Designer • World’s first iOS Designer

available in Xamarin Studio and Visual Studio

• Follows familiar Visual Studio designer idioms

• Supports all UIKit elements

• Edit custom and 3rd party components

• Live preview of changes to properties

Page 30: Introduction to Xamarin

Visual Studio IntegrationA single solution:• iOS• Android• Windows Phone• Windows Store

Leverage the entire Microsoft ecosystem:• ReSharper• Team Foundation Server• Your favorite code

coverage and profiling tools

Page 31: Introduction to Xamarin

Visual Studio Integration

Debug to:• Emulators• Devices

Integrated into toolbar• Status• Logs• List of devices

Just Click Start Debugging!

Page 32: Introduction to Xamarin

Tools

Page 33: Introduction to Xamarin

Xamarin Android Player

• VT-x and AMD-V hardware accelerated virtualization

• Boots in seconds• Runs on Windows and

Mac

Page 34: Introduction to Xamarin

Xamarin Component Store

Build Apps Faster

• Add high quality pre-built app components directly from Visual Studio and Xamarin Studio

• Beautiful cross-platform UI controls, cloud services and enterprise backend integrations are just a few clicks away

Page 35: Introduction to Xamarin

.NET Mobility Scanner

How mobile is your .NET?• Scan .exe or .dll to determine compatibility• Generates full report:

Page 36: Introduction to Xamarin

Demo

Page 37: Introduction to Xamarin

Conclusion

Page 38: Introduction to Xamarin

Xamarin benefits• Xamarin enables developers to reach all major mobile

platforms!

Native User Interface

Native Performance

Shared Code Across Platforms

C# & .NET Framework

Page 39: Introduction to Xamarin

Questions?