O'Reilly logo

Professional SharePoint® 2007 Development by Tom Rizzo, Adam Buenz, J. Dan Attis, Matt Ranlett, Brendon Schwartz, Eli Robillard, Jeff Julian, John Alexander, John Holliday

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

5.3. Web Services

This chapter provides a tiny glimpse of the power in the SharePoint object model that you as a developer can take advantage of. Augmenting the powerful object model is a services layer that allows developers to call into the SharePoint object model from anywhere.

Best Practices Coding Techniques

As you've seen so far in this chapter, writing code for the SharePoint object model requires the instantiation of lots of objects such as SPWeb, SPSite, and more. Many of these objects implement the IDisposable interface and should be disposed of after they've been used to prevent these objects from remaining in memory.

Scott Harris and Mike Ammerlaan from Microsoft have written an excellent article outlining these best practices recommendations titled "Best Practices: Using Disposable Windows SharePoint Services Objects" (http://msdn2.microsoft.com/en-us/library/aa973248.aspx#sharepointobjmodel__otherobjectsthatrequiredisposal). Any developer interested in writing code targeting the SharePoint platform should read this article. Scott and Mike illustrate many great practices, and they warn you about the times that you shouldn't automatically dispose of every disposable object.

Whereas the object model is organized into namespaces, the web services are grouped logically into 20 different web services. The following table identifies the web services and the methods they expose:

Web ServiceDescription and LocationMethods
Admin Web ServiceProvides methods to manage site ...

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