Book Image

Microsoft Silverlight 5 and Windows Azure Enterprise Integration

By : David Burela
Book Image

Microsoft Silverlight 5 and Windows Azure Enterprise Integration

By: David Burela

Overview of this book

Microsoft Silverlight is a powerful development platform for creating rich media applications and line of business applications for the web and desktop. Microsoft Windows Azure is a cloud services operating system that serves as the development, service hosting, and service management environment for the Windows Azure platform. Silverlight allows you to integrate with Windows Azure and create and run Silverlight Enterprise Applications on Windows Azure This book shows you how to create and run Silverlight Enterprise Applications on Windows Azure. Integrating Silverlight and Windows Azure can be difficult without guidance. This book will take you through all the steps to create and run Silverlight Enterprise Applications on the Windows Azure platform. The book 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 amongst others.
Table of Contents (19 chapters)
Microsoft Silverlight 5 and Windows Azure Enterprise Integration
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Useful tools


There are many tools available to assist you with the development of Silverlight and Windows Azure enterprise applications. The following is a short list of tools that may be useful while progressing through this book.

Official Windows Azure Tools for Visual Studio

The best tool for deploying to and diagnosing Windows Azure is the official Microsoft Azure Tools for Visual Studio. These tools enable you to manage your Windows Azure services while you work with Visual Studio. Some of the functionalities provided are as follows:

  • The ability to deploy directly to Azure from within the Visual Studio

  • IntelliTrace debugging of your deployed instances

  • Azure storage services access through the Visual Studio Server Explorer

The following screenshot shows the Server Explorer being used to browse the contents of the Blob storage. It can be accessed from Visual Studio from the menu bar by selecting View | Server Explorer. New accounts can then be added by right-clicking on the Windows Azure Storage node and selecting Add new storage account:

Azure Storage Explorer

The Windows Azure Tools for Visual Studio provide a basic support for browsing storage accounts to assist with debugging. However, the functionality of the built-in tools can be lacking if you are trying to upload new files or modify the metadata.

The Azure Storage Explorer (http://azurestorageexplorer.codeplex.com) is a GUI tool for viewing and modifying the data in a blob, queue, and table storage within the Windows Azure Storage. The tool is useful for quickly creating folders and uploading files such as media, or for downloading log files for viewing. It is also valuable for debugging the messages waiting to be processed in a queue, or whichever data is present in a table.

The tool is free and open source and is a good first choice when looking for a way to view the contents of your storage accounts. The following screenshot demonstrates the Azure Storage Explorer being used to browse and open an image of a Tulip from the Blob storage:

Expression Blend

If you plan to perform any serious UI work on a Silverlight application, then Expression Blend (http://www.microsoft.com/expression/products/Blend_Overview.aspx) is an essential tool. Expression Blend is a tool for designers to create XAML-based user interfaces. While it is designer focused, anyone who is creating serious Silverlight applications should be using it over the built-in designer tools within Visual Studio 2010. Expression Blend offers a rich experience while designing screens and has a number of useful features, such as design-time data (sample data while designing a screen), or the ability to create keyframe-based animations.

Expression Blend and Visual Studio 2010 integrate well together, both applications have the ability to work simultaneously with the same solution. As Expression Blend works with the same solution files, all the design work can be kept in a source control, side-by-side with the code. The following screenshot shows a Visual Studio 2010 solution that has been opened with Expression Blend. The tabs on the left-hand side are for selecting files within the project, while the tabs on the right-hand side are used for modifying properties of the selected visual elements:

Expression Blend is not a free product and must be purchased in the same way as Visual Studio 2010. If you are in a possession of an MSDN account, then you may find that it is already included in your subscription.

Silverlight Toolkit

Silverlight comes with a basic set of UI controls that can be used to create simple screens for your application. However, most applications will require additional controls. The Silverlight Toolkit (http://silverlight.codeplex.com/) provides a range of extra controls that can be used in your applications for free. These are the basic set of additional controls that your application should be using.

Two controls that are useful for working with data are the Data Grid and Data Grid Pager. Silverlight does not come with controls to display tabled data, making these controls useful for data heavy applications.

The Silverlight Toolkit also gives support for themes, allowing you to change the look and feel of all controls in your application with ease.

Other useful controls available in the toolkit include the following:

  • Charting

    • Bar chart

    • Line chart

    • Pie chart

    • Bubble chart

  • Calendar control / date picker

  • Busy indicator

  • Dock panel

Telerik Silverlight controls

The Silverlight Toolkit is a minimum set of additional controls that all projects should take advantage of, but it is highly recommended that you purchase a commercial control set.

Note

I have personally used a number of different control packs from different vendors, but I consistently come back to using the Telerik controls (http://www.telerik.com/products/silverlight.aspx). Their controls have a wide range of functionality, are updated frequently, and the technical support is exceptional. Any issues I have had with implementing the controls in my applications have been promptly addressed every time.

A short list of the available controls includes:

  • Advanced charting

  • High performance datagrids

  • Sparklines

  • Windows that can be docked and tabbed

The controls can be pricey, but the amounts of time they will save a development team quickly recover the costs.

Silverlight Spy

Silverlight Spy (http://firstfloorsoftware.com/silverlightspy/) is a runtime inspection tool useful for debugging Silverlight applications. Silverlight Spy allows you to explore the visual hierarchy of your screens at runtime, which can assist when you are trying to discover why a control is missing a border, or is on the wrong side of the screen.

There are many other functions that the tool allows, such as the ability to inspect the isolated storage of the application, real-time performance metrics of your Silverlight application, and event monitor for watching in real time as events are raised.

The application is not free, but it may be worth the purchase if you find yourself in a tricky debugging situation.

LINQPad

LINQPad (http://www.linqpad.net/) acts as a scratchpad that allows you to quickly compile and execute short snippets of C#, VB.Net, or F# code. It may not have any direct impact on your Azure development, but it is a useful tool to be stored in your collection.

The main use of LINQPad is to quickly write and execute LINQ statements against data sources. This quick execution cycle allows you to tweak and modify your LINQ queries quicker than trying to recompile and execute an entire application.

The power of LINQPad is its ability to query against a variety of data sources directly. A few of the supported sources include:

  • LINQ to SQL (SQL Server)

  • LINQ to XML

  • SQL Azure

  • Azure tables

  • OData endpoints

  • WCF data services endpoints

The ability to query against OData endpoints directly can help develop applications against data from other sources. The following screenshot demonstrates the ability to query against the Netflix endpoint at http://odata.netflix.com/v1/Catalog/. Using LINQPad, you are able to construct a standard LINQ query to retrieve all movie titles that were released in the year 1990 and have an average rating over three stars: