hit counter script
Skip to main content

Go Search
SharePoint for End Users
  

 Other Blogs

  EndUserSharePoint.com by Mark Miller
  Microsoft SharePoint Team Blog
  Michael Gannotti on SharePoint+
  SharePoint Design by Heather Solomon
  Asif's Blog by Asif Rehmani
  Ian’s SharePoint Blog by Ian Morrish
  SharePoint Demystified
  Siolon - Chris Poteet
  SharePoint Guru - Rod Stagg
SharePoint for End Users > Categories
Busy Saturdays for SharePoint
I've been hearing the buzz and reading posts about SharePoint Saturdays for months, and I've finally had the chance to attend one in person with today's SharePoint Saturday Redmond.
 
What's a SharePoint Saturday? It's a forum for training and connecting with the SharePoint community, with venues in many U.S. and some worldwide cities. Make sure to check out the schedule for a city that might be near you.
 
SharePoint Saturday
 
In fact, there are three SharePoint Saturdays (Raleigh, Philadelphia, and Redmond) today, plus the SharePoint 2010 RoadShow in Chicago. Plus, SharePoint Saturdays are coming to six more U.S. locations and one Australia location later this month.
 
You can check out live feeds for today's events at EndUserSharePoint.com, as well as a SharePoint Saturday Redmond event page on FaceBook. If you have other links related for today's events, feel free to let us know in the comments.
 
It's amazing to see the energy from all the planners, sponsors, speakers, and participants of these events. For example, the Puget Sound SharePoint Users group has been collaborating on this event for several weeks, not to mention the efforts of people around the world who make events like this happen. If you've ever planned events, you know there are dozens of details to coordinate. 
 
Rainy SharePoint Saturday
 
It's also impressive to see the dedication of the participants who overcame the inertia of a soggier-than-usual fall day in the Pacific Northwest. Today's weather is more naturally suited for a warm fire, a good novel, and hot tea, but the great content and energy in the 19 sessions are worth donning the raingear.
 
So far, I've caught the SharePoint Server 2010 and SharePoint Designer 2010 overviews. They've provided a great flavor of the upcoming releases, ranging from tags to visual workflows to enhanced editing and customization. 
 
I heard the SharePoint Administration session next door included a wake-up SharePoint dance, as well as insight on governance and server health features.
 
I have to sign off now for the next session - it's been hard to choose which of the 19 sessions to attend.  In the next few days on Get the Point, we'll be providing more details about the specific sessions.
 
Meanwhile, if you'd like to learn more about SharePoint while connecting with others, check out the upcoming SharePoint Saturday dates and locations.
 
Cheers,
 
Toni
SharePoint Content Team 
Use SharePoint Designer and Silverlight to create a video blog
by Rod Stagg, SharePoint Solutions Architect/Developer
http://www.rstagg.com | Allyis Inc., Kirkland, Wa
 
We have been looking at ways to increase the discoverability of internally produced video content and rich user experiences developed on Silverlight currently stored in various document libraries throughout our SharePoint intranet/extranet. 
 
One area of particular interest is finding a way to easily incorporate rich user experiences and streaming video directly into individual blog posts taking advantage of the the built-in commenting form provided in the SharePoint blog template. 
 
One challenge has been finding a "start small" approach that provides the performance benefits of streaming the video content vs. downloading from document libraries while being able to get started without the need to provision large media servers and associated infrastructure in the short-term.  
 
Another challenge has been finding an approach to surface our rich user experiences developed on Silverlight onto our internet-facing website as well as our intranet. 
 
To address these efforts we recently provisioned a Silverlight Streaming account and customized a standard SharePoint blog template using SharePoint Designer to display both our streaming video content and Silverlight 2 applications we currently have stored on the Silverlight Streaming Service. 
 
Blog Home Page:
Features: Modified layout, video and/or Silverlight application plays inline, blog title linked to full post page, caption linked to full screen play. 
 
 
Blog Full Post Page
Features: Video or Silverlight application plays inline, full screen link.
 
 
Benefits:
  • Continued ability to publish regular blog posts. 
  • Ability to embed videos stored on Silverlight Streaming Service directly into blog posts.
  • Ability to embed your own custom Silverlight applications directly into blog posts.
  • Ability to categorize video posts.
  • Ability to comment on video posts.
  • Makes use of XSLT and CSS for customizations-no custom javascript to deploy or maintain.
  • Ability to add functionality to existing blogs.
  • Ability to further customize via centralized custom XSLT files and custom CSS. 

Technical requirements:

You have access to edit the blog in SharePoint Designer, a free Silverlight Streaming account set-up with your Windows Live Id, and upload at least one video or Silverlight application to the service for use in your blog post. 

What is the Silverlight Streaming Service?

Microsoft® Silverlight™ Streaming by Windows Live™ is a companion service for Silverlight that makes it easier for developers and designers to deliver and scale rich media as part of their Silverlight applications. The service offers web designers and developers a free (*) and convenient solution for hosting and streaming cross-platform, cross-browser media experiences and rich interactive applications that run on Windows™ and Mac. Combined with the ability to create content with Microsoft® Expression and other 3rd party tools, web designers and content publishers wishing to integrate Silverlight applications into their online properties can enjoy complete control of the end user experience. 
 
 
Example video uploaded using the Upload Video feature:
 
 
 
 
Can I use my existing .wmv video files? 
 
Yes, there are some exceptions and size restrictions but providing you have a valid Windows Live ID account you can upload your .wmv video files directly to the Silverlight Streaming Service using the Manage Videos, Upload Videos feature.  For added features check out Expression Encoder 2 for encoding your videos to specific needs.
 
Can I use my existing Silverlight 2 .xap files?
 
Yes, there are some exceptions and size restrictions but providing you have a valid Windows Live ID account you can upload your Silverlight .xap files directly to the Silverlight Streaming Service using the Manage Applications, Upload Applications feature.  For added features check out Expression Blend 2 for designing Silverlight applications without code. 
 
What SharePoint Designer customizations  do I need to make to add this functionality to my existing SharePoint blogs?
 
We added three new site columns on our blog's post list to allow users to add their own Silverlight Streaming videos and applications and a caption when creating a new post.
 
New columns added to Post list:
  1. SilverlightStreamingServiceApplicationUrl (Text Field: Multiple Lines of Text, Plain Text)
  2. PostImageCaption (Text Field: Muliple Lines of Text, Rich Text)
  3. PostImageUrl (Text Field: Single Line of Text, Plain Text)

Modifications to blog pages:

We modified the default.aspx and post.aspx pages to use a customized version of each XSLT that both reformats the layout and incorporates an iframe to display the user-provided SilverlightStreamingApplicationUrl since the default SharePoint editing controls strip out any iframe, embed, or script references. To accomplish this we first saved back-up versions of our default.aspx and post.aspx pages and then opened each in SharePoint Designer in design mode and converted the appropriate dataview Web Parts to XSLT (right click, convert to XSLT option).

Source XSLT and CSS files:

 

 

 

Modifications to Default.aspx
  1. Upload the provided default.xsl to the blog's root folder.
  2. Convert the post dataview web-part to XSLT (right-click-convert to XSLT).
  3. Apply the custom XSLT file provided: from the dataview web-part's Common Data View Properties pane choose DataView Properties, then select the XSLT Source tab and browse to the default.xsl file.
Modifications to Post.aspx
  1. Upload the provided post.xsl to the blog's root folder.
  2. Convert the post dataview web-part to XSLT (ignore @Author error message).
  3. Apply the custom XSLT: from the dataview web-part's Common Data View Properties pane choose DataView Properties, then select the XSLT Source tab and browse to the post.xsl file.
  4. Create a filter and parameter to filter the post DVWP by id : from the dataview web-part's Common Data View Properties pane choose Filter, if not displayed create a new URL parameter for ID and set the value to [id].
CSS Modifications:

We also created a custom version of the blog templates core.css and referenced the following from the default.aspx and post.aspx pages as a link:
 
Added custom style sheet reference in default.aspx:
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<SharePoint:RssLink runat="server"/>
<link rel="stylesheet" type="text/css" href="customblog.css">
</asp:Content>
 
Added custom style sheet reference in post.aspx:
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<SharePoint:RssLink runat="server"/>
<link rel="stylesheet" type="text/css" href="../../customblog.css">
</asp:Content>
 
Once my blog is configured, how do I create new blog posts that include this new functionaility? 
 
Simply create your blog post as usual including your post title and post body. 
 
Fill in the SilverlightStreamingApplicationUrl and PostImageCaption fields and save your post as usual (see Obtaining the SilverlightStreamingApplicationUrl below for details on the URL to use).
 
Obtaining the SilverlightStreamingApplicationUrl:
From Silverlight Administration Home upload your .wmv video or Silverlight 2 application to the Silverlight Streaming Service.
 
 
From Silverlight Administration Home select the link to the video or application.
 
From Method 1: Embed the video into a web page and obtain the embed link for the video or application.
 
Important: Copy only the URL inside the iframe (example in red) . 
<iframe src="http://silverlight.services.live.com/invoke/37066/Butterfly%20Sample%20Video/iframe.html" scrolling="no" frameborder="0" style="width:500px; height:375px"></iframe>
 
What's next?
  • Investigate how to add YouTube and MSN videos into the posts.
  • Simplify deployment for new blogs via site template (.stp file).
  • Create custom site definition with custom columns included.
  • Create SharePoint application page to allow users to upload videos/display in blog post in one step. 
  • Investigate using Silverlight Streaming Services API and existing solutions to provide reporting on #downloads, video streaming data, etc.


SharePoint and Silverlight-Accessing SharePoint list data for Silverlight without web services

 

Overview

 

Recently I had a client request an animated carousel or filmstrip like player for displaying both images and embedded .wmv videos on their SharePoint intranet.  The idea is to display many images and videos without taking up a ton of screen space in the process.  Also, they wanted to be able to manage what images and videos get displayed via a standard SharePoint list, i.e. they could add links and descriptions in the SharePoint list and those would display appropriately in the filmstrip.

 

Example

 

Technical Analysis:

 

When evaluating a technical solution, it seemed like Silverlight would be the way to go for the filmstrip, Silverlight has built-in animation support, a media player for playing video, a rich set of controls, and good tool support with Expression Blend and Visual Studio 2008.   For accessing the links, etc. stored in the SharePoint list, the SharePoint web service - lists.asmx - seemed a logical choice. 

 

The catch:

 

The client’s IT department didn’t support custom ASPNET web applications or web services to be deployed without a huge review process or none at allJ.  The client’s SharePoint was pretty locked down to any custom development. 

 

The resolution:


There is a nifty yet fairly unknown protocol built in to SharePoint described on MSDN and the SharePoint SDK as the URL Protocol that allows you to query a list directly for all its list items.  Plus, you can do this using a simple URL in the browser and also from Javascript on the client.  I have used this fairly often since back in 2003 when I had to come up with a way to populate a Flash map with SharePoint data, so I was familiar with this protocol but not sure it would work in Silverlight. 

 

I broke out my Swiss-Army knife for SharePoint (URL Protocol aka owssrv.dll) and - good news! - it actually worked!  Silverlight can access data from a SharePoint list without the need to have a web service call.  Essentially using the same built-in web client classes inside Silverlight designed to access external web pages or files.    

 

So what is the SharePoint URL Protocol?


Excerpt from MSDN:

Embedding a request in a URL is a basic mechanism for issuing a method and its parameters to a server running Windows SharePoint Services.

 

The syntax

for using this mechanism is as follows:

[http://Server_Name/[sites/][Site_Name/]_vti_bin/owssvr.dll?Cmd=Display&List=GUID&XMLDATA=TRUE]

 

The details of using this syntax as part of your Silverlight application have been included in the code sample later in this post. 

 

The technical approach for the solution using Silverlight, a SharePoint list, and the URL protocol: 

 

Using Microsoft Expression Blend for the initial layout and Visual Studio 2008 for the C# code, I created an animated filmstrip (a variation of the all too familiar carousel in SilverlightJ) to display thumbnail images of the images and videos along with a main player area to display the larger view of the image/video when the user selected a thumbnail from the animated filmstrip. 

 

Advantages of using Silverlight:

Rich support for animation, rich set of controls, good development tools, i.e. Microsoft Expression Blend and Visual Studio 2008, and all the advantages of coding in C# with a simple deployment process.  You can even copy the Silverlight XAP files (essentially a compressed zip file with all your code) into a SharePoint document library and run from there along with a simple HTML page. 

 

Advantage of using a SharePoint list as the source data for the filmstrip player:

The administrator of the SharePoint list can designate what gets displayed in the filmstrip player automatically via the SharePoint list:

 

·          Designate the initial image/video that loads when the page loads.

·          Turn individual items visibility on/off

·          Select the appropriate thumbnail image and larger image

·          Select the appropriate URL for a video to be played in the video player

 

Advantages of using the URL protocol to populate the Silverlight filmstrip items:

It’s a lightweight HTTP protocol, can be accessed via a simple URL, and does not require web services to access the data in a SharePoint list. 

 

Example of the end solution:

 

Filmstrip player functionality:

·          Animated filmstrip displaying thumbnail images based on links provided in the SharePoint list.

·          Video player to play embedded .wmv video also based on links provided in the SharePoint list.

·          Image viewer to display larger image based on user selection in the filmstrip.

·          Main player section hot-linked to external URLs based on links provided in the SharePoint list.

·          User controls for the filmstrip animation

·          Pause/Play controls that turn on when video is loaded.

 

Example

Other potential uses?

  • Could be used on a Real Estate site to dynamically display images/video of the advertised home.
  • A video player for a blog using the blog to collect comments.
  • Basic slide show for a SharePoint document library or to display images from Flickr for instance in your SharePoint.

What's interesting about this implementation?

 

Using the URL protocol provides a simple mechanism for accessing SharePoint list data from within  Silverlight without the need to add a web service reference.

 

Using LINQ to XML to parse the returned data from the SharePoint in XML greatly simplifies working with the SharePoint list data in Silverlight once it’s retrieved.    

 

Using LINQ to XML also simplifies restructuring the data to a standard RSS feed format to use the data from the SharePoint list's built-in RSS feature as another option.

 

What's next on the feature front?

  • Adding the ability for users to leave comments and ratings.
  • Adding the ability for users to upload their own videos.

Code Example:

Example C# code for accessing the SharePoint list in Silverlight:

 

Silverlight 2 application attached to a ASPNET web project (I don't host the ASPNET app in SharePoint but easy way to generate the test.html and .XAP file)

 

 

public partial class Page : UserControl
    {
        private XNamespace z = "#RowsetSchema";      
        public Page()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(Page_Loaded);
        }
        public void Page_Loaded(object sender, RoutedEventArgs e)
        {
            string sUrl = "
http://[server]/[site]/_vti_bin/owssvr.dll?Cmd=Display&List={[listguid]}&XMLDATA=TRUE";
            WebClient sp = new WebClient();
            sp.OpenReadCompleted += new OpenReadCompletedEventHandler(sp_OpenReadCompleted);
            sp.OpenReadAsync(new Uri(sUrl));
        }
void sp_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
        {
            if (e.Error == null)
            {
              
var items = from item in results.Descendants(z + "row")
                        where item.Attribute("ows_LinkTitle") != null
                        orderby (DateTime)item.Attribute("ows_Created") descending
                        select new FilmFrame
                        {
                            ItemTitle = (string)item.Attribute("ows_Title"),
                            ItemLinkTitle = (string)item.Attribute("ows_LinkTitle"),
                            ItemType = (string)item.Attribute("ows_ItemType"),
                            ItemSourceUrl = (string)item.Attribute("ows_SourceUrl"),
                            ItemThumbnailUrl = (string)item.Attribute("ows_Thumbnail"),
                            ItemDescription = (string)item.Attribute("ows_Description"),
                            ItemDisplayFilmStrip = (string)item.Attribute("ows_DisplayInFilmstrip"),
                            ItemCreated = (DateTime)item.Attribute("ows_Created"),
                        };
//You can bind to an itemtemplate for a listview directly for simplicity-the specfic example UI above builds the XAML dynamically to provide more

flexibility
 //ListView.ItemsSource = items;
            }
        }

 

Separate namespace for filmstripitem:
namespace FilmStrip
{
    public class FilmStripItem
    {
        public string ItemTitle { get; set; }
        public string ItemLinkTitle{ get; set; }
        public string ItemSourceUrl { get; set; }
        public string ItemType { get; set; }
        public string ItemDescription { get; set; }
        public string ItemDisplayFilmStrip { get; set; }
        public DateTime ItemCreated { get; set; }
      
    }
}

 

Things you might want to consider when making use of this example:

 

The test.html and .xap file is being hosted inside SharePoint.  In this case I just dropped on the SP Site at the root site level via SharePoint Designer.

 

For a quick way to databind the XML returned from the SharePoint list to XAML I initially used listbox and a data item template.

 

Summary:

 

The URL protocol is just one more option for accessing the data in your user's SharePoint lists and web client class in Silverlight provides a mechanism to use the list data inside your Silverlight applications hosted in SharePoint.

 

Rod Stagg http://www.rstagg.com
SharePoint Solutions Architect
Allyis Inc. Kirkland Wa
http://www.Allyis.com