際際滷

際際滷Share a Scribd company logo
Azure back-end 亟仍
iOS	
 亳 Android
仂弍亠仆仆仂亳	
 舒亰舒弍仂从亳	
 亳	
 	
 
弍亶	
 舒
亳舒仍亳亶	
 舒仄	
 
vitaly.baum@gmail.com	
 
@butaji
弌从舒	
 亟仂从仍舒亟舒
≒ 丐亠弍仂于舒仆亳	
 从	
 仄仂弍亳仍仆仂仄	
 
仗亳仍仂亢亠仆亳	
 
≒ 仂弍亠仆仆仂亳	
 亠舒仍亳亰舒亳亳 	
 
≒ 舒从亳亠从亳亠	
 仂于亠	
 
≒ 舒从	
 弍仂	
 仗仂仂亳	
 
仗仂仂亳仗
http://bit.ly/1819mzC
Dealer Mobility
≒ 仂弍亳仍仆舒	
 仗仍舒仂仄舒	
 
亟仍	
 舒于仂亟亳仍亠仂于	
 
仂于仂亳,	
 仗亠仗亠亟仍仂亢亠仆亳	
 
舒仗亳	
 仆舒	
 丐,	
 仍亳仆亶	
 从舒弍亳仆亠	
 
仗仂于亠亠仆亳	
 	
 仗仂仄仂	
 push
亠
≒ 弌亠于亠仆舒	
 从仂仄舒仆亟舒	
 
舒亰舒弍仂亳从亳	
 .NET
≒ 仂弍亳仍仆舒	
 从仂仄舒仆亟舒	
 
舒亰舒弍仂亳从亳	
 iOS
舒亰舒弍仂亳从亳	
 油粥稼糸姻看庄糸
仂仆舒从	
 于亰舒亳仄仂亟亠亶于亳
≒ 弌亠于亠仆舒	
 从仂仄舒仆亟舒	
 仆亠	
 亰仆舒亠	
 仂	
 仗亳舒	
 
≒ 仍亳亠仆从舒	
 从仂仄舒仆亟舒	
 亢亟	
 仗仂从舒	
 亠于亠仆舒	
 
仆舒仗亳亠	
 仂-足仆亳弍亟	
 
≒ 仂仆舒从	
 弍亠仗仂仍亠亰仆仂	
 仗亠亠亟舒于舒	
 	
 
仗仂仄仂	
 POCO
仂仂从仂仍	
 于亰舒亳仄仂亟亠亶于亳
≒ HTTP REST/JSON
≒ 舒仗仂	
 亠亠亰	
 HTTPS + AppKey
仂弍仍亠仄舒	
 仗仂仂从仂仍舒:	
 
≒ 亠亳仂仆亳仂于舒仆亳亠	
 
≒ 亠亠仆仂	
 亠亠亰	
 /api/v1/
弌亠于亠仆舒	
 仂仂仆舒
≒ 	
 仆舒亳仆舒仍仂	
 于	
 2011	
 亞仂亟
≒ WCF REST Starter Kit
丼仂	
 仆亠仂弍仂亟亳仄仂	
 仄仂弍亳仍仆仂仄	
 
仗亳仍仂亢亠仆亳	
 仂	
 backend?
丼仂	
 仆亢仆仂	
 亟仍	
 仗亳仍仂亢亠仆亳?
≒ 丱舒仆亠仆亳亠	
 亟舒仆仆	
 (舒亰舒,	
 个舒亶仍)	
 
≒ 	
 于亠亟仂仄仍亠仆亳	
 
≒ 丕仗舒于仍亠仆亳亠	
 仗仂仍亰仂于舒亠仍礆亳	
 
≒ 丐舒仆仍亳	
 亰于从舒/于亳亟亠仂	
 
≒ 仆舒仍亳亳从舒	
 亳仗仂仍亰仂于舒仆亳
舒	
 仍舒亶
≒ 	
 .net 舒亰舒弍仂亳从亳,	
 从仂仂亠	
 仄亠ム	
 
仂仂仂	
 亞仂仂于亳	
 SQL Server
≒ 	
 亠弍仂于舒仆亳亠,	
 仂	
 仗仂亟从	
 仄仂亢仆仂	
 
舒于亳	
 On Premise
丱舒仆亠仆亳亠	
 亟舒仆仆
	
 Azure 亠:
≒ 亠仍亳仂仆仆仂亠	
 舒仆亳仍亳亠	
 
≒ Blob storage
亠亠仆亳亠:	
 
≒ SQL Server + Entity Framework
弌亳仆仂仆亳亰舒亳	
 亟舒仆仆
≒ 丐亠弍仂于舒仆亳亠	
 	
 舒弍仂舒	
 仂仍舒亶仆
≒ 	
 亟于亠	
 舒亠亞亳亳	
 
仍仂仂亶	
 从亠	
 
丱仂仂亳亶	
 从亠
Data Sync
≒ 亠亳	
 舒亟亳	
 亳亰仄亠仆亠仆亳亶	
 亟舒仆仆	
 
 个舒从亳亠从亳	
 仍仂亞亳仂于舒	
 CRUD 仂仗亠舒亳亳	
 
 仍亳	
 于于亠亳	
 舒亳弍	
 
≒ CreatedAt
≒ UpdatedAt	
 
≒ Deleted
Data Sync
于亠仄
亳亰仄亠仆亠仆亳	
 亟舒仆仆 亟舒仆仆亠	
 亟仍	
 亳仆仂仆亳亰舒亳亳
1.04.20132011
Data Sync
void Update(NewsItem newsItem)
{
//update database record
EventLog.Append(
NewsItem,Updated,
newsItem.Id, newsItem.ToJson());
}
Data Sync
/changes?since=01.04.2013
{
News :
{
Added : [1,2,3,4,5],
Updated: [2,3],
Deleted: [5]
}
}
Data Sync
Changes GetChanges(DateTime since)
{
return EventLog
.FetchSince(since)
.GroupBy(x => x.ItemType);
}
Data Sync
/news/changes?since=01.04.2013
{
Added : [1,2,3,4,5],
Updated: [2,3],
Deleted: [5]
}
Data Sync
/news/changes?since=01.04.2013&data=true
{
Added : [{ Id : 1,Text: Latest news},
Updated: [{ Id : 2,Text: Shock news}],
Deleted: [3,4,5]
}
个舒亶仍	
 /	
 亳亰仂弍舒亢亠仆亳
/image?id=123&width=720&height=360
≒ 舒亰仆亠	
 舒亰亠亠仆亳	
 从舒仆仂于	
 
≒ 舒亰仆亠	
 仗仍舒仂仄	
 
≒ 亠仆亳于亠	
 从仂仆亠仆-足仄亠仆亠亟亢亠	
 J
	
 于亠亟仂仄仍亠仆亳
≒ Azure Worker Role
≒ PushSharp	
 
≒ 仍	
 仂仂弍亠仆亳亶	
 (仗仂舒/仗亳/仄)
http://sendgrid.com	
 
http://twillio.com
	
 于亠亟仂仄仍亠仆亳
≒ Apple Push Notification Service
The maximum size allowed for a notification
payload is 256 bytes
≒ Google Cloud Messaging
Message can be up to 4kb in size
丕仗舒于仍亠仆亳亠	
 仗仂仍亰仂于舒亠仍礆亳
≒ 舒仂仄仆舒	
 亠舒仍亳亰舒亳	
 
Basic auth
Facebook, twitter, vk.com, odnoklassniki
仂亳仍亳	
 仗仂仍亰仂于舒亠仍亠亶
≒ 弍亳亶	
 AppId 仆舒	
 亠于亠仆仂仄	
 亳	
 仄仂弍亳仍仆仂仄	
 
仗亳仍仂亢亠仆亳亳
仆舒仍亳亳从舒	
 亳仗仂仍亰仂于舒仆亳
≒ 亳仍仂亢亠仆亳亠	
 亳仗仂仍亰亠	
 Flurry, Google
Analytics
≒ 亟仄亳仆仂从舒	
 亳仗仂仍亰亠	
 flurry api, 仂弍	
 
仗仂从舒亰于舒	
 从舒亳于亠	
 亞舒亳从亳	
 
仗仂仍亰仂于舒亠仍礆
仆舒仍亳亳从舒	
 亳仗仂仍亰仂于舒仆亳
≒ 亟亳:	
 仍仂亞亳仂于舒仆亳亠	
 于亠	
 于亰仂于仂于	
 仄亠仂亟仂于	
 
弌舒亳亳从舒	
 仗仂仄仂舒	
 亟舒仆仆	
 
弌舒亳从舒	
 亠亞亳舒亳亶	
 仗仂仍亰仂于舒亠仍亠亶
弌舒亳亳从舒	
 亟亠亶于亳亶	
 仗仂仍亰仂于舒亠仍亠亶
舒从	
 仗仂仂亳	
 仗仂仂亳仗	
 于	
 
从舒舒亶亳亠	
 仂从亳
仂仂亳仗亳仂于舒仆亳亠
≒ 弌亟亠仍舒	
 亰舒	
 于亠亠	
 
≒ 亠	
 亟仂仂亢亠	
 200$/仄亠
≒ 仂弍亳仍仆亶	
 API 亳	
 仄仂亢亠	
 仗仂仆舒亟仂弍亳	
 
舒亟仄亳仆从舒
Backend as Service
≒ Windows Azure Mobile Services
Windows Store
Windows Phone 8
iOS
Android
HTML/JavaScript
REST API
WAMS: iOS,Android
≒ 	
 SDK 亟仍	
 仗仂亠仆亳	
 亟仂仗舒	
 从	
 亟舒仆仆仄	
 
弍舒从亳	
 仆舒亟	
 仗仂亟从仍ム亠仆亳亠仄	
 亳	
 舒弍仍亳舒仄亳	
 
亳仆仂仆仆亠	
 亰舒仗仂	
 	
 callback舒仄亳	
 亟仍	
 
仗仂仍亠仆亳	
 亟舒仆仆	
 
≒ 亊亰从	
 亰舒仗仂仂于
亠仄仂:	
 iOS 亳	
 油粥稼糸姻看庄糸
WAMS == node.js
≒ 舒从亠	
 亟仍	
 仗亠亶	
 (apns,	
 mpns,	
 wns, gcm)
≒ 仍	
 Azure 亠于亳仂于	
 (azure)
≒ 仍	
 HTTP 亰舒仗仂仂于	
 (request)
≒ 仍	
 仂仗舒于从亳	
 email (sendgrid)
WAMS REST API
≒ 亠亠亟舒于舒	
 X-ZUMO-APPLICATION
≒ READ == HTTP GET + OData Query
Options ($filter, $orderby, $top, $skip)
≒ CREATE == HTTP POST
≒ UPDATE == HTTP PATCH
≒ DELETE == HTTP DELETE
WAMS REST API
-足 仂亢仆仂	
 弍亠仂于仆仂	
 仗仂仄亠仆	
 仂仆舒从	
 仆舒	
 
Web Api (OData Query Options)
仍ム	
 亳	
 仄亳仆	
 WAMS
≒ Callback hell
≒ Debugging
≒ Source control
亠从仂仄亠仆亟舒亳亳	
 仗仂	
 亳仗仂仍亰仂于舒仆亳	
 
WAMS
≒ 从仍ム亳	
 Dynamic Scheme
≒ 丼亠从仂	
 仗仂于亠亳	
 亞舒仆,	
 从仂亞亟舒	
 仗仂仂亳仗	
 舒仍	
 
仗亳仍仂亢亠仆亳亠仄	
 亳	
 亰舒舒仆亠亠	
 亰舒仗仍舒仆亳仂于舒	
 
仄亳亞舒亳
丼仂	
 亟仂仍亢亠仆	
 仄亠	
 Back-end 亟仍	
 	
 
仄仂弍亳仍仆	
 从仍亳亠仆仂于?
仂亰仄仂亢仆仂亳	
 back-end
≒ 丱舒仆亠仆亳亠	
 亟舒仆仆	
 
≒ 仗舒于从舒	
 push
≒ 丕仗舒于仍亠仆亳亠	
 仗仂仍亰仂于舒亠仍礆亳	
 
≒ 丐舒仆仍亳	
 于亳亟亠仂/舒亟亳仂	
 
≒ 仆舒仍亳亳从舒	
 亳仗仂仍亰仂于舒仆亳
弌仗舒亳弍仂	
 亰舒	
 于仆亳仄舒仆亳亠!

More Related Content

Azure Mobile Backend