O'Reilly logo

SharePoint 2010 at Work by Mark Miller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Part II: Preparing Quote of the Day Web Part for Redistribution

During the creation of the Quote of the Day web part, we leveraged the SharePoint 2010 JSOM to retrieve and display a random quote from a list of quotes, all without using a single line of custom code.

Although the Quote of the Day web part is working, it has a few disadvantages in its current configuration. First, managing JavaScript through the CEWP is fragile and error-prone. Yes, the CEWP allows Power Users to enrich pages with dynamic functionality. However, all it takes is one wrong character to break the whole page! Additionally, all of that JavaScript is included as-is on the page. While adding one Quote of the Day Web Part to a page would probably not make much difference, adding a few of them, especially combined with other similar web parts, will have a significant impact on the size and performance of the page.

Another thing worth considering is the fact that redistribution of the Quote of the Day web part at this moment is rather inconvenient. To get it right, you have to provide some kind of instructions to whoever would want to use the web part as well. The whole process consists of multiple steps, and getting even one of them wrong might break the web part.

Whenever you want to make your SharePoint customizations redistributable, you should provide them as SharePoint Packages. The challenge with SharePoint Packages, in SharePoint 2007, is that the deployment process requires IT involvement and introduces ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required