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 ...

Get Professional SharePoint® 2007 Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.