Book Image

Microsoft Silverlight 4 and SharePoint 2010 Integration

By : Gaston C. Hillar
Book Image

Microsoft Silverlight 4 and SharePoint 2010 Integration

By: Gaston C. Hillar

Overview of this book

Silverlight is a powerful development platform for creating engaging, interactive user experiences for the Web, desktop, and mobile applications. Integrating Silverlight RIAs in SharePoint 2010 offers amazing opportunities to combine the power and flexibility offered by SharePoint. It is easy to create great user experiences when you have a step-by-step guide to implement Silverlight 4 applications on SharePoint 2010 sites. This book is not a primer on Silverlight 4 or SharePoint 2010. This book focuses on the integration of Silverlight 4 and SharePoint 2010 and provides step-by-step guidelines for implementing Silverlight RIAs in SharePoint. It is filled with real-world examples that depict the various techniques for interacting with data and services provided by this powerful business collaboration platform, for the enterprise and the Internet. As you sit reading this, you might have already started thinking about the benefits of implementing multiple Silverlight applications in a SharePoint environment. This book will help bring those thoughts to fruition. This book begins with the fundamental concepts of integrating Silverlight 4 with SharePoint 2010, such as the preparation of the development environment to create applications using Silverlight 4 and the addition of one or more Silverlight RIAs to a SharePoint site. Then, it moves on to the SharePoint Silverlight Client Object Model world, using step-by-step examples to combine a Silverlight application and a SharePoint module. It also covers methods to deploy and debug the Silverlight application while it runs as Silverlight Web Part in a SharePoint page. The book teaches you to take advantage of the new features offered by Visual Studio 2010 to browse SharePoint lists. Once the reader has control over the SharePoint Silverlight Client Object Model and its asynchronous operations in Silverlight applications, it is time to access external databases through the new Business Connectivity Services (BCS) and interact with workflows. Then, the book explains to perform CRUD operations by consuming the new SharePoint 2010 WCF Data Services in Silverlight. In the end, you'll learn to utilize Silverlight 4's rich media features to add effects and interactive animations to images and videos, thus offering the final touches to the Silverlight 4 and SharePoint 2010 integration learning experience. By the end of this book, you'll learn to take advantage of the unique features offered by Silverlight in order to create impressive UX that interact with SharePoint 2010.
Table of Contents (12 chapters)
Microsoft Silverlight 4 and SharePoint 2010 Integration
Credits
About the Author
Acknowledgement
About the Reviewers
Preface

Preface

Silverlight is a powerful development platform for creating engaging, interactive user experiences for web, desktop, and mobile applications. Integrating Silverlight RIAs in SharePoint 2010 offers amazing opportunities to combine the power and flexibility offered by SharePoint. It is easy to create great user experiences when you have a step-by-step guide to implement Silverlight 4 applications on SharePoint 2010 sites, isn't it?

This book begins with the fundamental concepts of integrating Silverlight 4 with SharePoint 2010, such as the preparation of the development environment to create applications using Silverlight 4 and the addition of one or more Silverlight RIAs to a SharePoint site.

Then, it moves into the SharePoint Silverlight Client Object Model world, using step-by-step examples to combine a Silverlight application and a SharePoint module. It explains to deploy and debug the Silverlight application while it runs as s Silverlight Web Part in a SharePoint page.

Then, it is time to interact with SharePoint lists to perform CRUD (Create, Read, Update, and Delete) operations and retrieve metadata information for the fields that compose lists. The book teaches to take advantage of the new features offered by Visual Studio 2010 to browse SharePoint lists.

Once you have control over the SharePoint Silverlight Client Object Model and its asynchronous operations in Silverlight applications, it is time to access external databases through the new Business Connectivity Services (BCS) and interact with workflows. Then, the book explains how to perform CRUD operations by consuming the new SharePoint 2010 WCF Data Services in Silverlight.

Then, consuming different kinds of multimedia files from the new SharePoint 2010 Digital Asset Libraries offers the final touches to the Silverlight 4 and SharePoint 2010 integration learning experience.

In each example, the book teaches to take advantage of unique features offered by Silverlight in order to create impressive User eXperiences that interact with SharePoint 2010. For example, themes, effects, animations, data-binding, and Silverlight 4 Out-of-Browser capabilities.

What this book covers

Chapter 1, Integrating Silverlight 4 with SharePoint 2010, briefs you about integration of Silverlight 4 applications with SharePoint 2010 sites and solutions. In this chapter, you will learn to prepare a development environment and look at the tools to work with Silverlight 4 RIAs. You will also configure the SharePoint 2010 server and add Silverlight Web Parts to a new page. Finally, you will create your first Silverlight RIA and then make it available in a SharePoint site.

Chapter 2, Deploying and Debugging Techniques for Silverlight and SharePoint, will help you create a new Silverlight 4 RIA that retrieves data from SharePoint through the SharePoint Silverlight Client Object Model. In this chapter, you will create your first Silverlight RIA that interacts with a list of tasks in SharePoint and learn a way to run and debug asynchronous queries to the SharePoint server run by using multiple threads.

Chapter 3, Interacting with Data on the SharePoint Server, covers advanced interaction with data on the SharePoint Server. In this chapter, you will create a new Silverlight 4 RIA that allows us to insert new items into a remote SharePoint list and later enhance this simple application to retrieve metadata information for the fields. You will also perform delete and update operations to the remote SharePoint list through the SharePoint Silverlight Client Object Model.

Chapter 4, Creating Dynamic Business Solutions, guides you to create dynamic business solutions by accessing external databases in a Silverlight RIA included in a SharePoint solution and interacting with workflows. You will also work with the new SharePoint 2010 approval workflows and enhance an existing Silverlight RIA to retrieve workflow status information and display it in a column of a grid.

Chapter 5, Working with WCF Data Services, helps you develop Silverlight 4 applications in SharePoint 2010 sites that interact with data in lists by performing insert, update, and delete operations with WCF Data Services. In this chapter, you will use Fiddler to inspect the communication between the Silverlight RIA and the SharePoint server. Finally, you will analyze the performance and resource usage information for pages and Web Parts with SharePoint Developer Dashboard.

Chapter 6, Interacting with Rich Media and Animations, will help you access asset libraries in a Silverlight RIA rendered in a SharePoint Visual Web Part. In this chapter, you will learn to take advantage of Silverlight 4 rich media features to add effects and interactive animations to images and videos.

What you need for this book

The following software products are used in this Microsoft Silverlight 4 and SharePoint 2010 Integration book:

  • Visual Studio 2010 Professional, Premium, or Ultimate

  • SharePoint 2010 Server or SharePoint 2010 Foundation, installed on the same computer that runs Visual Studio 2010

  • SharePoint Designer 2010

Who this book is for

If you are an application developer who wants to implement Silverlight 4 applications within a SharePoint 2010 environment, this book is for you. We assume that the reader has prior knowledge of Silverlight and SharePoint 2010 and this book focuses on the integration of Silverlight with SharePoint 2010.

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 are shown as follows: "Add a new XML file to the project, Projects.xml."

A block of code is set as follows:

public class Project
{
public int ProjectId { get; set; }
public string Title { get; set; }
public int EstimatedDaysLeft { get; set; }
public string Status { get; set; }
public string AssignedTo { get; set; }
public int NumberOfTasks { get; set; }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

lblStatus.Content = "Started";
// Replace "http://gaston-pc" with
// your SharePoint Web site's URL
_context = new SP.ClientContext("http://gaston-pc");
_context.Load(_context.Web);
_context.ExecuteQueryAsync(OnConnectSucceeded, null);

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: "Click on Create; SharePoint will create the new list with no items".

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 , and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail .

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.

Note

Downloading the example code for the 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.

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 let us know 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.