I need to upload, download and manage files in SharePoint and there are many ways to talk 开发者_开发技巧to a SharePoint server, but what is the best one to choose to support different versions of SharePoint (2003, 2007, 2010...)?
"Safe" is good, especially when you are talking about 2007, 2010 and 2003. The Sharepoint Architecture was fundamentally changed throughout the years and I don't know of anything which didn't changed with the different versions.
WebDAV: Impossible to work with - Sharepoint actually implements its own WebDAV Protocol and not the standardized one. I'm not sure whether it changed throughout the years. But: All Sharepoint Versions included some kind of WebDAV, so it might be possible to leverage that.
WebService: They're all different between the versions
FrontPage RPC: UGH... No.
Client OM: Is new in 2010.
Custom WCF Service: Yes. Same goes for third party ADO.NET Connectors - leveraging the same functionality - Custom development.
The "safest" way as in standardized I would say are the webservices. You will still need to account for the different Sharepoint versions, but all of them had webservices. My second approach would be to code a custom WCF service, querying the object model - or use ADO.NET Connectors from third parties.
精彩评论