Introduction to xamarin

46
Cross platform mobile development with the power of Xamarin https://cmatskas.com @christosmatskas Christos Matskas

Transcript of Introduction to xamarin

Page 1: Introduction to xamarin

Cross platform mobile

development with the

power of Xamarin

https://cmatskas.com

@christosmatskas

Christos Matskas

Page 2: Introduction to xamarin

Xamarin is a better way to

Build Test Monitor

Page 3: Introduction to xamarin

Create native iOS, Android, Mac and

Windows apps in Visual Studio and C#

Page 4: Introduction to xamarin

Mobile

Development

Approaches

Page 5: Introduction to xamarin

Silo Approach

Build Apps Multiple Times

• Multiple Teams

• Multiple Code Bases

• Different toolsets

Page 6: Introduction to xamarin

HTML - Write Once, Run Anywhere Approach

• Lowest common denominator

• Browser fragmentation

• Developing & designing for 1

platform, happen to get other

platforms

Page 7: Introduction to xamarin

Xamarin’s Unique Approach

• Native User Interface

• Native Performance

• Shared code across

platforms

• C# & .NET Framework

• Full API Coverage

Page 8: Introduction to xamarin

With Xamarin.Forms:

more code-sharing, native controlsTraditional Xamarin approach

Shared UI Code

Xamarin.Forms Unique Approach

Page 9: Introduction to xamarin

Why C#?

Page 10: Introduction to xamarin

C# is Awesome

• LINQ Support

• Work With XML Easily XDocument

• Event Handling & Delegates

Page 11: Introduction to xamarin

C# with XamarinObjective-C

See the Difference – Classes and Methods

Page 12: Introduction to xamarin

C# with Xamarin

Objective-C

Simplifying Native Methods with Async/Await

Page 13: Introduction to xamarin

C# with XamarinJava

C# & Async with Xamarin

See the Difference– Android ItemClick

Page 14: Introduction to xamarin

Write Everything in C#

C# Runs on 2.5 Billion Devices

Page 15: Introduction to xamarin

How

Xamarin

Works

Page 16: Introduction to xamarin

.NET + Windows APIs

Page 17: Introduction to xamarin

.NET + iOS APIs | 100% Coverage

Page 18: Introduction to xamarin

.NET Android APIs | 100% Coverage

Page 19: Introduction to xamarin

Anything you can do in Objective-C, Swift, or Java

can be done in C# with Xamarin using Visual Studio

Page 20: 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 21: Introduction to xamarin

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

• More!

Page 22: Introduction to xamarin

Code Sharing: Accelerate Development

• Up to 90% Code Reuse

• Leverage existing libraries

– NuGet Support

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

Page 23: Introduction to xamarin

• 1 Assembly

• Multiple Platforms

• Including:

• Xamarin.Android

• Xamarin.iOS

Portable Class Libraries

Page 24: Introduction to xamarin

NuGet

Page 25: Introduction to xamarin

Shared Projects

Page 26: Introduction to xamarin

Xamarin Studio

PC or MacVisual Studio Plugin

VS 2010 and Higher

Development Environment

Page 27: Introduction to xamarin

Visual Studio Integration

A 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 28: Introduction to xamarin

Visual Studio Integration

Debug to:

• Emulators

• Devices

Integrated into toolbar• Status

• Logs

• List of devices

Just Click Start Debugging!

Page 29: 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 30: Introduction to xamarin

Android Designer

• World’s 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 31: Introduction to xamarin

Xamarin Designer for iOS

• 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 32: 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 33: Introduction to xamarin

Xamarin Android Player

High Speed Android Emulator

• Mac or PC

• Runs side-by-side Windows

Phone Emulator

Free for Xamarin Subscribers:

• Xamarin.com/Android-Player

Page 34: Introduction to xamarin

40+ Pages, Layouts, and Controls

Build from code behind or XAML

Two-way Data Binding

Navigation

Animation API

Dependency Service

Messaging Center

Shared UI Code

What’s Included

Page 35: Introduction to xamarin

Content MasterDetail Navigation Tabbed Carousel

Pages

Page 36: Introduction to xamarin

Stack Absolute Relative Grid ContentView ScrollView Frame

Layouts

Page 37: Introduction to xamarin

ActivityIndicator BoxView Button DatePicker Editor

Entry Image Label ListView Map

OpenGLView Picker ProgressBar SearchBar Slider

Stepper TableView TimePicker WebView EntryCell

ImageCell SwitchCell TextCell ViewCell

Controls

Page 38: Introduction to xamarin

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

Xamarin.Forms Example

Page 39: Introduction to xamarin

Embed Custom Views Anywhere

Not only are Xamarin.Forms pages

mixable with custom screens, you

can embed custom views built

directly against Xamarin.iOS and

Xamarin.Android into

Xamarin.Forms pages.

Call Platform APIs via Shared

Services

Need platform-specific functionality

within a Xamarin.Forms page, such

as querying the accelerometer?

We’ve included services that quickly

and easily abstract platform-specific

API calls to keep you writing as much

shared code as possible.

Easy migration to the Xamarin

Platform

When your native platform integration

requirements outgrow Xamarin.Forms,

your shared code is easily migrated to

Xamarin.iOS and Xamarin.Android using

the full Xamarin platform.

Extensibility

Page 40: Introduction to xamarin

Demo

Page 41: Introduction to xamarin
Page 42: Introduction to xamarin

• Create Automated User

Interface tests all in C#

• Upload to the Test Cloud or

run against a Device or

Simulator

• Run directly from Visual Studio

or Xamarin Studio

• Exposed via a NuGet Package

• Free to use a Simulator*

Test Cloud + UITest

Page 43: Introduction to xamarin

Real-time monitoring. Track crashes and exceptions to

understand what is happening with live users.

Page 44: Introduction to xamarin

Report

• Automatically report

any uncaught

managed or native

exception.

• Report your own

caught exceptions with

simple cross-platform

API

Page 45: Introduction to xamarin

Track

• Track any event that

occurs in your

application.

• Even track performance

of how long an

operation takes.

Page 46: Introduction to xamarin

Xamarin.Forms Controls

blog.xamarin.com/enterprise-component-vendors-join-xamarin.forms-ecosystem/