If you don’t already know, I am passionate about Silverlight. I love working in it. I love talking about it. Where Silverlight really shines is when it is integrated with SharePoint. When calling SharePoint 2007 web services (assuming you have the cross domain files defined) allow you to create rich applications that can be integrated in (or outside) of SharePoint very quickly. The biggest issue working with SharePoint 2007 is if the web service doesn’t have the necessary API’s. If the web service doesn’t have the required API’s, you had to write custom web services or remove the feature. I was quite excited to hear that Microsoft was going to support a new way to access SharePoint content from a Silverlight application in SharePoint 2010. The feature is known as the Client Object Model. The book Microsoft Silverlight 4 and SharePoint 2010 Integration by Gastón C. Hillar covers the new Client Object Model functionality along with WCF Services.
Chapter 1 is an introduction chapter. The first thing it covers is the benefits of Silverlight with SharePoint. The next section discusses setting up a development environment. I like how it goes through each application and gives a description of the application. Developers need to understand how to manually install the application rather than relying on Web Platform Installer. The 3rd section walks through creating a Silverlight application. Finally, once the application is built, the steps to deploy the Silverlight application to SharePoint is covered.
In Chapter 2, you begin learning how to interacting with SharePoint data and services. When working with SharePoint content, you need to have a full understanding of the fields you are working with. One great tip is using the Server Explorer to view the InternalName and FieldValueType properties of a field. The book then goes through some examples of using the Client Object Model to interact with SharePoint content. It does so by listing out the code up front and then diving into each method. Many times you see the detail of how something is done and then see the full source listing. It did take a bit of switching back and forth between pages to understand what was going on. When working with Silverlight, all requests are asynchronous; however, unlike SharePoint 2007, the request is on a different thread. In order to update the UI, you must use Dispatcher.BeginInvoke. The book does a good job of covering this. The next area is hooking up your Silverlight application with SharePoint and how to debug it. Finally, the book covers tips on 32-bit vs. 64-bit, Visual Studio 2010 multi-monitor support, scalability, and multiple browsers.
Chapter 3 expands on the previous chapter by adding error handling and more CRUD operations (outside of READ). The first CRUD operation is Create. It walks through inserting items using the Client Object Model. The chapter demonstrates how to handle asynchronous calls when the request is successful and unsuccessful. One nice piece is it shows using the Server Explorer to work with more complex field types (Priority and Status). Too many times you see examples where only simple field types (string, number, and date) are used. The next section in the chapter is creating multiple Silverlight applications that communicate with each other – a huge plus IMO. Finally, the chapter finishes the CRUD operations by cover delete and update using the Client Object Model.
Chapter 4 covers more complex topics to create dynamic business solutions. The first section in the chapter (quite a bit of content) is creating Silverlight application that leverages external content types (BCS) in order to integrate with external databases. The next section discusses the process of creating an out-of-the-browser application. The final section walks through interacting with SharePoint workflows.
Chapter 5 discusses a new feature in SharePoint 2010 and that is the WCF Data Services. Instead of interacting with SharePoint 2010 data using the Client Object Model, your Silverlight application can consume data exposed by WCF Data Services. WCF Data Services supports the Open Data Protocol (OData) which has become quite popular recently. WCD Data Services allows you to call URL (i.e. ListData.svc) to retrieve content – similar but not as feature rich as RPC that could be used by Silverlight to call SharePoint 2007 content. The chapter starts off discussing using ListData.svc to retrieve list information. The next section walks through displaying SharePoint list content consuming a SharePoint 2010 WCF Data Service. The next section covers using SharePoint 2010 WCF Data Services to perform CRUD operations. Finally, the chapter covers advanced debugging techniques such as using Fiddler to debug HTTP requests and using the SharePoint Developer Dashboard.
Chapter 6 covers interacting with rich media and animations. These are two areas where Silverlight really shines and is very complex to do in standard SharePoint web parts.
I enjoyed reading Microsoft Silverlight 4 and SharePoint 2010 Integration. I truly believe Silverlight is a game changer when it comes to SharePoint. Being able to create applications that integrate with SharePoint either in the browser, out-of-the-browser, in a Windows Gadget, or on a Windows 7 Phone is very powerful. I am amazed how much more productive I am creating Silverlight applications compared to traditional SharePoint web parts. The only area missing from the book is a chapter on MVVM. I would recommend this book to developers who have some basic knowledge in Silverlight and SharePoint – not for beginners.