You are on page 1of 36

Nguyn Nh Hiu

Xamarin Vietnam
UserGroup Leader

C# on 2.6 billion devices

Architecting
Mobile Apps

Silo
Approach
Build Apps
Multiple
Times

Write Once,
Run Anywhere
Approach
Lowest
Common
Denominator

APIs,
Framewworks

Applicati
on

IDE

Mobile enterprise application paradigm

HT
ML5

- Reponsive
- Sencha touch,
jQuery

- Xamarin
- Phonegap
- Titanium

Nati
ves

- iOS
- Android
- Windows

SDKs
3rd Party Libs
Storage, Database

Xamarins
Unique
Approach
Native
with Code
Sharing

C# runs on 2.6 Billion Devices

Native Performance

Xamarin.iOS does full Ahead Of


Time (AOT) compilation to
produce an ARM binary for
Apples App Store.

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

Agenda
Week 1 Classic native dev with Xamarin
Week 2 MVVMCross
Week 3 Xamarin Forms
Assessment 1 app (iOS, Android & WP)

Xamarin and Visual Studio

Android App Settings

iOS App Settings

Demo

Hello Xamarin.iOS & Xamarin.Android

Portable Class Library (PCL)

1 Solution
Multiple Platforms

Portable Class Library Why?


Centralized Code
Sharing
Consistent Structure
Seamless Debug
Easy to maintain

Project Sharing (Core)


NuGet
Xamarin Component
Store

Xamarin iOS

Xamarin iOS

Xamarin iOS In Code

100% Components ported to C#


iOS UI can be done without XIB/ StoryBoards

Xamarin iOS - Storyboard

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

Xamarin Designer in Action

Xamarin Android

Java Translation via Sharpen

XobotOS

Xamarin Android

Activity

Intent

Resources

Services

Xamarin Android UI

Xamarin
Designer for
Android
Fully integrated into
Xamarin Studio & Visual
Studio
Multi-resolution editing
Easy switch between
design and Android XML
Shipping for over 2 years

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

Shared Project

#if Conditional Blocks


Enable/disable pieces of code based on target platform
Platform-specific compilation constants:

NETFX_CORE
WINDOWS_PHONE
_IOS_
_ANDROID_

For subtle differences in the APIs

NuGet Package Manager


Full support for using
NuGet packages
Take advantage of the
many NuGet packages
which are are now
shipping with Xamarin
compatibility in Visual
Studio or Xamarin
Studio

Model View ViewModel

Model View ViewModel

Try
Xamarin
Today

You might also like