mobile development strategies with mvvm

42
Data Bind Everything! Mobile Development Strategies with MVVM James Montemagno Developer Evangelist, Xamarin Tweet: @JamesMontemagno, @XamarinHQ #Xamarin www.MotzCod.es, www.Xamarin.com

Upload: james-montemagno

Post on 19-Aug-2014

480 views

Category:

Engineering


5 download

DESCRIPTION

Take an in-depth look at mobile development architecture patterns including MVC and MVVM. Explore what you get out of the box, and what you get with frameworks such as Bind, Mvvm Light, and MvvmCross. Code is all with C# and xamarin on android, ios, and windows phone

TRANSCRIPT

Page 1: Mobile development strategies with MVVM

Data Bind Everything!

Mobile Development Strategies with MVVMJames MontemagnoDeveloper Evangelist, Xamarin Tweet: @JamesMontemagno, @XamarinHQ #Xamarinwww.MotzCod.es, www.Xamarin.com

Page 2: Mobile development strategies with MVVM

“MVVM is awesome and will revolutionize your application

development process.”-James Montemagno

Page 3: Mobile development strategies with MVVM

Let’s talk architecture(because that is fun)

Page 4: Mobile development strategies with MVVM

Well First…. What is Xamarin?

Page 5: Mobile development strategies with MVVM

Mobile Development Approaches

Page 6: Mobile development strategies with MVVM

Single App

OR OR

Page 7: Mobile development strategies with MVVM

Silo Approach

Page 8: Mobile development strategies with MVVM

Write Once, Run Anywhere Approach

Lowest common denominator

App Generation

Page 9: Mobile development strategies with MVVM

Write Once, Run Anywhere Approach

Lowest common denominator

App Generation

Page 10: Mobile development strategies with MVVM

Xamarin’s Unique Approach

Page 11: Mobile development strategies with MVVM

C# on 2.6 Billion Devices

Page 12: Mobile development strategies with MVVM
Page 13: Mobile development strategies with MVVM
Page 14: Mobile development strategies with MVVM
Page 15: Mobile development strategies with MVVM

100% API Coverage

Page 16: Mobile development strategies with MVVM

Anything you can do in Objective-C or Java can be done in C# and Visual Studio with

Xamarin!

Page 17: Mobile development strategies with MVVM

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 18: Mobile development strategies with MVVM

Code Sharing: Accelerate Development

Android

iOS

Mac

WP

Page 19: Mobile development strategies with MVVM

For real, let’s talk architecture

Page 20: Mobile development strategies with MVVM

Why do we use them?•Organize & Maintain Code•Abstract away all business logic

•Re-use a high percent of our code

•Make our views dumb!•Our architect told us to

Page 21: Mobile development strategies with MVVM

What is MVC?

Page 22: Mobile development strategies with MVVM

Model-View-Controller

Model

View Controller

Updates

Sees Uses

Manipulates

Page 23: Mobile development strategies with MVVM

What is MVVM?

Page 24: Mobile development strategies with MVVM

Model-View-ViewModel

ModelView ViewModel

How to display information

What to displayFlow of interaction

Business LogicData objects

Events

DataData

Page 25: Mobile development strategies with MVVM

MVVM != Data Binding

Page 26: Mobile development strategies with MVVM

MVVM Framework == Data Binding

Page 27: Mobile development strategies with MVVM

Model-View-ViewModel

ModelView ViewModel

Magic Binding Framework Here

Page 28: Mobile development strategies with MVVM

Live Coding Adventure 1

Page 29: Mobile development strategies with MVVM

Microsoft World• Built into:

Windows PhoneWindows StoreWPF

• Does not:NavigationIoCFun Stuff

• Provides:Data BindingCommands

Page 30: Mobile development strategies with MVVM

What about….

Page 31: Mobile development strategies with MVVM

Enter Frank Krueger & Bind!• https://github.com/praeclarum/Bind

• Easy two-way data binding

Page 32: Mobile development strategies with MVVM

Live Coding Adventure 2

Page 33: Mobile development strategies with MVVM

How about even more?

Page 34: Mobile development strategies with MVVM

== AWESOME

How about even more?

Page 35: Mobile development strategies with MVVM

MvvmCross•Super MVVM framework for all•Data Binding•Commands•Navigation•IoC•Plugins•So Much More…

Page 36: Mobile development strategies with MVVM

Live Coding Adventure 3

Page 37: Mobile development strategies with MVVM

Xamarin Evolve 2013Sold

Out!

650Conference Attendees

8,400Live stream

hours viewed

#1Trending on Twitter

during keynote

Watch Sessions & Highlights: http://xamarin.com/evolve/2013

Page 38: Mobile development strategies with MVVM

www.xamarin.com/evolve

Page 39: Mobile development strategies with MVVM

• Sign up at xamarin.com/university• Learn to build native iOS, Android, and Windows

apps with C#.• Live online, interactive classes with live coding.• Labs with full source code solutions.• Access to Xamarin Certified Developer exam.• Unlimited Annual Access: Enjoy unlimited, live

mobile development training from mobile experts, on your schedule, and as often as you'd like.

Page 40: Mobile development strategies with MVVM

Where Do I Start?Xamarin.com

Page 41: Mobile development strategies with MVVM

GET YOUR C# SHIRT TODAY!

Page 42: Mobile development strategies with MVVM

Find Me:@JamesMontemagnowww.MotzCod.esGitHub.com/JamesMontemagno

Xamarin:@XamarinHQwww.Xamarin.com

MvvmCrosshttp://mvvmcross.wordpress.comGitHub.com/MvvmCrossNuGet: MvvmCross

Latest AppMy StepCounter for Android & iOS

www.MyStepCounterApp.com100% Open Source Starter Compatible