You are previewing Building Web Services with Microsoft Azure.
O'Reilly logo
Building Web Services with Microsoft Azure

Book Description

Quickly develop scalable, REST-based applications or services and learn how to manage them using Microsoft Azure

In Detail

There's a plethora of development tools and frameworks available today. But Microsoft Azure provides a scalable and manageable platform for customers to easily deploy, monitor, and troubleshoot their cloud-based applications. Its seamless integration and inherent support for open source software make it an obvious choice for building cloud-based applications and services.

This book will take you through a full application development architecture. You'll start by creating, customizing, and extending HTTP-based web APIs and move on to host your web API with ASP.NET. Then, using a range of different features, you'll learn how to connect your applications with Microsoft Azure Service Bus. You'll learn more advanced topics such as creating Hybrid Services, Azure Storage data services, and the Entity Framework; you'll learn to create and manipulate data services, too. Finally, you'll leverage the full power of SQL database administration in Azure and gain more insights into managing your data.

What You Will Learn

  • Build RESTful services using the ASP.NET Web API and Microsoft Azure

  • Host and monitor applications in Azure Websites and Azure Mobile Services

  • Manage Web APIs using Azure API Management

  • Utilize Azure Service Bus to provide elasticity to your applications as well as publish and subscribe features

  • Utilize the Microsoft Azure Platform as a Service (PaaS) component in your custom solutions

  • Get to grips with the basic characteristics of distributed systems

  • Use Entity Framework as the data model

  • Leverage your cloud-based storage and discover how to access and manipulate data in the cloud

  • Explore the NoSQL options available in Microsoft Azure

  • 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. Building Web Services with Microsoft Azure
      1. Table of Contents
      2. Building Web Services with Microsoft Azure
      3. Credits
      4. About the Authors
      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
      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. Introduction
        1. Getting to know HTTP
          1. An HTTP request/response
          2. HTTP methods
          3. HTTP status codes
          4. Other HTTP goodies
            1. Header field definitions
            2. Content negotiation
        2. HTTP 2.0
          1. HTTP and .NET
        3. The rise of REST
        4. The REST style of services
        5. Web API and Microsoft Azure
        6. Summary
      9. 1. Getting Started with the ASP.NET Web API
        1. The ASP.NET Web API framework
        2. Background
        3. Building blocks
        4. Design principles behind the ASP.NET Web API
        5. Application scenarios
        6. Behind the scenes with the ASP.NET Web API
          1. Anatomy of the API of ASP.NET Web API
            1. DelegatingHandler
            2. HttpRequestMessage
            3. HttpResponseMessage
            4. ApiController
          2. Other important types
          3. Message lifecycle
          4. Host listener
        7. Routing and dispatching
          1. Controller processing
        8. Creating our first ASP.NET Web API
          1. Prerequisites
          2. Creating the ASP.NET Web API project
          3. Defininig an ASP.NET data model
          4. Defining an ASP.NET Web API controller
        9. Testing the Web API
          1. Testing in a browser
          2. Testing with HttpClient
        10. Committing changes to Git
        11. Deploying the ASP.NET Web API using Azure Websites
          1. Deploying to Azure Websites
        12. Continuous Deployment using Azure Websites
        13. Summary
      10. 2. Extending the ASP.NET Web API
        1. Attribute routing
          1. Custom route discovery using IDirectRouteProvider
        2. Content negotiation
          1. Customizing content negotiation
          2. Customizing media formatters
        3. Securing the ASP.NET Web API
          1. Authentication and Authorization filters
          2. Creating an Azure AD directory
          3. Enabling authentication for the Web API project
          4. Configuring the Web API in Azure AD
          5. Enabling Authorization for the controller
          6. Testing our secure Web API
            1. Creating the test client
            2. Configuring the test client in Azure AD
            3. Updating the test client
        4. Hosting
        5. Summary
      11. 3. API Management
        1. Azure API Management
        2. Managing a Web API
          1. Creating an API Management service
          2. Configuring the API Management service
          3. Creating API operations
            1. Adding an operation
            2. Adding an authorization server
            3. Configuring an API with an authorization server
          4. Adding a product
        3. Consuming the Web API
        4. Summary
      12. 4. Developing a Web API for Mobile Apps
        1. Azure Mobile Services
          1. Features of Azure Mobile Services
          2. Core services
          3. The API of Azure Mobile Services
            1. TableController
            2. ApiServices
            3. EntityData
            4. Domain Manager
        2. Creating a Web API using Mobile Services
          1. Creating the project
          2. Defining the data model
            1. Record
            2. Doctor
          3. Creating the controller
          4. Testing the mobile service
            1. Testing in a browser
            2. Testing using a Windows 8.1 application
          5. Deploying to Azure Mobile Services
        3. Leftovers
        4. Summary
      13. 5. Connecting Applications with Microsoft Azure Service Bus
        1. Azure Service Bus
          1. What is Azure Service Bus?
          2. Patterns
            1. Publish/Subscribe
            2. Messaging bridge
            3. Dead Letter Channel and Invalid Message Channel
            4. Content Based Router and Recipient List
            5. Splitter and Aggregator
            6. Resequencer
          3. The BrokeredMessage object
          4. How do you create elements of the Service Bus?
          5. Creating a Service Bus Queue
          6. Interacting with the Queue
            1. Sending a message to the Queue
            2. Receiving a message from the Queue
            3. Receiving different message types from a Queue
          7. Creating a Service Bus Topic
          8. Creating a rule with Visual Studio's Server Explorer
          9. Creating a rule with code
          10. Interacting with the Topic
            1. Sending a message to a Topic
            2. Receiving a message from a Topic
          11. Creating an event hub
            1. Sending data to an event hub
            2. Reading data from an event hub
          12. Service Bus Security
        2. Summary
      14. 6. Creating Hybrid Services
        1. Service Bus Relay Service
          1. Bindings
          2. Creating Relay Service in Azure
          3. Creating the WCF service
          4. Creating the client
        2. BizTalk Hybrid Connect
          1. Hybrid Connect security
        3. Summary
      15. 7. Data Services in the Cloud – an Overview of ADO.NET and Entity Framework
        1. Key layers of distributed applications
          1. The data layer
          2. The business logic layer
          3. The server layer
          4. The user interface layer
        2. Data and data access technologies
          1. ADO.NET and ADO.NET Entity Framework
        3. Creating a data source for a Web API application
          1. Creating a Microsoft Azure SQL database
          2. Using the Microsoft Azure SQL database management portal
          3. Populating a Microsoft Azure SQL database table with test data
          4. Adding a Microsoft Azure SQL database to the project
            1. Creating an Entity Data Model
          5. Testing the Web API with Entity Framework and Microsoft Azure SQL database
            1. Testing an insert operation
        4. Summary
      16. 8. Data Services in the Cloud – Microsoft Azure Storage
        1. Microsoft Azure Storage
          1. The Microsoft Azure Storage Blobs service
            1. Security
          2. The Microsoft Azure Storage Queues service
          3. The Microsoft Azure Storage Tables service
            1. Tables and entities
        2. Using Microsoft Azure Storage in the Web API application
          1. Creating storage accounts
          2. Adding storage support to the Web API application
            1. Viewing data from the table
        3. Summary
      17. 9. Data Services in the Cloud – NoSQL in Microsoft Azure
        1. Understanding NoSQL
        2. An overview of Microsoft Azure NoSQL technologies
          1. Microsoft DocumentDB
            1. The Microsoft DocumentDB object model
        3. DocumentDB in a Web API application
          1. Creating the DocumentDB database account
          2. Using DocumentDB in the Web API application
          3. Testing the Web API with the DocumentDB database account
          4. Microsoft Azure Marketplace
        4. MongoLab MongoDB on Microsoft Azure
          1. Creating a MongoLab MongoDB subscription
        5. Summary
      18. Index