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

Preparing the server


So far, we have prepared the development environment. Now, it is time to make sure that we have the necessary configuration for the SharePoint 2010 server in which we are going to integrate Silverlight applications.

In order to complete all the examples that we will develop throughout this book, you must be an administrator of a SharePoint site collection. SharePoint Server 2010 or SharePoint Foundation 2010 must be installed in the same computer that runs Visual Studio 2010. You can check the necessary steps to perform a SharePoint Server 2010 or SharePoint Foundation 2010 installation for your development computer at http://msdn.microsoft.com/en-us/library/ee554869.aspx. Follow these steps to ensure that you are a site collection administrator:

  1. 1. Open your default web browser, view the SharePoint site, and log in with your username and password. You have to enter the SharePoint server URL. In our examples, we will use http://xpsgaston as our default SharePoint 2010 site. However, you have to replace it with your SharePoint 2010 site URL. Your default site will appear, in this case,http://xpsgaston/SitePages/Home.aspx, as shown in the following screenshot:

  2. 2. Click Site Actions | Site Permissions and a list of users with their permission levels will appear.

  3. 3. Now, click on Site Collection Administrators in the ribbon. A new dialog box with the names of the users with administrator rights on this site collection will appear.

  4. 4. If your user name appears in the text box, you are a Site Collection Administrator.

    Note

    If you cannot see the Site Collection Administrators button in the ribbon, it means that you don't have site collection administrator privileges on the site. In this case, you have to request this permission from the SharePoint site administrator.

Browsing SharePoint Site collections

Once we have ensured that our username is a Site Collection Administrator, we can use Server Explorer in Visual Studio to browse a SharePoint site.

  1. 1. Start Visual Studio as a system administrator user. In Windows Server 2008 R2, 2008, and 2003, if you are already logged as Administrator on the machine you can simply run the application. However, in Windows 7 or Windows Vista, you can do it by right-clicking on its shortcut and selecting Run as administrator in the context menu that appears, as shown:

  2. 2. Activate the Server Explorer palette. If it isn't visible, you have to select View | Server Explorer in the main menu.

  3. 3. Click on the expand button for SharePoint Connections. If the name of your desired SharePoint 2010 server doesn't appear in the list, you can manually connect to the server. You can do it by right-clicking on SharePoint Connections and selecting Add Connection... in the context menu that appears. Then, you have to enter the URL for the server, for example, http://xpsgaston and click OK in the dialog box that appears. If your user has the previously explained privileges, the server will appear in the list.

  4. 4. Now, click on the expand button for the SharePoint server and you will be able to browse its different nodes. Every component of a SharePoint site is represented by a node in the Server Explorer tree view. You can inspect the properties for each node, as shown in the following screenshot:

  5. 5. You can view some lists in your default web browser by right-clicking on a node and then selecting View in Browser in the context menu that appears. For example, you can do it for the node Home | Lists and Libraries | Site Pages and your default web browser will display all the pages. In this case, the URL shown is http://xpsgaston/SitePages/Forms/AllPages.aspx.

    Note

    Remember to run Visual Studio as a system administrator user in order to interact with SharePoint for all the examples covered in this book.