Book Image

Microsoft Azure Development Cookbook Second Edition

Book Image

Microsoft Azure Development Cookbook Second Edition

Overview of this book

Table of Contents (15 chapters)
Microsoft Azure Development Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Microsoft Azure is Microsoft's platform for cloud computing. It provides developers with elastic building blocks to build scalable applications. These building blocks are services for web hosting, storage, computation, connectivity, and more. They are usable as standalone services or are mixed together to build advanced scenarios.

This practical cookbook will show you these building blocks, focusing on why we should use one or the other, and when to use them appropriately. Even though reading the entire book will give you an advanced overview of the main blocks of the Azure platform, each chapter is self-contained. So, even an inexperienced reader could jump from one chapter to another without reading the entire book. Each chapter is organized into recipes—standalone units of execution to complete tasks that involve a specific feature/service of the platform. This approach gives readers the capability to focus on the technology for further use in real-world projects.

This book tries to provide a comprehensive overview of the main aspects of the Azure platform from the point of view of a developer. Some building blocks such as virtual machines are deliberately avoided to focus on development tools, development libraries, and development strategies. This is a recipe-based book; expect to dirty your hands with code that is also outside the boundaries of the recipe, as you would do with food in a real recipe.

Finally, Microsoft Azure is an evolving platform. As technical topics have a high decay rate, Azure services are enriched day by day with new features and service models, making the goal of writing a "complete" book almost impossible. However, this book focuses on core concepts, which remain quite stable over time.

What this book covers

Chapter 1, Developing Cloud Services for Microsoft Azure, shows you the main compute engine of Azure (also known as web/worker roles). This building block uses a specific service model to run web applications as well as any other custom code on stateless virtual machines. This chapter is also a great introduction to Visual Studio integration for those who are not familiar with it.

Chapter 2, Deploying Quickly with Azure Websites, shows you one of the most advanced Platform as a Service in the market, which lets customers/developers deploy an existing web application in minutes. This building block does not require a specific development skill, as it is a lock-in-free environment that provides advanced integrated features regarding the ALM. This chapter is essential for anyone who wants to start a new project or move an existing project to the cloud.

Chapter 3, Getting Storage with Blobs in Azure, shows you how Azure deals with storage of files (also known as Blobs). This building block is about Blobs' features, management, and administration, with food for thought for advanced scenarios. This chapter will be helpful to those who want to access the storage services programmatically.

Chapter 4, Going Relational with the Azure SQL Database, shows you the RDBMS of Microsoft Azure, enabling existing SQL-Server-based solutions to move into the cloud seamlessly. This building block is about SQL database management, monitoring, and development. This chapter is a good read to identify the correct approach to SQL on Microsoft Cloud.

Chapter 5, Going NoSQL with Azure Tables, shows you how to use the original Table service as a data store for unstructured data. This building block can be used to store entities when there is no strict need of a SQL-based, but scalable, service. This chapter is particularly useful while building a scalable data store of arbitrary entities.

Chapter 6, Messaging and Queues with Storage and Service Bus, shows you how to build scalable systems with message-based, disconnected systems. This building block covers the need for communication between heterogeneous systems, using queues of messages. This chapter also covers the relayed messaging feature and cross-platform communication.

Chapter 7, Managing Azure Resources with the Azure Management Libraries, shows you how to remotely manage a big portion of the Azure services, programmatically, through Management Libraries. The building block is the Management API on which Management Libraries rely. This chapter is suited for automation solutions, custom management tools, or even parts of complex multitenant systems where resources must be created/configured/destroyed dynamically.

Chapter 8, Going In-memory with Azure Cache, shows you how to improve an application's performance with in-memory caching. This building block is of primary importance for situations where there's web traffic and the demand is high, providing good service by storing frequently accessed information. This chapter is about caching, so it is extremely important to read it even if you are not adopting it as part of the implementation.

What you need for this book

This book requires a basic exposure to the main concepts of cloud computing, as well as the C# programming language and the Visual Studio IDE. The software needed to run the samples (and hopefully extend them) are Visual Studio 2012/2013, with the latest Azure SDK, SQL Server Management Studio Express, and a few free tools that are referenced in the book.

Who this book is for

If you are an architect, this book will help you make the correct decisions about which Azure building blocks to use. If you are a developer, this book will help you understand how to use them appropriately, and if you are a .NET developer, this book is a pure delight.

Conventions

In this book, you will find a number of styles of text 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: "Select Custom and specify Local Folder."

A block of code is set as follows:

<appSettings>
  <add key="DataConnectionString"value="DefaultEndpointsProtocol=https;AccountName={ACCOUNT_NAME};AccountKey={ACCOUNT_KEY}"/>
</appSettings>

Any command-line input or output is written as follows:

C:\Users\Administrator>PowerShell -ExecutionPolicy Unrestricted .\StartupTask.ps1

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Open Visual Studio, and on the menu bar, navigate to File | New | Project."

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 may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via 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 on 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 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.

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 would 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 on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright 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 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

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.