talbott's boston mvvmcross talk

25
Cross Platform Native Mobile App Development in C# Using Xamarin 2.0 and Visual Studio 2012 Talbott Crowell @talbo tt

Upload: stuart-lodge

Post on 07-May-2015

2.802 views

Category:

Technology


4 download

DESCRIPTION

For original: https://skydrive.live.com/view.aspx?resid=71AED2851E77C393!518&cid=71aed2851e77c393&app=PowerPoint&authkey=!AOCNLXIAFCQX5zw

TRANSCRIPT

Page 1: Talbott's Boston MvvmCross Talk

Cross Platform Native Mobile App Development in C#

Using Xamarin 2.0 and Visual Studio 2012

Talbott Crowell@talbott

Page 2: Talbott's Boston MvvmCross Talk

Native Mobile App Dev Today• Many different IDE’s– Eclipse, Visual Studio, Xcode

• Many different Languages– Java, C#, Objective-C

• Many different Frameworks– Android SDK, Windows Phone SDK, iOS SDK

Page 3: Talbott's Boston MvvmCross Talk

Solution• Xamarin 2.0 Business Edition or better• Visual Studio 2012 Professional or better• MvvmCross• One language C# via Mono

Page 4: Talbott's Boston MvvmCross Talk

MVVM

Model ViewViewModel

Page 5: Talbott's Boston MvvmCross Talk

MVVM Libraries

• http://nuget.org/packages?q=MVVM• 279 results• Including– Knockout.js (JavaScript)– MVVM Light– Caliburn.Micro

Page 6: Talbott's Boston MvvmCross Talk

• MvvmCross – Used by many Xamarin projects

• ZK – For Java

• PRISM – The Original from MSP&P

• Simple MVVM– On CodePlex

Other Frameworks

Page 7: Talbott's Boston MvvmCross Talk

Implementing the MVVM Pattern• MSDN: http://bit.ly/impmvvm

Page 8: Talbott's Boston MvvmCross Talk

MvvmCross @slodge• https://www.youtube.com/user/MrHollywoof• Lots of great YouTube videos on how to use

MvvmCross

MvvmCross v3 “Hot Tuna”

Page 9: Talbott's Boston MvvmCross Talk

Portable Class Library• Stuart Lodge: My

current PCL setup in Visual Studio for the Xamarin twins

• http://bit.ly/pclhack

Page 10: Talbott's Boston MvvmCross Talk

Shared Core

Page 11: Talbott's Boston MvvmCross Talk

Environment Setup• iOS• Android• Windows Phone

Page 12: Talbott's Boston MvvmCross Talk

Xamarin.iOS• System Requirements

– Mac Hardware with MacOS• Required for compiling

– iOS Simulator• Comes with Xcode

– iPhone• Get UUID from iTunes• Register the Device on the iOS Provisioning

Portal• Create and download a Provisioning Profile• Add it to Xcode Organizer under Devices

Page 13: Talbott's Boston MvvmCross Talk

Xamarin.Android• Needs Android

SDK Tools latest update

Page 14: Talbott's Boston MvvmCross Talk

Android Virtual Device Manager• AVD Manager• Edit Existing, change name and Platform

Page 15: Talbott's Boston MvvmCross Talk

Targeting Android Versions

Jelly

Bean 17

Jelly

Bean 16

Ice Crea

m Sandwich

15

Honeyco

mb 13

Gingerb

read 10

Gingerb

read 9

Froyo

8

Eclair

7

Donut 40.0%

20.0%

40.0%

60.0%

80.0%

100.0%

120.0%

4.0%

33.0%

58.6% 58.7%

95.1% 95.2% 98.4% 99.9% 100.0%

Users

Users

Page 16: Talbott's Boston MvvmCross Talk

Windows Phone 8• Uses Hyper-V for Emulator• From a Mac using Parallels 8 turn on Nested

Virtualization– Allows for a VM within a VM– Also requires Intel CPU with EPT

• Available in all Intel Nehalem-based CPUs with virtualization support; namely in Core i7, Core i5, Core i3, Pentium G6950 and appropriate Xeons

Page 17: Talbott's Boston MvvmCross Talk

Using “Hello World” to Verify• Xamarin installs templates for iOS and Android• Install the Windows Phone SDK for WP8• Use Visual Studio

project templates to test each platform

Page 18: Talbott's Boston MvvmCross Talk

MvvmCross and NuGet• Using NuGet you can search for “mvvmcross” to find all

the packages you need• Create a PCL– Install Hot Tuna

• Add a new iPhone, Android, and Windows Phone Project and add Hot Tuna to each– Hot Tuna (MvvmCross v3) comes with to-do instructions for

each

Page 19: Talbott's Boston MvvmCross Talk

Leveraging the MvvmCross Plugins• Plugins for– Location Services– Messaging– Picture Chooser– JSON– Much more…

Page 20: Talbott's Boston MvvmCross Talk

Extend Beyond Xamarin• Xamarin enables you to reference Java and

Objective C libraries using a “binding” process• Leveraging a Java library for Android (JAR)– http://bit.ly/bindingJar

• Leveraging an iOS library– http://bit.ly/bindingObjectiveC

Page 21: Talbott's Boston MvvmCross Talk

Build Plugin for MvvmCross• If you want to build your own plug-in for

MvvmCross, there is info online– http://bit.ly/mvxplugin

Page 22: Talbott's Boston MvvmCross Talk

Other Supported Platforms• Phone

– iPhone, Android, Windows Phone 7.5 and WP8• Tablet

– iPad, Android, Windows Store (WinRT)• Desktop

– Mac, Windows Store (WinRT), WPF• Browser

– Silverlight

Page 23: Talbott's Boston MvvmCross Talk

Summary• Using the following tools:– Xamarin 2.0 Business Edition– Visual Studio 2012 Professional– MvvmCross (Mvx)

• You can create native cross platform mobile applications

Page 24: Talbott's Boston MvvmCross Talk

Resources• Bit.ly bundle with links to videos, slides, blog

posts, etc…– http://bitly.com/bundles/talbott/1 – Look for the MvvmCross badge on blog posts and

videos

Page 25: Talbott's Boston MvvmCross Talk

Cross Platform Native Mobile App Development in C#

Using Xamarin 2.0 and Visual Studio 2012

Talbott Crowell@talbott

Thank you for coming to