30
Xamarin Building Native Mobile, Mac and Windows Apps in C# Anuradha Wickramarachchi Mithila Wickramarathne Vijini Mallawaarachchi Dimuthu Kariyawasam (Interns)

Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Embed Size (px)

Citation preview

Page 1: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

XamarinBuilding Native Mobile, Mac and Windows Apps in C#

Anuradha Wickramarachchi

Mithila WickramarathneVijini MallawaarachchiDimuthu Kariyawasam

(Interns)

Page 2: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

•Introduction to Xamarin•Unique approach of Xamarin in developing apps•Mobile Software Development Lifecycle•Introducing Xamarin Studio•Demonstration of a Xamarin sample app

Outline

Page 3: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

Page 4: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

What is Xamarin?•Cross-platform implementations of the Common Language Infrastructure (CLI) and Common Language Specifications (often called Microsoft .NET)

• https://www.xamarin.com

Page 5: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

Silo Approach in mobile development?

Page 6: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

Xamarin to the rescue

Page 7: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

Why C#?Anything you can do in Java or Objective-C, you can do it in C# also•More Types, Less Typing

var•Stronger Types, Smarter Tools (with Generics)

Dictionary<string, UIImage>•Language-level Asynchronous programming support

Async, await•First-class Functions

items.Where(item => item.Published.Date == date).ToList()

Page 8: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

How Does Xamarin Work?•Xamarin offers two commercial products

1.Xamarin.iOS2.Xamarin.Android

•On iOS, Xamarin’s Ahead-of-Time ( AOT) Compiler compiles Xamarin.iOS applications directly to native ARM assembly code.•On Android, Xamarin’s compiler compiles down to Intermediate Language ( IL), which is then Just-in-Time ( JIT) compiled to native assembly when the application launches.

Page 9: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

Xamarin.iOS•Access any iOS SDK API•Invoke Objective-C code using C#•Build apps for Apple watch platform•Same day support for latest OS builds by Apple

Page 10: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

Xamarin.Android•Access any Android SDK API•Invoke Java code using C#•Build apps for Android wear•Up-to-date with latest release of Android

Page 11: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

Xamarin.Forms•Native UI for iOS, Android and windows mobile from a single shared C# codebase.•Create the UI in C# or XAML.•At runtime, mapped into native UI elements.

Page 12: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

Xamarin.iOS or Xamarin.Android is ideal•For apps that require native behavior•For accessing many platform-specific APIs•Where custom UI is more important than code sharing across the platforms

Page 13: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introduction to Xamarin

Xamarin.Forms is ideal•For apps that require little platform specific functions•Where code sharing is more important than custom UI’s

Page 14: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Mobile Software Development Lifecycle

Page 15: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Mobile Software Development Lifecycle

Mobile Development SDLC5 major portions of the process

1. Inception2.Design3.Development4.Stabilization5.Deployment

Page 16: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Mobile Software Development Lifecycle

InceptionMajor considerations

•Competitive Advantage•Infrastructure Integration•Value•Form/Mobility

Page 17: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Mobile Software Development Lifecycle

DesignUX & UI Design

Page 18: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Mobile Software Development Lifecycle

Development & StabilizationCoding of the app begins during development phase

An idea is developed to a working prototype

Significant stages in Stabilization are:•Prototype•Alpha•Beta•Release Candidate

Use Xamarin Profiler for profiling

Page 19: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Mobile Software Development Lifecycle

Page 20: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Mobile Software Development Lifecycle

DistributionXamarin.iOS and Objective-C apps are distributed in exactly the same way as•Apple App Store•In-House Deployment•Ad-Hoc Deployment

Android apps are distributed via Google Play, AppBrain, Amazon App Store for Android, Handango and GetJar.

Windows Phone applications are distributed to users via the Windows Store

Page 21: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introducing Xamarin Studio

Page 22: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introducing Xamarin Studio

Xamarin Powerful Features•Complete Binding for the underlying SDKs•Objective-C, Java, C, and C++ Interoperability•Modern Language Constructs•Amazing Base Class Library (BCL)•Modern Integrated Development Environment (IDE)•Mobile Cross Platform Support

Page 23: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introducing Xamarin Studio

Development Environments

Page 24: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introducing Xamarin Studio

Page 25: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introducing Xamarin Studio

Page 26: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introducing Xamarin Studio

Page 27: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Introducing Xamarin Studio

Directly edit Storyboards

Double-click a storyboard file to edit it in the IDE. Drag-and-drop controls to build screens, name

controls to create fields, and double-click to add handlers without switching to Xcode.

More accurate than Xcode

View controllers are controls are a pixel-perfect representation of

screens as they will appear when running on iOS devices which

makes it much more accurate than Xcode.

Live-rendered custom controls

Unlike Xcode's Interface Builder, the Xamarin iOS Designer renders your custom views just as easy as it renders UIKit controls-live, with custom properties editable in the

properties pad.

Never touch a line of XML

Easily create Android screens by dragging controls onto the app

builder. And configuring them using the properties pad, without XML.

Multiple resolutions at once

Preview layouts across multiple screen resolutions and device form

factors simultaneously with the Xamarin Android Designer.

Perfect property editing

Quickly configure the appearance, layout, field names, and event handlers for controls and views using a sleek properties pad.

iOS

Android

iOS iOS

Android AndroidiOS

Page 28: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Demonstration of a Xamarin sample app

Page 29: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Q&A

Page 30: Xamarin: Building Native Mobile, Mac and Windows Apps in C#

Thank You