Transcript
Page 1: Work with Windows Azure from Mobile Apps

work with Windows Azure from mobile platforms

jakarta, sep 29, 2011

Andri Yadiandri (at) dycode (dot) com@andri_yadi

Page 2: Work with Windows Azure from Mobile Apps

about me

Page 3: Work with Windows Azure from Mobile Apps

4 years in a row

Page 4: Work with Windows Azure from Mobile Apps

start my own company & code for food

Page 5: Work with Windows Azure from Mobile Apps

8 years in mobile development

Page 6: Work with Windows Azure from Mobile Apps

a movie freak

Page 7: Work with Windows Azure from Mobile Apps

the ceo of

Page 8: Work with Windows Azure from Mobile Apps

i won’t talk much about Azure, but mostly on client side

Page 9: Work with Windows Azure from Mobile Apps

azure?

Page 10: Work with Windows Azure from Mobile Apps

receive notifications

use cloud as storage (blob + structured data)

access web applications hosted in azure

Page 11: Work with Windows Azure from Mobile Apps

work with azure from mobile client apps can be complex

Page 12: Work with Windows Azure from Mobile Apps

table storage

blob storage

http

scenario 1

Page 13: Work with Windows Azure from Mobile Apps

you need to create storage, then remember the account name & key

Page 14: Work with Windows Azure from Mobile Apps

blob storage

REST Endpoint:http://[account].blob.core.windows.net

•List, Create, and Delete Containers•List, Put, Get, Delete Blobs

Page 15: Work with Windows Azure from Mobile Apps

blob storage

GET  http://watiosdemo.blob.core.windows.net/?comp=list&include=metadata

x-­‐ms-­‐date:  Thu,  14  Apr  2011  20:30:00  GMTx-­‐ms-­‐version:  2009-­‐09-­‐19x-­‐ms-­‐blob-­‐type:  BlockBlobAuthorization:  SharedKey  watiosdemo:[ComputedHash]

list all blob containers

Page 16: Work with Windows Azure from Mobile Apps

compute hash

AccountKey:  /9seXadQ9HwOpXUO1jKxFN8q…

Request:  GET\n\n\n\n\n\n\n\n\n\n\n\nx-­‐ms-­‐blob-­‐type:BlockBlob\nx-­‐ms-­‐date:Thu,  14  Apr  2011  20:30:00  GMT\nx-­‐ms-­‐version:2009-­‐09-­‐19\n/watiosdemo/\ncomp:list\ninclude:metadata

Hash = HMACSHA256(UTF8Encode(Request), Base64Decode(AccountKey))

Page 17: Work with Windows Azure from Mobile Apps

blob storage

GET  http://watiosdemo.blob.core.windows.net/?comp=list&include=metadata

x-­‐ms-­‐date:  Thu,  14  Apr  2011  20:30:00  GMTx-­‐ms-­‐version:  2009-­‐09-­‐19x-­‐ms-­‐blob-­‐type:  BlockBlobAuthorization:  SharedKey  watiosdemo:[ComputedHash]

list all blob containers

<?xml  version="1.0"  encoding="utf-­‐8"?><EnumerationResults  AccountName="http://watiosdemo.blob.core.windows.net/">    <Prefix>c</Prefix>    <MaxResults>3</MaxResults>    <Containers>        <Container>            <Name>movieposter</Name>            <Url>http://watiosdemo.blob.core.windows.net/movieposter</Url>            <Properties>                <Last-­‐Modified>Sun,  14  Apr  2011  20:09:03  GMT</Last-­‐Modified>            </Properties>        </Container>    </Containers>....

Page 18: Work with Windows Azure from Mobile Apps

blob storage

PUT  http://watiosdemo.blob.core.windows.net/movieposter/poster.jpg  

x-­‐ms-­‐date:  Thu,  14  Apr  2011  20:30:00  GMTx-­‐ms-­‐version:  2009-­‐09-­‐19x-­‐ms-­‐blob-­‐type:  BlockBlobAuthorization:  SharedKey  watiosdemo:[ComputedHash]

{...binary  representation  of  image...}

add new image

Page 19: Work with Windows Azure from Mobile Apps

table storage

REST Endpoint:http://[account].table.core.windows.net

•List, Create, and Delete Tables•List, Put, Get, Delete Table Entities

Page 20: Work with Windows Azure from Mobile Apps

blob storage

GET  http://watiosdemo.table.core.windows.net/Tables

x-­‐ms-­‐date:  Thu,  14  Apr  2011  20:30:00  GMTx-­‐ms-­‐version:  2009-­‐09-­‐19DataServiceVersion:  1.0;NetFxMaxDataServiceVersion:  2.0;NetFxAuthorization:  SharedKey  watiosdemo:[ComputedHash]

list all tables

<feed  xml:base="http://iostest.tables.core.windows.net/"  xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"  xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"  xmlns="http://www.w3.org/2005/Atom">    <title  type="text">Tables</title>    <id>http://watiosdemo.tables.core.windows.net/Tables</id>    <updated>2011-­‐04-­‐04T17:18:54.7062347Z</updated>    <link  rel="self"  title="Tables"  href="Tables"  />    <entry>        <id>http://watiosdemo.tables.core.windows.net/Tables(‘movie')</id>        <title  type="text"></title>        <updated>2009-­‐01-­‐04T17:18:54.7062347Z</updated>        <author>            <name  />        </author>....

Page 21: Work with Windows Azure from Mobile Apps

it’s hard, right? luckily...

Page 22: Work with Windows Azure from Mobile Apps

there’re toolkits for popular mobile platforms

iOS toolkit

android toolkit

wp7 toolkit

Page 23: Work with Windows Azure from Mobile Apps

windows azure toolkit for windows phone 7

encapsulates authentication (directly or through proxy)

requests & responses abstraction for cloud storage & SQL Azure

source code is available at: https://watwp.codeplex.com

latest version 1.3.0, sep 30, 2011

supports both Apple push notification & MS push notification

Page 24: Work with Windows Azure from Mobile Apps

windows azure toolkit for iOS

encapsulates authentication (directly or through proxy)

requests & responses abstraction for cloud storage

supports Apple push notification

source code is available at: https://github.com/microsoft-dpe/wa-toolkit-ios

latest version 1.2.1, aug 31, 2011

Page 25: Work with Windows Azure from Mobile Apps

windows azure toolkit for android

encapsulates authentication (directly or through proxy)

requests & responses abstraction for cloud storage

source code is available at: https://github.com/microsoft-dpe/wa-toolkit-android

latest version 0.8, aug 31, 2011

Page 26: Work with Windows Azure from Mobile Apps

demo

Page 27: Work with Windows Azure from Mobile Apps
Page 28: Work with Windows Azure from Mobile Apps

we do apps for all mobile platforms

Page 29: Work with Windows Azure from Mobile Apps

our mobile apps portfolios

Page 30: Work with Windows Azure from Mobile Apps

our mobile apps portfolios


Recommended