c# client to cloud

45

Upload: stuart-lodge

Post on 26-Jun-2015

1.058 views

Category:

Documents


3 download

DESCRIPTION

Talk given today at LondonAzure

TRANSCRIPT

Page 1: C# Client to Cloud
Page 2: C# Client to Cloud

@slodge

C# - Cloud to Mobile Survival, Inquiry, Sophistication

Page 3: C# Client to Cloud

1. How can we eat?

2. Why do we eat?

3. Where shall we have lunch?

Survival, Inquiry, Sophistication

“The History of every major Galactic Civilization tends to pass through three

distinct and recognizable phases, those of Survival, Inquiry and Sophistication,

otherwise known as the How, Why, and Where phases. For instance, the first

phase is characterized by the question 'How can we eat?' the second by the

question 'Why do we eat?' and the third by the question 'Where shall we have

lunch?”

― Douglas Adams, The Restaurant at the End of the Universe

Page 4: C# Client to Cloud

Survival to Sophistication

486 – 100MHz

“Optimal” 8 MB RAM

13 floppy disks

“Max” 2GB Hard Disk

28.8k US Robotics Modem

2 Cores – 1.5GHz

1 GB RAM

OTA Upgrade

32GB Flash Disk + 7GB online

4G, WiFi, NFC, BlueTooth

£1200 £400

Page 5: C# Client to Cloud

C# Cloud

C# Clients

C# Cloud-Client Communication

C# Code

Real App Examples

Q&A

On with some engineering…

Page 6: C# Client to Cloud

Shared code across mobile and cloud

“low level”: compiles, typesafe, quick

Native performance

Native look and feel

Testable

Libraries: commercial and open – and nuget!

Generics, Linq, async/await and the future…

You already have: skills, tools, code

Why C#?

Page 7: C# Client to Cloud

Hey Dude - Javascript – it’s Amazeballs

Yes

Yes

Yes

But… “Our biggest mistake was

betting too much on HTML5”

http://bitly.com/QhPf5L

Page 8: C# Client to Cloud

Storage – lots of it

Connectivity – lots of it. Continuous. Global

Processing – lots of it. Scalable. Burstable.

Privacy/Security

Quick updateability

Toys – ACS, Queuing, CDN, TrafficManager,

Caching, Services, …

Why Azure?

Page 9: C# Client to Cloud

Azure is:

big

cheap

Azure is not:

infinite

free

Important

Page 10: C# Client to Cloud

Examples: Faster Solutions Lottery Results

Web Role

Storage

Worker Role

Push

Page 11: C# Client to Cloud

TweetPic

Demo: Code

Azure

Website Azure

Storage

SQL

Azure

Page 12: C# Client to Cloud

Storage: SQL via EF Code First

Page 13: C# Client to Cloud

Storage: Azure Blob Uploads

Page 14: C# Client to Cloud

Data Services: WCF oData

Page 15: C# Client to Cloud

Data Services: Json ASP.Net MVC

Page 16: C# Client to Cloud

• Switch to ApiController – WebApi

• Consider Azure Mobile Services

• ‘Legacy’ WCF also fully supported

Data Service: More Options

* well…. almost fully ;)

*

Page 17: C# Client to Cloud

Data Services: Size Matters

JSON list of 100 pictures XML Gzip JSON

58kB 21kB 2kB

JSON

Page 18: C# Client to Cloud

Server:

Storage:

Code First Entity Framework

Azure C# SDK

Logic/Services:

Custom C#

Twitterizer

Presentation:

ASP.NET MVC (Json)

WCF (oData)

Recap: TweetPic Server

Sophistication: Lots of C# Server

technologies are available:

nHibernate

RavenDB

Lucene.Net

MVC Async (+SignalR)

ServiceStack

Azure - Access Signatures

WebAPI

OpenRasta

Simple.Web

Nancyfx

FubuMvc

ASMX and WebForms

ProtocolBuf.Net

Page 19: C# Client to Cloud

Survival: Simple TweetPic Client

WP7

XAML

+ C# CodeBehind

Page 20: C# Client to Cloud

Survival: Simple TweetPic Client

Page 21: C# Client to Cloud

Inquiry: TweetPic Client

Service Consumption

Business Logic

Local Data/Services

UI Logic - ViewModels

Presentation - WP7 – XAML

Page 22: C# Client to Cloud

Sophistication: TweetPic Clients

Service Consumption

Business Logic

UI Logic - ViewModels

WP7 – XAML Win8 – XAML iOS – XIB/MT.D Droid – AXML

Local Data/Services

Page 23: C# Client to Cloud

Sophistication: Prove it - Test it

Page 24: C# Client to Cloud

Sophistication: TweetPic clients

Page 25: C# Client to Cloud

Declarative Presentation

Page 26: C# Client to Cloud

C# App Stack

WP7 iOS Droid Win8

Data Access

Business Logic

Presentation

Service Consumption

Business Logic

Local Data/Services

UI Logic

Page 27: C# Client to Cloud

Examples: RunSat

Non Cloud

Web Site

Blob

Storage

SQL

Server

Page 28: C# Client to Cloud

Examples: SQLBits Conference App

Page 29: C# Client to Cloud

Azure Website based

Service Download

Twitter Authentication

Checkin

Checkin Scoreboards

Photo Upload

Examples: Azure London Conference App

Page 30: C# Client to Cloud

Example: Azure London Conference App

Open source helps!

• Xamarin Mobile API

• Redth/Zxing control

• Reactive.Net

• …

Page 31: C# Client to Cloud

Examples: Xbox Advertising Apps

Page 32: C# Client to Cloud

Example: Xbox Advertising Apps

http://www.youtube.com/watch?v=LPC8V-W_CKg

Page 33: C# Client to Cloud

Example: Xbox Advertising Apps

Page 34: C# Client to Cloud

Examples: AzureApp

Page 35: C# Client to Cloud

Mobile Services?

WP7 iOS Droid Win8

Data Access

Business Logic

Presentation

Service Consumption

Business Logic

Local Data/Services

UI Logic

Azure Mobile Services

Page 36: C# Client to Cloud

Mobile Services?

Page 37: C# Client to Cloud

C# Cloud

C# Clients

C# Cloud-Client Communication

C# Code

Real App Examples

Q&A

Recap

Page 38: C# Client to Cloud

azure.com

asp.net/web-api

windowsazure.com/en-us/develop/mobile

winX dev - create.msdn.com

Mono - xaminars from xamarin.com

PCL - blogs.mdsn.com/b/dsplaisted

mvvm - github.com/slodge/mvvmcross

For more inspiration:

Page 39: C# Client to Cloud

@slodge

Page 40: C# Client to Cloud

@slodge

Page 41: C# Client to Cloud

@slodge

Page 42: C# Client to Cloud

@slodge

Page 43: C# Client to Cloud

@slodge

Page 44: C# Client to Cloud

@slodge

Page 45: C# Client to Cloud

Push Notifications