Office 365 - Using Silverlight in SharePoint Online
Abstract: One of the core features of Office 365 is "SharePoint Online" essentially it is SharePoint 2010 Server in the "cloud" (it does not include a lot of the SharePoint 2010 Enterprise features). In my Silverlight 4 Business Intelligence book I dedicate a chapter to integrating Silverlight into SharePoint 2010 and I have blogged about it on this site as well. However, in this blog article I want to show how the same Silverlight integration concepts apply to Office 365 - SharePoint Online.
Background Info: Microsoft launched Office 365 June 28th 2011 as a SaaS BPOS (Business Productivity Online Suite) which offers some great features including: SharePoint, Exchange Online, Lync Server and Office Web Apps. These services can are completely online delivered in a SaaS model requiring no local infrastructure (think of it as Microsoft Small Business Server in the cloud).
In SharePoint Online you get a basic SharePoint 2010 team site that you can begin adding content. The most basic way to add content is to upload documents, pictures etc. and use the SharePoint Online team site as a document library. Even though SharePoint Online doesn't include all the advanced enterprise SharePoint 2010 Server features, it does have some very powerful integration features such as web parts (which you can develop using SharePoint Online Sandbox Solutions).
Web Parts have been the modular components used as building blocks since SharePoint 2003. There are some web parts that are provided out of the box in SharePoint that allow you to add content in them or you can create your own. Creating your own custom web parts even in SharePoint 2010 is not a trivial task (the web part API created in .NET 2.0 has been not updated and creating Ajax-like web parts, that communicate and maintain state is NOT trivial). This is where Silverlight web part integration in SharePoint 2010 really shines. SharePoint 2010 and SharePoint Online both include a Silverlight web part, which allows you to host any Silverlight application (XAP file) inside the team site.
Instructions to add a Silverlight Application (internet URL of a XAP file) to Office 365 SharePoint Online:
- Log into your SharePoint Team Site
- You can add a new page or edit the existing one
- From the top left menu select "Site Actions" -> "Edit Page"
- This will put the page in edit mode where you can add aditional content
- From the Ribbon menu select "Insert" -> "More Web Parts"
- A dialog will appear listing all the avaiable web parts. Select the "Silverlight Web Part"
- Click the "Add" button located on the top right
- You should have an empty Silverlight Web Part located on a SharePoint page. Now you need to add a Silverlight application (XAP file) to surface on the Silverlight Web Part.
- With the web part click the "open the tool pane" link
- On right-hand side click the "Configure..." button
- Enter a URL location of the Silverlight XAP file (this can be a remote URL or URL of the XAP file within SharePoint Online Document library). Click OK after entering a valid URL
- I used a XAP file from my web site: http://www.silverlightbusinessintelligence.com/Content/SilverlightXAPs/SilverlightBusinessIntelligenceSite.xap
- Apply a specific height and width for the web part (otherwise the configuration pane will not let you proceed)
- Click Apply and then save the page (save diskette icon on the top left) and the Silverlight Web Part should render your Silverlight Application.
What is the big deal with Silverlight and SharePoint Online integration?
- Silverlight applications you do not have to write custom ASP.NET web parts (which gets complicated real quick mixing Ajax, state, communication, security and deployment). Silverlight applications are much easier to write since you do not have to learn the web part framework or use the SharePoint Online Sandbox Solutions.
- Existing Silverlight applications just work with minimal "SharePoint or Web Part" coding required.
In summary, SharePoint Online is one of the places that Silverlight integration really shines (even over the oncoming HTML5 wave). Existing Silverlight applications can be easily added to a SharePoint Online team site. Furthermore, Silverlight allows the easy creation of new web part components that can be hosted externally and connected to other web services (using SharePoint, OData or other).