Life, the universe and whatever

Something to say about most things

Archive for the tag “Silverlight”

SharePoint and Silverlight 3

Having accomplished some great results with version 2 of Silverlight in some of my SharePoint projects I have been wondering about version 3 as the implementation has changed somewhat.  Karine Bosche has very kindly gone to the trouble of blogging how to get your Silverlight 3 applications running in WSS 3.0 and MOSS 2007.  Time to roll up the sleeves and dive into all that new functionality!

SharePoint as a development platform

Any developer who has interacted with SharePoint in any way, shape or form will surely have asked themselves the question, asked someone else the question or read or partook in at least one of the many debates that have raged over the years.  For me the question “is SharePoint a good development platform?” is pointlessly provocative so I would rather ask “can SharePoint be a good development platform?”.  Instead of giving my own answer to that question I will quote Kirk Evans reflecting on a 6 part series of articles and screen casts he authored entitled SharePoint for Developers:

This series has been building up to an application that provides the ability for an end user to pause a video (rendered through a Silverlight media player) and capture annotations about the video at a particular time segment.  You can imagine that, in a media company, there very well could be additional actions taken when someone creates an annotation such as automatically sending a formatted email to an advertiser (“The text formatting at time 00:00:28.4500000 does not comply with our standards for broadcast”).  This is the real power and benefit of leveraging SharePoint as an application platform: we can incrementally add value to our solution without requiring us to build that functionality into the service.  In a traditional ASP.NET application, you would likely add new functionality in a business logic layer, requiring a change in database storage, changes to the UI to display the new functionality, and changes to the service layer to expose the data to remote consumers.  With SharePoint, you could simply attach workflows to the content type, and any updates to the list via our web service will enjoy this new functionality without making any changes to the web service.  Or you might create a new content type and attach that to an existing list. 

This is a hugely powerful concept, and strongly demonstrates why you should consider using SharePoint as a development platform.  The separation of fields and content types and the ability to apply workflows to content types is huge.  This separation provides the framework for reusable components that can be easily assembled by end users through the web UI instead of requiring developers to code more functionality.  This lets you focus on creating the really cool building blocks and focusing on how to add value rather than writing monotonous forms code that performs CRUD operations against yet another custom database.  It provides a single, consistent platform that provides the web UI, services, and storage within a single platform.

The possibilities here are staggering, because it truly changes the way we think about building applications.

I certainly do not want to reignite any of those previous flame wars about SharePoint as a development platform, I simply saw Kirk’s excellent work which clearly articulates how the development story around SharePoint is continuing to gather pace, credibility and substance.

Please; anyone wishing to express their views on this subject (for or against), I am happy to moderate comments from the well reasoned voices of experience but I have no inclination to host yet another flame war on the subject.  I myself have struggled over the years with trying to build professional, robust systems on SharePoint but I would urge you to take the time to watch Kirk’s screen casts and read the wealth of information and resources he has taken considerable time to pull together.  Nobody can deny the additional overheads (time, experience, software, hardware) involved and it boils down to whether those overheads outweigh the benefits that Kirk succinctly sums up and that can only be done on a person-by-person, situation-by-situation basis.

SharePoint, Silverlight and WCF

These are interesting times in the SharePoint space, Microsoft SharePoint 2010 is on the horizon but as yet very few details have emerged.  As a freelance SharePoint developer and consultant I have for some time been carefully considering which “horses to back” in terms of the technologies to skill up on and introduce into my everyday work.  I believe that both Silverlight and Windows Communication Foundation (WCF) will play a significant and evolving role in the future of Microsoft Office and SharePoint so I have been tracking their evolution and have been slowly and selectively introducing them into my clients’ solutions.

Today I came across the article I have been waiting for: SharePoint 2007 with WCF and Silverlight.  For sometime I have been struggling to put all the pieces of the puzzle together in a deployable and supportable way and, even though this excellent article by Sahil Malik takes a bit of working through, I now have an end-to-end solution template for displaying rich UI with Silverlight interacting with the SharePoint object model through WCF services.  The benefits that make this worth while for me are;

  • a level of UI functionality, look and feel that users are coming to expect
  • the potential to develop far more efficient SharePoint pages that don’t round trip just to update a small area on a page (jQuery and AJAX are also very definitely on my radar)
  • free upgrades – Silverlight 3 is already in beta and promising even more new features, imagine the mouth watering possibilities of SharePoint with out-of-browser support!

Incidentally, I would strongly recommend that anyone interested in Silverlight for SharePoint should read Professional Microsoft SharePoint Development Using Microsoft Silverlight 2.

Design for developers! Whatever next?

I’ll tell you what next – they’ll have us working on Macs and wearing flowery shirts, that’s what next!

Deep breaths… and relax.

So what got me so up tight? I was browsing the Silverlight community area and happened upon this blog post from Arturo Toledo, a Microsoft Product Manager on the UX Platform & Tools team. They have produced a series of short videos called UI Design for Developers in cooperation with Total Training and having watched the first 5 (from 13) I have to say they have done a pretty fantastic job. Here is what Arturo has to say:

“…we produced these 13 video series with quick tips & tricks for non designers to learn more about design. This is something I officially consider Part I because teaching design takes longer than just 13 videos but I hope these help you to get a little deeper into design.

Not only do the videos take you step-by-step through some of the fundamental principals, but they are a great tool for getting some familiarity with Expression too.

Maybe, just maybe, us developers and those designers don’t have to be divided by Macs and PCs, combats and flowery shirts anymore?

Technorati Tags: ,,

Silverlight replacement for the web part?

Tim Greenfield is author of the Programmer Payback blog that any developer with an interest in Silverlight should subscribe to. He has developed a super little control that places a header section over a body section and takes the basic form of an ASP.NET 2.0 (and SharePoint) web part. Read the post here and download the source code here. This gives me a great basis for exploring the possibility of creating a Silverlight replacement for the standard SharePoint web part, a killer implementation that I know many of my clients would lap up.

Thanks Tim.

Technorati Tags: ,

Setting up for Silverlight development on SharePoint

A task that finally worked itself to the top of my to-do list is preparing my SharePoint development environment for Silverlight. I kept a reference to an article written by Karine Bosch back in November; Creating a SharePoint Web Part that hosts a data binding Silverlight application. Since the article was published Silverlight 2 went RTW and I am starting from an environment with no prior Silverlight installation.

Where to begin?

First I had to download and install the Microsoft® Silverlight™ Tools for Visual Studio 2008 SP1. When The installation package complained that service pack 1 was required for Visual Studio 2008 so I had to download and install that.

45 minutes* later and my SharePoint development VM was running Visual Studio 2008 SP1 and Silverlight Tools for Visual Studio which includes the SDK.

Coding the solution

Karine’s article is excellent as it walks through the components of the solution and explains what needs to be done and why. However, I still found that I needed to download the ZIP file of the code from Karine’s blog and cut, paste and modify it (namespaces etc.) into my own solution. Karine has updated the code to work with the RTW version of Silverlight 2 and explained the changes in another blog post. I would recommend running through Karine’s article again at this point to cement your understand of the solution (I always find working code the best documentation).

Preparing the server

Three steps are required to enable WSS 3.0 or MOSS 2007 server(s) to run Silverlight.

  • Drop the System.Web.Silveright.dll into the Global Assembly Cache. Having installed the Silverlight Tools for Visual Studio 2008 (see above), this assembly will be located at (C:\)Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Server.
  • Update the web.config file of the SharePoint application on all front end web servers to run on the .NET 3.5 framework. Karine published a really useful blog post that references an excellent post by her colleague Jan Tielens in which he steps through what he calls the “lazy” way to update your web.config files to .NET 3.5. This is exactly the technique I used because far from lazy, I think this is the safest (and therefore most sensible) method. As Karine points out in her blog post, after using Jan’s technique you will need to add a reference to the Silverlight assembly in the <system.web><compilation><assemblies> section as follows; <add assembly=”System.Web.Silverlight, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />
  • Add a new MIME type to allow Silverlight applications to run in your SharePoint web application. In IIS open the properties dialog for the SharePoint web application and select the HTTP Headers tab.

IIS Application Properties

Click on the MIME Types… button and Add a new MIME Type for Silverlight applications.

Silverlight MIME Type

The Extension of the new MIME Type is “.xap” and the MIME type is “application/x-silverlight-app”.

Another blog post I found really useful was What I did to get Silverlight Working in SharePoint in Today’s Webcast by Andrew Connell. If you know SharePoint you will know Andrew Connell and if you don’t then you don’t! (If you only check a few blogs regularly then make one them Andrew Connell‘s, in my opinion he is Mr SharePoint Community).

NB I am not aware that these steps need to be performed in any particular order, however, the application pool of the SharePoint web application will need to be recycled so this should be planned in a production environment.


After getting Karine’s excellent sample running in my own development environment I was very impressed with the look of the web part, it tells me that Silverlight is the way to go to address the rather aesthetically challenged standard SharePoint UI. However, all of that would be next to worthless to me if I couldn’t debug it in situ. Attaching the Visual Studio debugger to a SharePoint application is a proven, reliable and extremely effective technique and as it turns out, debugging a Silverlight application in this configuration is just as straight forward. Set your breakpoints in Visual Studio and from the Debug menu select Attach to Process. In the resulting dialog box click the Select… button to display the Select Code Type dialog and check the box for Silverlight. Now, under Available Processes, look for an iexplorer.exe process with Silverlight listed under Type and a Title that matches the title of the SharePoint page.

The finished product

I anticipate there will be a pretty steep learning curve if I am to make Silverlight my user interface tool of choice, however thanks to Karine’s excellent article and code I now have a solid foundation on which to build up my knowledge.

*actually 45 minutes is what it should have taken, it actually took more like 2 hours as I kept getting the following error from the Visual Studio 2008 SP1 installer: Microsoft .NET Framework 2.0 Service Pack 2 – Update ‘.NET Framework CLR’ could not be installed. Error code 1603. After trawling the logs and several forums I found this thread that made me suspect a file access issue however I don’t run any AV on my VMs so I elected for a straight forward reboot and hey presto!

Post Navigation


Get every new post delivered to your Inbox.

%d bloggers like this: