O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning Windows Azure Mobile Services for Windows 8 and Windows Phone 8

Book Description

A short, fast and focused guide to enhance your Windows 8 applications by leveraging the power of Windows Azure Mobile Services

In Detail

Windows Azure is the most opted for cloud technology, and is getting better each day. With the increasing number of users of Windows Phone and Windows 8, the necessity for a good robust cloud service to support the apps is increasing. Windows Azure Mobile Services is a set of Windows Azure hosted services that are designed to quickly build, deploy, and manage a mobile web-connected app.

Using this concise and to-the-point guide, you will be able to utilize Windows Azure Mobile Services with your Windows apps and know how best to integrate them with the backend capabilities that Azure provides.

We start with setting up the portal, choosing a subscription, and taking the first steps into integrating services into our applications. From here, we explore security, scripts, and push notifications and finish with the requirements for store submission and how to improve user experience.

The book discusses different service permission options and demonstrates how to use an authentication provider in our applications. Scripts are examined throughout the book with examples of modifying table methods, creating custom APIs, and making push notification requests. We also explore how to extend scripts with NPM packages and manage them with Git version control. Push notifications is a major feature of Mobile Services so this subject is thoroughly examined with examples using the native PNS libraries and scaling up notifications with Notifications Hub.

Learning Windows Azure Mobile Services for Windows 8 and Windows Phone 8 is a great companion for anyone who is building or thinking of building an application that needs centralized data storage or push notifications.

What You Will Learn

  • Configure a Windows Azure Mobile Service
  • Modify table APIs with scripts and create custom APIs
  • Call HTTP services from scripts
  • Implement NPM packages in scripts
  • Manage scripts with Git version control
  • Configure Windows 8 and Windows Phone 8 applications to implement Push Notifications
  • Use Notifications Hub to manage notifications more easily and efficiently
  • Prepare your application for submission to the Store

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Learning Windows Azure Mobile Services for Windows 8 and Windows Phone 8
    1. Table of Contents
    2. Learning Windows Azure Mobile Services for Windows 8 and Windows Phone 8
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
        3. Instant Updates on New Packt Books
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Preparing the Windows Azure Mobile Services Portal
      1. Choosing a subscription
        1. Pay-as-you-go subscription
        2. Basic and Standard subscriptions
        3. Free trial
      2. Creating a Windows Azure account
      3. Creating a mobile service
        1. Mobile Services features
        2. Managing keys
        3. Mobile service dashboard
        4. Configure
        5. Scale
        6. Logs
      4. Summary
    9. 2. Start Developing with Windows Azure Mobile Services
      1. Preparing our development environment
        1. Requirement for hardware
        2. Setting up the software
        3. Requirement for store accounts
      2. Creating apps from the portal
      3. Connecting existing apps to Windows Azure Mobile Services
        1. Adding a Connected Service in Visual Studio 2013
        2. Manually installing the SDK in Visual Studio 2012 Express for Windows Phone
        3. Creating a table
        4. Writing a model of the table
        5. Interacting with the table
      4. Summary
    10. 3. Securing Data and Protecting the User
      1. Configuring permissions
        1. Rules for choosing permissions
        2. Authentication providers
        3. Authentication
        4. Registering for Windows Live Connect Single Sign-on
      2. Authentication in the app
        1. Logging in
        2. Storing credentials
        3. Logging out
        4. The DataServiceBase class
      3. REST API and the master key
      4. Summary
    11. 4. Service Customization with Scripts
      1. Understanding table scripts
        1. Level-insert table script example
        2. Score-insert script example
        3. Score-read script example
      2. API scripts
        1. Creating an API script
        2. High-score API script
      3. Script debugging and logs
      4. Scheduling
      5. Working locally with Git
        1. Pulling the repository
        2. Updating our repository
        3. Adding scripts manually
        4. Pushing back changes
      6. Implementing NPM modules
      7. Summary
    12. 5. Implementing Push Notifications
      1. Understanding Push Notification Service flow
      2. Setting up Windows Store apps
        1. Setting up tiles
          1. Setting up badges
      3. Setting up Windows Phone 8 apps
      4. Service scripts
        1. WNS scripts for Store apps
          1. Sending toast notifications
          2. Sending tile notifications
          3. Sending multiple tiles
          4. Sending badge notifications
          5. MPNS scripts for Windows Phone apps
          6. Sending toast notifications
          7. Sending tile notifications
      5. Summary
    13. 6. Scaling Up with the Notifications Hub
      1. Configuring the Hub
      2. Setting up Windows Store and Windows Phone 8 apps
      3. Calling the hub from scripts
        1. Creating WNS scripts (for Store apps)
          1. Sending toast notifications
          2. Sending tile notifications
          3. Sending badge notifications
        2. Creating MPNS scripts (for Windows Phone 8 apps)
          1. Sending toast notifications
          2. Sending tile notifications
      4. Backend services
      5. Targeting audience using tags
      6. Summary
    14. 7. Best Practices for Web-connected Apps
      1. App certification requirements for the Windows Store
      2. UX guidelines
      3. Implementing a privacy policy
      4. Checking the network connection
      5. Managing notifications settings
      6. Implementing settings pages
      7. Summary
    15. Index