Preface
Integrating Silverlight and Windows Azure can be difficult without guidance. This book will take you through all the steps to create and run a Silverlight Enterprise application on the Windows Azure platform. It starts by providing the steps required to set up the development environment, providing an overview of Azure. The book then dives deep into topics such as hosting Silverlight applications in Azure, using Azure Queues in Silverlight, storing data in Azure Table storage from Silverlight, accessing Azure Blob storage from Silverlight, relational data with SQL Azure and RIA, and manipulating data with RIA services among others.
What this book covers
Chapter 1, Getting Started, shows how to set up your development environment. It covers the basics of ensuring that Visual Studio 2010, the Silverlight Software Development Kit (SDK), and the Azure SDK are installed. The tools that can be of assistance will be mentioned, such as Expression Blend, LINQPad to SQL Azure, and the Azure Storage explorer.
Chapter 2, Introduction to Azure, gives an overview of Windows Azure. It covers what Azure is, how Microsoft abstracts away the entire infrastructure worries so that the business can just focus on creating the business logic instead.
Chapter 3, Hosting Silverlight Applications in Azure, teaches how to create a Visual Studio solution that contains both the Silverlight and the Azure Project. The basics of how to consume a Windows Communication Foundation (WCF) service, hosted on Azure from within Silverlight is shown, as well as the basics of creating an Azure account and deploying it.
Chapter 4, Using Azure Queues with Silverlight, introduces the Azure storage service and the role it has within the Azure platform. The rest of the chapter then focuses on introducing the Azure Queue service. A Silverlight application is built that uses queues to indicate that widgets should be built.
Chapter 5, Accessing Azure Blob Storage from Silverlight, explains Azure Blob storage. A Silverlight application is built that can interact with the Blob storage to display the photos. It introduces the Azure CDN (Content Delivery Network) and how it can be used to increase the application performance.
Chapter 6, Storing Data in Azure Table Storage from Silverlight, introduces Azure Table storage and how it compares to the relational databases. Concepts such as how to partition your data for scalability are introduced. A Silverlight application is built that uses Azure Table storage to publish news stories.
Chapter 7, Relational Data with SQL Azure and Entity Framework, introduces SQL Azure and how it can be accessed through Entity Framework. You will learn the basics of querying and selecting data from an SQL Azure, and how to expose this data through WCF services.
Chapter 8, RIA Services and SQL Azure, explains how SQL Azure and RIA Services are combined. Rather than writing WCF methods by hand, RIA Services will be utilized to simplify the application development. You will learn how to modify and create data from within Silverlight.
Chapter 9, Exposing OData to Silverlight Applications, explains how OData is an open standard for exposing data. Data exposed in this way is queryable across a number of platforms, such as Silverlight, JavaScript, iPhones, and so on.
Chapter 10, Web-scale considerations, discusses breaking your application into asynchronous components that assists with the scaling of your architecture. Techniques for globalizing your application by hosting in multiple datacenters around the world are also shown.
Chapter 11, Application Authentication, focuses on how to get standard ASP.Net authentication and roles working with an Azure application by storing it in SQL Azure. The Azure Access Control System is also introduced as well as the Federated Authentication.
Chapter 12, Using Azure AppFabric Caching to Improve Performance, explores what data caching is and how it can improve the performance of your application.
What you need for this book
No prior knowledge of Windows Azure is assumed. However, a basic background in Silverlight is expected. The chapters and exercises have been written to allow completion regardless of current skills.
The first chapter will take you through configuring your computer to allow you to complete the rest of the book. As long as you have an Internet connection and a copy of Windows (Vista or later), you will be able to obtain everything you require.
Who this book is for
This book would primarily be aimed at application developers who want to build and run Silverlight Enterprise applications using Azure Storage, WCF Services, RIA services, and SQL Azure. A working knowledge of Silverlight and Expression Blend would be required. However, knowledge of Azure would not necessarily be required since the book would be covering how to integrate the two technologies in detail.
Conventions
In this book, you will find a number of styles of text that distinguish different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
A block of code is set as follows:
using System.ServiceModel; namespace WebRole1 { [ServiceContract] public interface IHelloWorldService { [OperationContract] string GenerateHelloWorldGreeting(); } }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
using System; using Microsoft.WindowsAzure.ServiceRuntime; namespace WebRole1 { public class HelloWorldService : IHelloWorldService { public string GenerateHelloWorldGreeting() { var currentTime = DateTime.Now.ToLongTimeString(); var instanceId = RoleEnvironment.CurrentRoleInstance.Id; return string.Format("Hello World! The server time is {0}. Processed by {1}", currentTime, instanceId); } } }
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: "Right-click on the Silverlight project HelloWorldSilverlightProject and select Add Service Reference. Click on Discover to allow Visual Studio to automatically detect the WCF service in the solution".
Note
Warnings or important notes appear in a box like this.
Note
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<feedback@packtpub.com>
, and mention the book title in the subject line 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/support, 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.
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<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
You can contact us at<questions@packtpub.com>
if you are having a problem with any aspect of the book, and we will do our best to address it.