Windows Azure Mobile Services を使った Android/iOS アプリケーションの構築

>100 Views

March 16, 13

スライド概要

ABC 2013 Spring

profile-image

ヴイエムウェア株式会社 ソリューションアーキテクト本部 プリンシパルエンタープライズアーキテクト。 Microsoft で13年間、テクニカルエバンジェリストとして .NET、Visual Studio、Windows、iOS、Android、Microsoft Azure 等の開発者向け最新技術啓発活動を実施。その後、Dell、Accenture、Elastic で開発者向け技術啓発活動等を経て現職。 モダンアプリケーション開発、マルチクラウド対応、アーキテクチャ策定等を中心に、技術者向けに最新技術の啓発活動を実施中。 2019年4月〜2021年8月迄、内閣官房 IT 総合戦略室 政府 CIO 補佐官を兼務、2021年9月〜2024年3月迄、デジタル庁 PjM ユニット ソリューションアーキテクトを兼務。

シェア

またはPlayer版

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

関連スライド

各ページのテキスト
1.

Windows Azure Mobile Services を使った   Android/iOS アプリケーションの構築 佐藤直⽣生  @satonaoki   Windows  Azure  テクニカルエバンジェリスト http://satonaoki.wordpress.com/ ⽇日本マイクロソフト株式会社 鈴鈴⽊木  章太郎郎  @shosuz テクニカルエバンジェリスト  兼  MTC  アーキテクト http://blogs.msdn.com/b/shosuz ⽇日本マイクロソフト株式会社

3.

Windows Azure とは

4.

ミ ド ル ウ アプリケーション ネットワーク Connect Traffic Manager Virtual Network (Public Preview) (Public Preview) (Public Preview) 認証 キャッシュ システム連携 Media Services AD CDN 占有型 キャッシュ (Preview) 共有型 キャッシュ アクセス制御 データ RDB ホスティング 管理理 Blob Azure Active Directory Table RDB 関連 キュー サービス  バス (Preview) ア HPC レポート Datasync (Preview) Import/Export PIT Restore (Limited Preview) Hadoop Service Cloud Services Virtual Machines Websites Mobile Services (Public Preview) (Public Preview) (Public Preview) Windows Azure 管理理ポータル ファブリック コントローラ (Preview)

5.

Windows Azure Mobile Services とは

6.

http://www.windowsazure.com/mobile Windows 8、iOS、Windows Phone 8、Android データ

7.

Github https://github.com/WindowsAzure/ azure-mobile-services Get started with Mobile Services for Android http://www.windowsazure.com/en-us/ develop/mobile/tutorials/get-startedandroid/

8.

Github https://github.com/WindowsAzure/azure-mobileservices Get started with Mobile Services for iOS http://www.windowsazure.com/en-us/develop/mobile/ tutorials/get-started-ios/

9.

SQL  サーバーの利利⽤用と サーバーロジックの開発

10.

http://msdn.microsoft.com/en-us/library/windowsazure/jj554226.aspx

11.

プッシュ通知機能の開発

12.

Windows 8 (2) (3) (1) (3)

13.

認証連携機能の開発

14.

Live Connect ポータル https://manage.dev.live.com/Applications/ Index   アプリケーション キーを持つ   ユーザー(デフォルト値)

15.

まとめ

16.

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

18.

Appendix

19.

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

20.

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

21.

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/

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

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

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

24.

push.wns push.mpns

25.

Live Connect ポータル https://manage.dev.live.com/Applications/ Index   http://msdn.microsoft.com/ja-JP/windows/apps Windows  ストアアプリポータル

26.

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, });

27.

Visual Studio では  Intellisense  で  Identity Provider  を選択可能

28.

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

29.

http://blogs.msdn.com/b/shosuz/archive/2013/01/03/sendgrid-windows-azuremobile-services.aspx

30.

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

31.

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

32.

$ 共有インスタンス (マルチテナント環境) 予約済みインスタンス (プライベート VM) S インスタンスのみが 使⽤用可能なサイズ。 複数購⼊入が可能 S インスタンスのみが 使⽤用可能なサイズ。 複数購⼊入が可能 パブリック プレビュー 公開時は無料料 プレビューの料料⾦金金は Web サイトと同じ 割引料料⾦金金になる 99.9%

33.

Resources

34.

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

35.

Event Buddy(iOS) Tic Tac Toe Leaderboard   (iOS/Android) Feedback (iOS/Android)

36.

MiniBlog http://msdn.microsoft.com/ja-jp/ windowsazure/hh697503

37.

http://blogs.msdn.com/b/shosuz/archive/2013/01/11/windows-‐‑‒azure-‐‑‒new-‐‑‒code-‐‑‒samples-‐‑‒and-‐‑‒ tutorials.aspx   37