Slide 1

Slide 1 text

Building Multi-Platform Native Apps with MVVM and C# Greg Shackles Senior Software Engineer Olo @gshackles [email protected] github.com/gshackles

Slide 2

Slide 2 text

gonemobile.io @GoneMobileCast

Slide 3

Slide 3 text

Google Apple RIM Microsoft Symbian 52.5% Android 41.4% Apple 3.3% Microsoft 2.5% RIM Source: comScore US Market Share: April 2014

Slide 4

Slide 4 text

Write Once, Run Anywhere

Slide 5

Slide 5 text

Write Once, Run Anywhere BUSTED

Slide 6

Slide 6 text

Xamarin: C# All The Things! * * and F# too!

Slide 7

Slide 7 text

Xamarin: C# All The Things! * * and F# too! •100% Native

Slide 8

Slide 8 text

Xamarin: C# All The Things! * * and F# too! •100% Native •Full access to platform SDKs

Slide 9

Slide 9 text

Xamarin: C# All The Things! * * and F# too! •100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc

Slide 10

Slide 10 text

Xamarin: C# All The Things! * * and F# too! •100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc •Improved API

Slide 11

Slide 11 text

Xamarin: C# All The Things! * * and F# too! •100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc •Improved API •Shared code across platforms

Slide 12

Slide 12 text

Xamarin: C# All The Things! * * and F# too! •100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc •Improved API •Shared code across platforms •Garbage collection

Slide 13

Slide 13 text

Xamarin: C# All The Things! * * and F# too! •100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc •Improved API •Shared code across platforms •Garbage collection •Visual Studio / Xamarin Studio

Slide 14

Slide 14 text

Xamarin: C# All The Things! * * and F# too! •100% Native •Full access to platform SDKs •BCL, Async, LINQ, etc •Improved API •Shared code across platforms •Garbage collection •Visual Studio / Xamarin Studio •Frequent Releases

Slide 15

Slide 15 text

MVVM

Slide 16

Slide 16 text

MVVM View

Slide 17

Slide 17 text

MVVM View Model

Slide 18

Slide 18 text

MVVM View View Model Model

Slide 19

Slide 19 text

MVVM View Binder View Model Model

Slide 20

Slide 20 text

MVVM Click Me View Binder View Model Model

Slide 21

Slide 21 text

MVVM Click Me 1. action View Binder View Model Model

Slide 22

Slide 22 text

MVVM Click Me 1. action 2. event handling View Binder View Model Model

Slide 23

Slide 23 text

MVVM Click Me 1. action 2. event handling 3. command View Binder View Model Model

Slide 24

Slide 24 text

MVVM Click Me 1. action 2. event handling 3. command 4. access data View Binder View Model Model

Slide 25

Slide 25 text

MVVM Click Me 1. action 2. event handling 3. command 4. access data 5. notify change View Binder View Model Model

Slide 26

Slide 26 text

MVVM Click Me 1. action 2. event handling 3. command 4. access data 5. notify change 6. get changed data View Binder View Model Model

Slide 27

Slide 27 text

MVVM Click Me Hello World! 1. action 2. event handling 3. command 4. access data 5. notify change 6. get changed data 7. update UI View Binder View Model Model

Slide 28

Slide 28 text

MvvmCross

Slide 29

Slide 29 text

MvvmCross

Slide 30

Slide 30 text

MvvmCross: Highlights

Slide 31

Slide 31 text

• Shared behavior, not presentation MvvmCross: Highlights

Slide 32

Slide 32 text

• Shared behavior, not presentation • Bind all the platforms! MvvmCross: Highlights

Slide 33

Slide 33 text

• Shared behavior, not presentation • Bind all the platforms! • Powerful binding options MvvmCross: Highlights

Slide 34

Slide 34 text

• Shared behavior, not presentation • Bind all the platforms! • Powerful binding options • Convention over configuration MvvmCross: Highlights

Slide 35

Slide 35 text

• Shared behavior, not presentation • Bind all the platforms! • Powerful binding options • Convention over configuration • Pluggable architecture MvvmCross: Highlights

Slide 36

Slide 36 text

• Shared behavior, not presentation • Bind all the platforms! • Powerful binding options • Convention over configuration • Pluggable architecture • PCL MvvmCross: Highlights

Slide 37

Slide 37 text

• Shared behavior, not presentation • Bind all the platforms! • Powerful binding options • Convention over configuration • Pluggable architecture • PCL • Inversion of Control MvvmCross: Highlights

Slide 38

Slide 38 text

• Shared behavior, not presentation • Bind all the platforms! • Powerful binding options • Convention over configuration • Pluggable architecture • PCL • Inversion of Control • Testable MvvmCross: Highlights

Slide 39

Slide 39 text

MvvmCross: Resources

Slide 40

Slide 40 text

•Source: github.com/slodge/MvvmCross MvvmCross: Resources

Slide 41

Slide 41 text

•Source: github.com/slodge/MvvmCross •Stuart’s Blog: slodge.blogspot.com MvvmCross: Resources

Slide 42

Slide 42 text

•Source: github.com/slodge/MvvmCross •Stuart’s Blog: slodge.blogspot.com •N+1: mvvmcross.wordpress.com MvvmCross: Resources

Slide 43

Slide 43 text

•Source: github.com/slodge/MvvmCross •Stuart’s Blog: slodge.blogspot.com •N+1: mvvmcross.wordpress.com •Chat: jabbr.net/#/rooms/mvvmcross MvvmCross: Resources

Slide 44

Slide 44 text

Presenters

Slide 45

Slide 45 text

• Customize view presentation Presenters

Slide 46

Slide 46 text

• Customize view presentation • Platform-specific Presenters

Slide 47

Slide 47 text

• Customize view presentation • Platform-specific • Still retain View Model logic Presenters

Slide 48

Slide 48 text

• Customize view presentation • Platform-specific • Still retain View Model logic Presenters •Tabs / Panorama

Slide 49

Slide 49 text

• Customize view presentation • Platform-specific • Still retain View Model logic Presenters •Tabs / Panorama •Split View / Master-Detail

Slide 50

Slide 50 text

• Customize view presentation • Platform-specific • Still retain View Model logic Presenters •Tabs / Panorama •Split View / Master-Detail •Fragments

Slide 51

Slide 51 text

• Customize view presentation • Platform-specific • Still retain View Model logic Presenters •Tabs / Panorama •Split View / Master-Detail •Fragments •Modals

Slide 52

Slide 52 text

• Customize view presentation • Platform-specific • Still retain View Model logic Presenters •Tabs / Panorama •Split View / Master-Detail •Fragments •Modals •Hamburger menu

Slide 53

Slide 53 text

Presenters

Slide 54

Slide 54 text

Presenters

Slide 55

Slide 55 text

Presenters

Slide 56

Slide 56 text

Presenters

Slide 57

Slide 57 text

Plugins

Slide 58

Slide 58 text

Plugins • Accelerometer • Download Cache • Email • File • Json • Localization • Location • Messenger • Phone Call • Picture Chooser • SQLite • Visibility • Web Browser • Many More!

Slide 59

Slide 59 text

Xamarin.Forms Shared C# App Logic Shared C# User Interface Code

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

Pages Content MasterDetail Navigation Tabbed Carousel

Slide 62

Slide 62 text

Pages Layouts Content MasterDetail Navigation Tabbed Carousel Stack Absolute Relative Grid Content Scroll Frame

Slide 63

Slide 63 text

Controls

Slide 64

Slide 64 text

Controls • ActivityIndicator • BoxView • Button • DatePicker • Editor • EntryImage • Label • ListView • Map • OpenGLView • PickerProgressBar • SearchBar • SliderStepper • TableView • TimePicker • WebView • EntryCell • ImageCell • SwitchCell • TextCell • ViewCell

Slide 65

Slide 65 text

No content