Silverlight meets SharePoint
The first versions of Silverlight have seen the light in 2007 and 2008, and in July 2009 Silverlight 3 has been released. It is an exciting and promising new technology. Silverlight is a browser plug-in that runs on the client and that can render animations, audio and video. To shorten the learn curve for the developer it exposes a subset of the .NET framework, but it is also able to execute javascript and to interact with other elements on the HTML page.
I have been involved in the integration of Silverlight in SharePoint 2007 from the first version of Silverlight and I had the luck to work on the Silverlight BluePrint for SharePoint together with Patrick Tisseghem. I’m a big fan ever since. I’m very glad to see that Microsoft follows this path and that Silverlight integration is built in out of the box in SharePoint 2010. I followed blogs and presentations on this subject for years now, and to my humble opinion these publications never go far enough. I’m convinced there is a future for this match. Silverlight can be used to enrich your SharePoint sites but it can also play an important functional role.
In the following series I’m going to use the best of both worlds and detail a number of samples in almost every scenario in SharePoint 2007 that I can think of. You will also be able to download most of the samples.
I hope this set of samples will get you started and I hope it inspires you to come up with other scenarios.
Installing VseWSS upgrade template for Visual Studio 2010
Visual Studio 2010 comes with a really great set of SharePoint 2010 templates for SharePoint development. All of you who have developed in Visual Studio 2005 and 2008 for SharePoint 2007 will agree that this set of templates makes our lives as SharePoint developer so much easier!
One of the tools we could use for SharePoint 2007 development was VseWSS. This tool added a lot of metadata to the project and was a pain if you wanted to open it on another machine that hadn’t VseWSS installed. Paul Andrew and his team have been working on an upgrade template to upgrade VseWSS projects to Visual Studio 2010. You can download it here.
But before you can start working with this upgrade template, you have to get it installed… and the explanation on the download page is far from complete. Here are the steps that I executed to get the upgrade template installed:
- Download the VSeWSS_Upgrade_Sample_Beta_20100108.msi installer.
- Be sure to close all instances of Visual Studio 2010 before you start installing the template.
- Run the installer.
- Open Windows Explorer and browse to C:\Program Files (x86)\Microsoft\VSeWSS Upgrade.
- You will find another MSI that you need to execute first: VSeWSSUpgrade_Beta2_20091203.msi.
- Open a Visual Studio command prompt as administrator.
- Execute DEVENV /installvstemplates.
- Start Visual Studio 2010.
- Create a new project and choose the Import VseWSS project template.
- In the first step of the import wizard you have to specify the SharePoint URL to where you want to deploy. You also have to specify if you want a farm solution or a sandboxed solution. Think before you act
- In the second step of the import wizard you have to specify the location of the VseWSS project you want to upgrade.
And there your go
If you need more information on the upgrades done by the upgrade template, you can read the README file which is installed together with the MSI in the C:\Program Files (x86)\Microsoft\VSeWSS Upgrade folder.
Once installed, the template works as magic: your project is converted to a SharePoint 2010 project. But the golden rule is to verify your new project before deploying it to SharePoint 2010 because it needs some (minor) tweeks before it is ready to deploy.
Silverlight 3 Media Viewer Web Part for SharePoint
Some time ago, I created a Silverlight 2 variant on one of the Silverlight BluePrint for SharePoint samples. Since a few weeks people start to request a Silverlight 3 version. You can download the Silverlight 3 version of the web part here. The zip contains the source code for the web part and the Silverlight application. It also contains a .wsp that you can upload and deploy to your SharePoint sites.
If you want to know how to install Silvelright 3 and what you need to know before using Silverlight 3 with SharePoint, read this post.
If you want to read more details about this web part, read this post.
I’ll be present(ing) @ BIWUG
On Thursday December 17th we have a user group meeting completely dedicated to SharePoint 2010. We will present small sessions of half an hour to let you taste the different but oh so fantastic new flavors that come with SharePoint 2010.
Here is the agenda:
- 18:00 – 18:30: Welcome
- 18:30 – 19:00: Introduction to SharePoint Foundation 2010 (Joris Poelmans – SharePoint MVP)
- 19:00 – 19:30: LINQ to SharePoint (Stephane Eyskens – SharePoint MVP)
- 19:30 – 20:00: Client Object Model (Jan Tielens – SharePoint MVP)
- 20:00 – 20:15: Break
- 20:15 – 20:45: Business Connectivity Services (Frank Cleynen)
- 20:45 – 21:15: Workflow (Peter Plessers)
You can read more about it here.
Hope to see you there!
Professional SharePoint 2007 Reporting with SQL Server 2008 Reporting Services
When I came home from work tonight, I found a package that I was waiting for a looong time: the recently published book on SharePoint 2007 and SQL Server 2008 Reporting Services. Some months ago I worked on a project where we needed to generate reports based on SharePoint 2007 data using Reporting Services. It was not that easy to put all parts together and to generate descent and useful reports.
It’s finally on the book shelf in your book store. It is published by Wrox but a big thank you goes to the authors Reza Alirezaei, Coskun Cavusoglu and Jacob J. Sanford. Go and get it to have this little jewel on your bookshelf or under your christmas tree.
SharePoint 2010 Development
Paul Andrew posted a number of small but interesting “code snippet” articles around SharePoint 2010 development that can help you getting started once Beta 2 is public:
- Module 1: Building Web Parts in SharePoint 2010
- Module 2: What Developers need to know about SharePoint 2010
- Module 3: Building Blocks for Web Part Development in SharePoint 2010
- Module 4: Accessing SharePoint 2010 Data using the Server side API
- Module 5: Accessing SharePoint 2010 Data using the Client side API
- Module 7: Developing Business Processes with SharePoint 2010 Workflows
- Module 8: Creating Silverlight User Interfaces for SharePoint 2010 Solutions
- Module 9: Sandboxed Solutions for Web Parts in SharePoint 2010
- Module 10: Creating Dialogs and Ribbon Controls in SharePoint 2010
Have fun!
SharePoint Conference 2009 @ Las Vegas
Together with my colleague Peter Plessers I’m at the SharePoint Conference 2009 in Las Vegas. They couldn’t have chosen a better location: a glamorous location for a glamorous product. I’m excited to follow a lot of sessions on SharePoint 2010. Pitty I cannot follow all of them.
Thank you product team for all the great work you did! Thank you for listening to our complaints and actually do something with it.
This week is for me like a fairytale that comes true, meeting all these great SharePoint MVPs and members of the product team. My feelings are tossed between very proud to very humble. Thank you all for your kindness and your warm welcome. Thank you Patrick for everything you’ve done for me. I will never forget that I achieved this thanks to you. So sad we are not here together.
I will be blogging on the sessions I follow from this blog. Have a nice reading time!
Visual Studio 2010 and Silverlight 3
After having installed Visual Studio 2010 I wanted to start developing a Silverlight 3 application. The Silverlight project templates seem available but when trying to create a Silverlight application, I got an error message mentioning that the Silverlight developer runtime wasn’t installed.
To be able to create a Silverlight 3 project I had to download and install the following things:
Visual Studio 2010 comes with some enhancements when it comes to Silverlight 3 application development. You can develop Silverlight applications for different versions of the runtime, meaning that you can choose if you want to develop for Silverlight 2 or Silverlight 3. You can also drag and drop controls from the toolbox onto the Silverlight interface, like for any other type of application. But there are also some limitations: .NET RIA Services development is not yet available for Visual Studio 2010. You can read more about this in Tim Heuers post.
SharePoint Conference 2009 in Las Vegas
Last week I subscribed for the SharePoint Conference 2009 in Las Vegas from October 19th till 22th. I hoped that the conference would be full of SharePoint 2010 stuff and it is! Here is a sneak peek of some conference titles:
- SharePoint 2010 Overview and What’s New
- Upgrading to SharePoint 2010
- SharePoint 2010 Capacity and Performance Planning
- SharePoint 2010 Security and Identity Management: What’s New
- Visual Studio 2010 Tools for Office Development
- SharePoint 2010 Ribbon, ECMAScript and Dialog Framework Development
- Developing with REST and LINQ in SharePoint 2010
- Upgrading SharePoint Server 2007 Code to SharePoint 2010
- Building Composite Applications with the Microsoft Application Platform
- What’s New in Business Connectivity Services (The Business Data Catalog Evolves!)
- FAST Search for SharePoint – Capabilities Deep Dive
- Advanced Dashboard Creation with Performance Point Services for SharePoint 2010
- Overview of Visio and Visio Services for SharePoint 2010
- SharePoint 2010 Web Content Management Deep-Dive
- If You Build It, They Will Come – Driving End User Adoption
I also subscribed for the post-conference day on October 23th ”SharePoint 2010 Developer Deep Dive” by Ted Pattison and Andrew Connell.
Almost can’t wait!
Hope to see you there!
Create a SharePoint Application Page hosting a Silverlight 3 application
In my previous post on Silverlight 3 integration in SharePoint I explained that there is no System.Web.Silverlight.dll in the SDK anymore. Of course you can install the Silverlight 3 SDK side by side with the Silverlight 2 SDK to be able to continue using the <asp:Silverlight> control but if you want to keep up with the newest technologies, you adapt to the rules.
In that case you can use the <object> tag to create the Silverlight application. The code snippet below contains the entire application page.
<%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<script type="text/javascript">
function onSilverlightError(sender, args) {
var appSource = "";
if (sender != null && sender != 0) {
appSource = sender.getHost().Source;
}
var errorType = args.ErrorType;
var iErrorCode = args.ErrorCode;
if (errorType == "ImageError" || errorType == "MediaError") {
return;
}
var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n";
errMsg += "Code: " + iErrorCode + " \n";
errMsg += "Category: " + errorType + " \n";
errMsg += "Message: " + args.ErrorMessage + " \n";
if (errorType == "ParserError") {
errMsg += "File: " + args.xamlFile + " \n";
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += "Position: " + args.charPosition + " \n";
}
else if (errorType == "RuntimeError") {
if (args.lineNumber != 0) {
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += "Position: " + args.charPosition + " \n";
}
errMsg += "MethodName: " + args.methodName + " \n";
}
throw new Error(errMsg);
}
</script>
<div id="silverlightControlHost" style="width:300;height:100">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
width="100%" height="100%">
<param name="source" value="HelloSilverlight3.xap" />
<param name="width" value="300" />
<param name="height" value="100" />
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40624.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration: none">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight"
style="border-style: none" />
</a>
</object>
</div>
</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Silverlight 3 Demo Application Page
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" runat="server" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea">
Silverlight 3 Demo Application Page
</asp:Content>
InitParameters can be passed by using another <param> element. The value string is comma separated as it has always been:
<param name="initParams" value="key1=value,key2=value2" />
The only disadvantage is that you have to click the Silverlight application before you can start interacting with it.

You can download the demo project here. Have fun with it!

