c# client to cloud
DESCRIPTION
Talk given today at LondonAzureTRANSCRIPT
@slodge
C# - Cloud to Mobile Survival, Inquiry, Sophistication
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
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
C# Cloud
C# Clients
C# Cloud-Client Communication
C# Code
Real App Examples
Q&A
On with some engineering…
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#?
Hey Dude - Javascript – it’s Amazeballs
Yes
Yes
Yes
But… “Our biggest mistake was
betting too much on HTML5”
http://bitly.com/QhPf5L
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?
Azure is:
big
cheap
Azure is not:
infinite
free
Important
Examples: Faster Solutions Lottery Results
Web Role
Storage
Worker Role
Push
TweetPic
Demo: Code
Azure
Website Azure
Storage
SQL
Azure
Storage: SQL via EF Code First
Storage: Azure Blob Uploads
Data Services: WCF oData
Data Services: Json ASP.Net MVC
• Switch to ApiController – WebApi
• Consider Azure Mobile Services
• ‘Legacy’ WCF also fully supported
Data Service: More Options
* well…. almost fully ;)
*
Data Services: Size Matters
JSON list of 100 pictures XML Gzip JSON
58kB 21kB 2kB
JSON
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
…
Survival: Simple TweetPic Client
WP7
XAML
+ C# CodeBehind
Survival: Simple TweetPic Client
Inquiry: TweetPic Client
Service Consumption
Business Logic
Local Data/Services
UI Logic - ViewModels
Presentation - WP7 – XAML
Sophistication: TweetPic Clients
Service Consumption
Business Logic
UI Logic - ViewModels
WP7 – XAML Win8 – XAML iOS – XIB/MT.D Droid – AXML
Local Data/Services
Sophistication: Prove it - Test it
Sophistication: TweetPic clients
Declarative Presentation
C# App Stack
WP7 iOS Droid Win8
Data Access
Business Logic
Presentation
Service Consumption
Business Logic
Local Data/Services
UI Logic
Examples: RunSat
Non Cloud
Web Site
Blob
Storage
SQL
Server
Examples: SQLBits Conference App
Azure Website based
Service Download
Twitter Authentication
Checkin
Checkin Scoreboards
Photo Upload
Examples: Azure London Conference App
Example: Azure London Conference App
Open source helps!
• Xamarin Mobile API
• Redth/Zxing control
• Reactive.Net
• …
Examples: Xbox Advertising Apps
Example: Xbox Advertising Apps
http://www.youtube.com/watch?v=LPC8V-W_CKg
Example: Xbox Advertising Apps
Examples: AzureApp
Mobile Services?
WP7 iOS Droid Win8
Data Access
Business Logic
Presentation
Service Consumption
Business Logic
Local Data/Services
UI Logic
Azure Mobile Services
Mobile Services?
C# Cloud
C# Clients
C# Cloud-Client Communication
C# Code
Real App Examples
Q&A
Recap
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:
@slodge
@slodge
@slodge
@slodge
@slodge
@slodge
Push Notifications