Server-side object model Pro: - Server-side api is more comprehensive Con: - the server-side object model provides the most extensive set of options for developing customizations, but it can only be used on computers that are running a version of SharePoint 2010 Web services The Web services provide a fuller range of capabilities than the managed client object model, but they do not provide the same performance and design advantages, such as batching and exception handling. When you develop client-side applications, you should use the managed client object model whenever possible. Client object model This api combines most of all the features of the web services, so you will not have to make multiple soap requests to accomplish the same thing. The CSOM also batches up api calls into one request when you call ExecuteQuery. You will not be able to replicate this good performance with your own custom WCF service. There are few things that the CSOM does not do. One is cross site collection searching, term set management, and user profile management. Custom WCF service as wrapper for server-side object model my preference lies in building a custom WCF wrapper. Not only do I find the client object model sometimes somewhat odd to program against (but hey, that's personal), you regularly meet some limits where you don't expect them, not only in the areas mentioned by Steve (one example is web part interaction). For me, it can have several important advantages to create a custom WCF, mainly:
- The possibility to leverage AppFabric (features such as monitoring, instance management, and enterprise level cache).
- If you play your cards right, you can use .NET 4 and parallel programming techniques:http://sharepointdragons.com/2011/10/07/parallel-programming-in-sharepoint-2010-the-back-to-the-future-pattern/ If you talk about good performance for your custom WCF service, this def. won't be matched by the client object model.
This article is also available in the following languages
Please note: Also check out the SharePoint 2010 Best Practice Overview page at http://social.technet.microsoft.com/wiki/contents/articles/8666.sharepoint-2010-best-practices-en.aspx
Margriet Bruggeman edited Revision 8. Comment: add
Tord G.Nordahl edited Revision 7. Comment: added reference to Norwegain article
Margriet Bruggeman edited Revision 6. Comment: added
Margriet Bruggeman edited Revision 5. Comment: added
Margriet Bruggeman edited Revision 4. Comment: added
Margriet Bruggeman edited Revision 3. Comment: added
Margriet Bruggeman edited Revision 2. Comment: added
Margriet Bruggeman edited Revision 1. Comment: added
Margriet Bruggeman edited Original. Comment: added