16.01.2013 Views

Microsoft Sharepoint Products and Technologies Resource Kit eBook

Microsoft Sharepoint Products and Technologies Resource Kit eBook

Microsoft Sharepoint Products and Technologies Resource Kit eBook

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 42: Upgrading <strong>and</strong> Migrating to SharePoint <strong>Products</strong> <strong>and</strong> <strong>Technologies</strong> 1123<br />

Developing Dashboard Web Parts That Are Easy to Convert<br />

As you continue to develop dashboard Web Parts for SharePoint Portal Server 2001,<br />

use the following recommendations to facilitate moving to the Web Part infrastructure.<br />

■ Keep the following general recommendations in mind:<br />

■ Use Extensible Stylesheet Language Transformations (XSLT) instead of<br />

Extensible Stylesheet Language (XSL). 2<br />

■ Do not use deprecated DDSC objects, properties, or methods, for example<br />

the Item object <strong>and</strong> the LoadItem method.<br />

■ Do not use deprecated base class properties, for example, ContentType<br />

<strong>and</strong> Content.<br />

■ Do not use deprecated tokens, for example, _WPC_ <strong>and</strong> _LogonUserJS.<br />

■ Be aware of the caching behavior changes in the Web Parts architecture.<br />

■ Use .NET code as much as possible to reduce or eliminate server-side script<br />

code in your Web Parts. To do this, use one of the following methods.<br />

Using a Web Service for Data Manipulation<br />

To use a Web Service for data manipulation, design your dashboard Web Parts to<br />

separate the presentation code from the nonpresentation code. When you move to<br />

the Web Part infrastructure in Windows SharePoint Services <strong>and</strong> SharePoint Portal<br />

Server 2003, you can retain the Web Service <strong>and</strong> the custom XSLT data manipulation.<br />

However, you must use the Web Part base class or one of the built-in Web Parts in<br />

the Web Part infrastructure to rewrite the client-side script <strong>and</strong> the user interface.<br />

Using an ASP.NET Page for Data Manipulation<br />

This method represents a larger departure from the dashboard Web Parts programming<br />

model, but it presents far fewer migration challenges. To use an ASP.NET page<br />

for data manipulation, follow these steps:<br />

1. Create an ASP.NET server control that contains as much nonpresentation code<br />

<strong>and</strong> as much presentation code as you want.<br />

2. Embed this server control in an otherwise empty ASP.NET page, <strong>and</strong> set the<br />

margins for the page to zero.<br />

3. Specify the ASP.NET page as the content link in your dashboard Web Part.<br />

4. Configure the dashboard Web Part as “isolated.” When you do this, the Web<br />

Part is rendered in an IFrame.<br />

2. When <strong>Microsoft</strong> Internet Explorer 5.0 was released in 1998, the <strong>Microsoft</strong> XML Parser (MSXML) included an<br />

implementation of Extensible Stylesheet Language (XSL) that was based on a working draft. If you have any<br />

legacy XSL, you must convert this to XSLT compatible with the XSL transform engine in the .NET Framework.<br />

An xsl-xslt-converter is available from <strong>Microsoft</strong>’s XML download page at http://msdn.microsoft.com<br />

/downloads/list/xmlgeneral.asp.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!