Preface
With multiple cloud platforms out there, it is easy to get confused when making a technology decision for your projects. This gets further complicated with the plethora of development tools and frameworks available today. Microsoft Azure simplifies this problem by providing a scalable and manageable platform for customers to easily deploy, monitor, and troubleshoot their cloud-based applications. Its seamless integration with new and existing Microsoft tools and inherent support for open source software makes it an obvious choice for building cloud-based applications and services.
Whether you are new to Microsoft Azure cloud development or you have been creating cloud applications, there will be something new for you in this book. We will cover the full application development architecture and cover all tiers of an application. We will also cover a number of patterns that you will encounter, from solutions that are completely hosted in the cloud to hybrid solutions where applications are split between the cloud and on-premises networks.
What this book covers
Chapter 1, Getting Started with the ASP.NET Web API, introduces the ASP.NET Web API framework and provides an overview of its application and internals. It will guide you through the stages of creating a Web API and deploying it in Microsoft Azure.
Chapter 2, Extending the ASP.NET Web API, discusses various extensibility and customization options available in the ASP.NET Web API framework. It guides the reader through various extension points, such as custom routing, message formatters, content negotiation, and securing a Web API. It also discusses various hosting options for deploying Web APIs.
Chapter 3, API Management, provides a set of tools that assist API developers in managing and monitoring Web APIs. We will discuss various options of publishing, marketing, monitoring, and managing a Web API using API management.
Chapter 4, Developing a Web API for Mobile Apps, provides an overview of Mobile Services and walks through a scenario of creating a Web API using Mobile Services. Mobile Services provides an easy-to-use environment to rapidly build cross-platform apps for Windows, iOS, Android, and other platforms. Its rich built-in capabilities for managing backend login, data, authentication, and notifications makes it a compelling option for developing mobile applications.
Chapter 5, Connecting Applications with Microsoft Azure Service Bus, discusses Windows Azure Service Bus, which allows for related and brokered messaging using a range of different features (such as Topics and Queues).
Chapter 6, Creating Hybrid Services, demonstrates how to create Hybrid Services to connect on-premises Large Object (LOB) / database to cloud-based applications. Essentially, this chapter builds on the previous chapter, demonstrating how you can use the elements of the Service Bus to create Hybrid applications. It will also demonstrate how to effectively maintain these applications.
Chapter 7, Data Services in the Cloud – an Overview of ADO.NET and Entity Framework, explores how to create data services in the cloud using Entity Framework and ADO.NET.
Chapter 8, Data Services in the Cloud – Microsoft Azure Storage, explores how you can use cloud-based Azure Storage technologies.
Chapter 9, Data Services in the Cloud – NoSQL in Microsoft Azure, explores how to use DocumentDB, a fully managed, highly scalable NoSQL data management service based on Azure, as well as ways to start using other open source Azure options such as MongoDB.
What you need for this book
The hardware requirements are as follows:
1.6 GHz or faster processor
1 GB of RAM (1.5 GB if running on a virtual machine)
10 GB (NTFS) of available hard disk space
5400 RPM hard drive
DirectX 9 capable video card running at 1024 x 768 or higher display resolution
The software requirements and their download or purchase sources are mentioned in the following list:
Windows 8.1 or greater at http://www.microsoftstore.com/store/msusa/en_US/pdp/Windows-8.1/productID.288401200?tduid=e43fc220a3cc8877116cc4a027cb6456
You can also use your MSDN license to download a copy
Visual Studio 2013 Community Edition or greater at https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx
Note
Note that the samples have only been tested on Visual Studio 2013 and not on Visual Studio 2015 preview.
Azure SDK 2.5 at https://www.microsoft.com/en-us/download/details.aspx?id=44938
Entity Framework at https://www.nuget.org/packages/EntityFramework/6.1.1
Other helpful tools:
Resharper: https://www.jetbrains.com/resharper/
Chrome Postman: https://chrome.google.com/webstore/detail/postman-rest-client-packa/fhbjgbiflinjbdggehcddcbncdddomop?hl=en
Fiddler: http://www.telerik.com/download/fiddler/fiddler4
Azure Storage Explorer: https://azurestorageexplorer.codeplex.com/
Service Bus Explorer: https://code.msdn.microsoft.com/windowsazure/service-bus-explorer-f2abca5a
Who this book is for
If you are a developer or an architect who wants to develop end-to-end RESTful applications in the cloud, then this book is for you. You will need professional knowledge of C# to work through the projects in this book.
Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: " By default, the domain name is set to azurewebsites.net
."
A block of code is set as follows:
async Task<int> GetContentLengthAsync(string uri) { int contentLength; using (var client = new HttpClient()) { var content = await client.GetStringAsync(uri); contentLength = content.Length; } return contentLength; }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
Any command-line input or output is written as follows:
PM> Install-Package Microsoft.AspNet.WebApi
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Click on Publish to open the Publish wizard, and select Microsoft Azure Websites as the publish target."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.
To send us general feedback, simply e-mail <feedback@packtpub.com>
, and mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the example code
You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. 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.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <copyright@packtpub.com>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
Questions
If you have a problem with any aspect of this book, you can contact us at <questions@packtpub.com>
, and we will do our best to address the problem.