Windows azure mobile services による mobile + cloud アプリケーション超高速開発

>100 Views

December 08, 12

スライド概要

ABC(Architect Boot Camp)の時のスライドupload!iOSのプッシュも現在はデモOK

profile-image

FPT ジャパン FPT データ& AI インテグレーション エグゼクティブエバンジェリスト 独立行政法人 国立印刷局 デジタル統括アドバイザー兼最高情報セキュリティアドバイザー AI 駆動開発勉強会主催。Microsoft エバンジェリスト時代から、Dell、Accenture、Elastic、VMware を経て現職まで一貫して開発者向けに最新技術を啓発。GPU クラウド技術訴求、AI 駆動開発推進。  政府の仕事は、内閣官房 政府 CIO 補佐官、 デジタル庁 PM を経て、現職を兼務。 Locofy.ai Regional Developer Advocate Google Cloud Partner All Certifications Engineer 2025

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

(ダウンロード不可)

関連スライド

各ページのテキスト
2.

http://claudiamobile.cloudapp.net/ http://msdn.microsoft.com/ja-jp/windowsazure/hh965702

3.

http://www.windowsazure.com/mobile モバイル対応の アプリを簡単に実装 ユーザー認証機能 プッシュ通知機能 瞬時にデプロイ可能 マルチテナント環境 から専用環境に 必要に応じて変更可能 Windows 8, iOS, Windows Phone 8 Android サポート予定 必要に応じて 機能を追加可能

4.

Windows Azure Mobile Services は次の場合に最適です。

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-iosapps-facebook-twitter-google-identity-emails-sms-blobs-service-bus-and-more.aspx

6.

・データアクセス, プッシュ通知、認証サポート Windows 8、Windows Phone 8 SDK iOS SDK SDK Android SDK (近日登場予定) ・強力なサーバーサイドスクリプトのサポート プッシュ通知、バリデーション、プリプロセッシング、 ポストプロセッシング、他の Web サービスとの連携

7.

デモ

10.
[beta]
Supported Modules + Globals
mssql
mssql.query('select top 1 * from statusupdates',
request
{ success: function(results) {
console
console.log(results);
}
push
}
);
tables
statusCodes

11.
[beta]
複雑なフィルタリングの例

Supported
Modules
+ Globals
function read(query,
user, request)
{
query.where(function (userId) {
mssql
return this.UserId == userId;
}, user.userId);
request
request.execute();
}
console
function read(query, user, request) {
query.where(function
(userId) {
push
return this.UserId == userId &&
== "Fiction" || this.Category == "Action") &&
tables(this.Category
this.Rating > 2;
}, user.userId);
statusCodes
request.execute();
}
…

12.

JSON 値 数値 (整数、10 進数、 浮動小数点数) ブール値 DateTime 文字列 T-SQL 型 Float(53) Bit DateTimeOffset(3) Nvarchar(max)

13.
[beta]
Windows 8/Phone 8
var table =
MobileService.GetTable <Apartment>;
var Apartments = await table
.where(a => a.Bedrooms > 2)
.ToListAsync();

Android (例)
MobileTable <Apartment> table =
service.gettable(Apartment.class);
List<Apartment> apartments =
table.where()
.gt(“bedrooms”, 2)
.select();

iOS
table = [client getTable : @”apartment”];
NSPredicate* pred = [NSPredicate
predicateWithFormat:@”bedrooms > 2”];
[tableReadWhere : pred
completion : ^(NSArray* results,
NSInteger count,
Nerror* err) {
//…
}];

14.

サーバー ロジック CRUD 操作に関するサーバー ロジックの追加 デモ

16.

push.wns push.mpns

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 ストアアプリポータル

19.

プッシュ通知 デモ

20.
[beta]
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.
[beta]
}
});

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

23.

http://msdn.microsoft.com/en-US/live/ff621310

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) { //… }]; }

26.

認証の追加 迅速な Windows Live への接続 デモ

27.

Sendgrid を利用した メール送信

28.

しかし…現在はこのアドオンは 米国のみ使用可能な模様 http://www.windowsazure.com/en-us/develop/mobile/tutorials/send-email-with-sendgrid/

29.

Windows Azure Mobile Services for iOS

30.

Chris Risner http://chrisrisner.com/ 同サンプル Xamarin 同サンプル https://github.com/xamarin/azurehttps://github.com/WindowsAzure- mobile-services Samples/MobileServices-iOS-Client

31.

Github https://github.com/WindowsAzure/azuremobile-services Get started with Mobile Services for iOS http://www.windowsazure.com/enus/develop/mobile/tutorials/get-startedios/

32.

Mobile Services with iOS ストレージ操作とTwitter 認証連携 デモ

33.

Windows Azure Mobile Services for Android Coming Soon!

34.

診断 拡張 – コンピューティング ログ 拡張 - ストレージ

35.

診断、ログ、拡張 デモ

36.

1 GB SQL データベース WA の無料評価版 10 モバイル サービス プレビュー期間中は SLA なし。S インスタンスのみ使用可能。プレビュー期間中は、通常の従 量課金料金から 33% 割引で予約済みインスタンスにアップグレード可能。

37.

99.9%

38.

Windows 8、iOS、Windows Phone 8、 データ

39.

Mobile Services Developer Portal http://www.windowsazure.com/mobile 40

40.

http://code.msdn.microsoft.com/doto-a-simple-social-todo-7e6ba464 41

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

42.

http://channel9.msdn.com/Events/TechEd/Europe/2012/AZR310 43