Search code examples
c#javascriptweb-servicessharepointwindows-desktop-gadgets

Windows Gadget for Sharepoint 2007 List using SOAP, Javascript, C#, Webservices, jQuery


I am trying to develop a Gadget for Sharepoint 2007, which will authenticate a user and then fetch him a sharepoint list from a specific URL,

For the last 4 days I have been working on it and came across different ways of making it, but because solutions are either half done, dont work or too confusing to get help from or convert into what I want.

Because Windows Gadget uses Scripting + HTML so I have following options to carry on work with to make this gadget,

  • Create a Visual studio project (dll) which will fetch the list for me using SPLIST/SPWeb of Sharepoint and then I can use JavaScript & Visual Studio "COM" to read that dll ("Classes") and get data in JavaScript + displaying it on HTML. Problem with this approach is, I am not sure, If I create a "dll" with Sharepoint SPLIST and put it into the gadget folder, will it work on Clients (that dont have sharepoint installed on there PCs). While trying to find help regarding this approach to problem I find this project that is doing kinda same thing, but not really sure if i make changes to it and it will gonna work with "dll" I was talking about earlier, here's the Link to Gadget,

Gmail Gadget Using JavaScript to Read Visual studio Dll

  • Second Approach to solve the problem can be, If I use Sharepoint webservices, that will get me all the List Items, but then using Webservices in JavaScript isn't that easy, so if i create a Visual Studio Project, get a web reference to sharepoint webservices, and return a list, which I again use JavaScript to read the results out of DLL, and display them on HTML.

This Link is Using Webservices in a Dot Net Project to Update a List Item, but In comments it also tells how to get List data, but then how I gonna authenticate my users

  • Another solution is to use Jquery to get sharepoint List data, like in link before, but again, how can i authenticate my users @ gadget ?

Using jQuery to fetch List Data

A gadget that is getting News Feed from a website, its sending an HTTPxml request but then asking for a RSS feed, whereas i dont have Rss feedback in sharepoint site I am working on

Cheers for reading this I hope you either gonna increase your knowledge or gonna share it :)

EDIT *I meant using Sharepoint MOSS "SPLIST" or "SPWEB" as Client Object Model, AS I am using Moss I can't use Client Object Model Authentication :(. really sorry for wrong Information*


Solution

  • You're installing this on a users PC so you can't use the standard SharePoint API (Microsoft.SharePoint.dll)

    You're using 2007 so you can't use the "Client Object Model" (managed/silverlight or EMCA Script)

    That leaves

    a) The SharePoint Web Services (either JavaScript or JQuery which IS still JavaScript).

    This means that your gadget will be authenticating to SharePoint via the same mechanism that someone browsing to your site would - normally Integrated Windows auth.

    The first place to start this is the excellent http://spservices.codeplex.com/ library which allows you to easily call the web services from JQuery). See the documentation for tips on how to use it.

    For a half done project how about http://sharepointsidebar.codeplex.com/

    b) Create your own custom web services by deploying a dll on the SharePoint server then call those via JavaScript (perhaps usign JSON or similar rather