Mais conteúdo relacionado Semelhante a Windows azure mobile services による mobile + cloud アプリケーション超高速開発 (20) Mais de Shotaro Suzuki (20) Windows azure mobile services による mobile + cloud アプリケーション超高速開発3. http://www.windowsazure.com/mobile モバイル対応の
アプリを簡単に実装
ユーザー認証機能
プッシュ通知機能
瞬時にデプロイ可能
マルチテナント環境
から専用環境に
必要に応じて変更可能
Windows 8, iOS,
Windows Phone 8
Android サポート予定
必要に応じて
機能を追加可能
5. 多くの機能追加が発表
・iOS 対応(Xcode、Objective-C)
・Facebook / Twitter / Google ID 対応
・Sendgrid による e-mail 送信対応
・Twilio によるSMS対応
・Blob Storage 利用可能
・Services Bus利用可能
・他…
http://weblogs.asp.net/scottgu/archive/2012/10/16/windows-azure-mobile-services-new-support-for-ios-
apps-facebook-twitter-google-identity-emails-sms-blobs-service-bus-and-more.aspx
10. Supported Modules + Globals
mssql
mssql.query('select top 1 * from statusupdates',
request { success: function(results) {
console console.log(results);
}
push }
tables );
statusCodes
11. 複雑なフィルタリングの例
Supported Modules + Globals
function read(query, user, request) {
mssql this.UserId == userId;
query.where(function (userId) {
return
request
}, user.userId);
request.execute();
console user, request) {
}
function read(query,
push this.UserId == userId &&
query.where(function (userId) {
return
tablesthis.Rating > == "Fiction" || this.Category == "Action") &&
(this.Category
2;
statusCodes
}, user.userId);
request.execute();
}
…
12. JSON 値 T-SQL 型
数値 (整数、10 進数、 Float(53)
浮動小数点数)
ブール値 Bit
DateTime DateTimeOffset(3)
文字列 Nvarchar(max)
13. Windows 8/Phone 8
var table =
MobileService.GetTable <Apartment>;
var Apartments = await table
.where(a => a.Bedrooms > 2)
.ToListAsync();
iOS
table = [client getTable : @”apartment”];
NSPredicate* pred = [NSPredicate
Android (例) predicateWithFormat:@”bedrooms > 2”];
[tableReadWhere : pred
MobileTable <Apartment> table = completion : ^(NSArray* results,
service.gettable(Apartment.class); NSInteger count,
List<Apartment> apartments = Nerror* err) {
table.where() //…
.gt(“bedrooms”, 2) }];
.select();
17. Windows 8
CurrentChannel = await PushNotificationChannelManager
.CreatePushNotificationChannelForApplicaionAsync();
Windows Phone 8
CurrentChannel = new HttpNotificationCannel(“ApartmentPushChannel”);
CurrentChannel.Open();
CurrentChannel.BindToShellToast();
Server Side Script
mpns.sendToast(channel.uri, “New Apartment Added”, apartment.address);
wns.sendToat02(channel.uri,
{text01 : “New Apartment Added”, text02 : apartment.address, });
18. Live Connect ポータル
https://manage.dev.live.com/Applications/Index
http://msdn.microsoft.com/ja-JP/windows/apps
Windows ストアアプリポータル
20. function sendNotifications() {
var channelTable = tables.getTable('Channel');
channelTable.read({
success: function (channels) {
channels.forEach(function (channel) {
push.wns.sendTileWidePeekImageAndText02(channel.channelUri, {
image1src: ‘http://dev.virtualearth.net/REST/v1/Imagery/Map/Rsoad/' +
item.latitude + ',' + item.longitude + '/15?pp=' +
item.latitude + ',' + item.longitude +
';15&ms=310,150&key= YOUR BING MAPS KEY',
image1alt: 'New Place',
text1: 'New Place',
text2: item.text,
text3: item.latitude + ',' + item.longitude,
}, {
success: function (pushResponse) {
//console.log("Sent push:", pushResponse);
}
});
・・・・・ 20
21. push.wns.sendToastImageAndText04(channel.channelUri, {
image1src: 'http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/' +
item.latitude + ',' + item.longitude + '/15?pp=' +
item.latitude + ',' + item.longitude +
';15&ms=150,150&key=YOUR BING MAPS KEY',
image1alt: 'New Place',
text1: 'New Place',
text2: item.text,
text3: item.latitude + "," + item.longitude
}, {
success: function (pushResponse) {
//console.log("Sent push:", pushResponse);
}
});
});
}
});
21
22. • Windows 8 (Bing Maps for Windows Store Apps)で位置情報を取得
• プッシュ通知(トースト/タイル)を当該 Windows Store App を実行中の全ユーザーに送付
• Windows 8 デバイスを占有して 新規に取得した位置情報を Bing Maps 地図の中心に移動
http://jkebeck.wordpress.com/2012/10/09/windows-azure-mobile-services-maps-more/
22
24. https://dev.twitter.com/
https://dev.twitter.com/apps/new
Register your apps for Twitter login with Mobile Services
http://www.windowsazure.com/en-us/develop/mobile/how-to-guides/register-for-twitter-authentication/
25. Windows 8 / Windows Phone 8
If (MobileService.CurrentUser == null) {
var user = await MobileSevice.LoginAsync (
MobileServiceAuthenticationProvider.Twitter);
iOS
If (client.currentUser == nil) {
[client loginViewControllerWithProvider : @”twitter”
completion : ^(MSUser* user, NSError* err) {
//…
}];
}
30. Chris Risner Xamarin
http://chrisrisner.com/
同サンプル
同サンプル https://github.com/xamarin/azure-
https://github.com/WindowsAzure- mobile-services
Samples/MobileServices-iOS-Client
34. 診断 拡張 –
コンピューティング
ログ 拡張 - ストレージ
36. 10 モバイル
サービス 1 GB SQL
WA の無料評価版
データベース
プレビュー期間中は SLA なし。S インスタンスのみ使用可能。プレビュー期間中は、通常の従
量課金料金から 33% 割引で予約済みインスタンスにアップグレード可能。
41. • Windows 8 (Bing Maps for Windows Store Apps)で位置情報を取得
• プッシュ通知(トースト/タイル)を当該 Windows Store App を実行中の全ユーザーに送付
• Windows 8 デバイスを占有して 新規に取得した位置情報を Bing Maps 地図の中心に移動
http://jkebeck.wordpress.com/2012/10/09/windows-azure-mobile-services-maps-more/
42