Chapter 6. Building a Quote of the Day Web Part in SharePoint 2010

Waldek Mastykarz

Back in 2009, I wrote an article about how to create a simple Quote of the Day web part by leveraging SharePoint’s 2007 customization capabilities (see Figure 6-1).

Quote of the Day web part in SharePoint 2007
Figure 6-1. Quote of the Day web part in SharePoint 2007

Although the code behind the web part was very simple, the web part itself had a few limitations such as dependency on the jQuery library or use only in the same site as the location of the Quotes list.

One of the new pillars of SharePoint 2010 is the JavaScript Object Model (JSOM), which allows you to build dynamic web applications (http://msdn.microsoft.com/en-us/library/ee538253.aspx). In the first part of this chapter, you will learn how to build your own Quote of the Day web part using the new SharePoint 2010 JSOM.

Whenever you want to redistribute your SharePoint solution, you should create a SharePoint Solution Package (WSP). Unfortunately, in many environments, deploying WSPs is restricted and allowed only after passing reviews. This process might be very expensive for a simple solution such as the Quote of the Day web part. The concept of the Sandbox has been introduced in SharePoint 2010 specifically for such scenarios. Sandbox allows you to deploy SharePoint Packages in an isolated process without the involvement of IT and can be done by the site collection administrator.

In ...

Get SharePoint 2010 at Work now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.