views:

88

answers:

4

Hi All,

I am working on small application of sharepoint.

There two ways in which WE can access Sharepoint data:

1.By Using Microsoft.Sharepoint.dll In this case you need to do coding on same machine (windows server).

2.Second way is to use Sharepoint Web Services. This will allow developer to do developement work on different machine.

But which way i should prefer?

Regards, Jene

+6  A: 

That all depends on what you want to do and where you want to run it. The SharePoint object model (Microsoft.SharePoint.dll) is substantially faster than the web services, but like you said, it only runs on the SharePoint machine. So, if you are on the SharePoint machine, definitely use the object model, otherwise, use the web services.

Steve Danner
+1  A: 

You don't have to develop on the same machine, but you do need to develop on server with SharePoint installed. I can tell you from experience that the web services are not the nicest to work with...I would use the SharePoint object model.

Just saying "development on my production server" makes me cringe. To that end, you may want to look into using some kind of VMWare to do your development on. You can install Sharepoint and Visual studio on the virtual machine to do your development. The only issues with you doing it this way is that you are not going to have the same content (the lists and other user created libraries/sites), but you can easily make your own to resemble your production environment (as is usually the case with most dev environments).

AGoodDisplayName
+1  A: 

One thing to consider is database connections. If you create a seperate application using the SharePoint DLL then your DB connections will be managed through your application. So your application will have to run using an account that has read/write privs to the SharePoint database.

If you use the web services then this is not the case since the database connections will be handled inside the IIS Application Pool (like a normal SharePoint web site).

JD
A: 

Unless you are unable to deploy solutions to the SharePoint server due to corporate security policies, shared hosting or similar, you will want to use the object model. Get a SharePoint VM (one of the evaluation virtual pc downloads from Microsoft is a good starting point if you haven't set one up before) and WSPBuilder, and it's easy enough to make packages to be deployed to the server.

Tom Clarkson