C# Client to Cloud
-
Upload
stuart-lodge -
Category
Documents
-
view
1.056 -
download
3
description
Transcript of C# Client to Cloud
![Page 1: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/1.jpg)
![Page 2: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/2.jpg)
@slodge
C# - Cloud to Mobile Survival, Inquiry, Sophistication
![Page 3: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/3.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/4.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/5.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/6.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/7.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/8.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/9.jpg)
Azure is:
big
cheap
Azure is not:
infinite
free
Important
![Page 10: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/10.jpg)
Examples: Faster Solutions Lottery Results
Web Role
Storage
Worker Role
Push
![Page 11: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/11.jpg)
TweetPic
Demo: Code
Azure
Website Azure
Storage
SQL
Azure
![Page 12: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/12.jpg)
Storage: SQL via EF Code First
![Page 13: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/13.jpg)
Storage: Azure Blob Uploads
![Page 14: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/14.jpg)
Data Services: WCF oData
![Page 15: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/15.jpg)
Data Services: Json ASP.Net MVC
![Page 16: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/16.jpg)
• 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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/17.jpg)
Data Services: Size Matters
JSON list of 100 pictures XML Gzip JSON
58kB 21kB 2kB
JSON
![Page 18: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/18.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/19.jpg)
Survival: Simple TweetPic Client
WP7
XAML
+ C# CodeBehind
![Page 20: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/20.jpg)
Survival: Simple TweetPic Client
![Page 21: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/21.jpg)
Inquiry: TweetPic Client
Service Consumption
Business Logic
Local Data/Services
UI Logic - ViewModels
Presentation - WP7 – XAML
![Page 22: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/22.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/23.jpg)
Sophistication: Prove it - Test it
![Page 24: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/24.jpg)
Sophistication: TweetPic clients
![Page 25: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/25.jpg)
Declarative Presentation
![Page 26: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/26.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/27.jpg)
Examples: RunSat
Non Cloud
Web Site
Blob
Storage
SQL
Server
![Page 28: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/28.jpg)
Examples: SQLBits Conference App
![Page 29: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/29.jpg)
Azure Website based
Service Download
Twitter Authentication
Checkin
Checkin Scoreboards
Photo Upload
Examples: Azure London Conference App
![Page 30: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/30.jpg)
Example: Azure London Conference App
Open source helps!
• Xamarin Mobile API
• Redth/Zxing control
• Reactive.Net
• …
![Page 31: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/31.jpg)
Examples: Xbox Advertising Apps
![Page 32: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/32.jpg)
Example: Xbox Advertising Apps
http://www.youtube.com/watch?v=LPC8V-W_CKg
![Page 33: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/33.jpg)
Example: Xbox Advertising Apps
![Page 34: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/34.jpg)
Examples: AzureApp
![Page 35: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/35.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/36.jpg)
Mobile Services?
![Page 37: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/37.jpg)
C# Cloud
C# Clients
C# Cloud-Client Communication
C# Code
Real App Examples
Q&A
Recap
![Page 38: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/38.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/39.jpg)
@slodge
![Page 40: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/40.jpg)
@slodge
![Page 41: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/41.jpg)
@slodge
![Page 42: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/42.jpg)
@slodge
![Page 43: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/43.jpg)
@slodge
![Page 44: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/44.jpg)
@slodge
![Page 45: C# Client to Cloud](https://reader034.fdocuments.us/reader034/viewer/2022052622/558cf758d8b42ab04f8b45e7/html5/thumbnails/45.jpg)
Push Notifications