14.01.2015 Views

Eric lippert - Amazon Web Services

Eric lippert - Amazon Web Services

Eric lippert - Amazon Web Services

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Provide a Database Name, an Admin User and Password. Select<br />

a Region that is closest to where you anticipate most traffic will<br />

come from. Click on the ‘Complete’ button to finish the Wizard.<br />

Azure will initiate the Service creation process.<br />

selectively or via a broadcast.<br />

Setting up the UI<br />

The UI is very simple and won’t be winning any App Design<br />

contests. All it has is three labels, three text boxes and a Send<br />

Message Button.<br />

11. Once the service is ready, click on it to navigate to the<br />

Dashboard. In the dashboard, select the ‘PUSH’ tab to configure<br />

push notifications. For Windows Application Credentials, provide<br />

the Client Secret and Package SID we noted down earlier. Click on<br />

‘Save’ at the bottom of the screen to save the changes<br />

immediately.<br />

Sending and Saving Data to Azure Mobile Service<br />

Now that we have the UI setup, let’s work on saving data. To do<br />

this, we have to switch back to the Mobile Service Dashboard.<br />

Your App as well as Mobile Service is now set to work with WNS.<br />

Building the Messaging Functionality<br />

Now that we are all set, quick recap of what needs to be done<br />

from here on<br />

1. Setup our App to have three fields,<br />

a. MyId – Current User’s Id<br />

b. TweetText – Text of the FT or the FDM<br />

c. ToID – An optional ID to send FDMs to.<br />

1. Add the FakeTweetsMessage Table and click OK. The columns<br />

will get created automatically once we post our Entity to it.<br />

2. Save the above data in Azure Database. We’ll use Azure Mobile<br />

<strong>Services</strong> for the same.<br />

3. Write Code to retrieve Channel IDs<br />

4. Utilize Channel IDs to send Push Notifications to others either<br />

DNcmagazine www.dotnetcurry.com | 75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!