Jaap Vossers' SharePoint Blog

Just another WordPress.com site

Archive for the ‘Web Services’ Category

jQuery Developer Frameworks for SharePoint

with 2 comments

If you are into developing SharePoint solutions using jQuery, you should really have a look at the following GREAT CodePlex projects. Both projects have been developed by real experts in the SharePoint & jQuery field 🙂

jPoint – Developed by a team lead by Will Lawrence (@willhlaw)

jPoint is an open source javascript API and script deployment framework for Sharepoint. It leverages the speed and agility of jQuery to manipulate Sharepoint forms and pages, communicate to Sharepoint webservices, and to build jPart plugins.

jQuery Library for SharePoint Web Services – Developed by Marc D Anderson (@sympmarc)

This is a jQuery library which abstracts SharePoint’s Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.

Written by jvossers

December 16, 2009 at 12:06 pm

Released: SharePoint LiveListData

with 20 comments

Last week I published my fourth CodePlex project, called SharePoint LiveListData. It is an “assembly-free”  solution which means that it contains no server side code. It is implemented as a jQuery plugin.

So what does it do? It uses AJAX to automatically reload any list-based Web Parts as soon as a change in the underlying list data is detected. You can also have your custom web parts refreshed, as long as they have a web part property that contains the ID of the list they depend on!

I have put online a screencast that demonstrates the the user experience.

Want to know how it works? Allow me to describe using some pseudo code..

  • OnDocumentLoaded
    • Make a single call to WebParts.asmx web service using AJAX to return an xml document with all web parts on the current page
    • Parse returned xml and find all web part nodes that contain a ListID element (which holds the value for the ListID web part property)
    • Create and populate a javascript object that contains a list of all ListIDs that we found in the returned xml, plus a list of all WebPartIDs per ListID, also retrieved from the xml (more or less creating a hashtable with the key being the ListID and the value being an array or WebPartIDs).
    • LOOP with interval = $configured_interval
      • Make a single call to Lists.asmx web service using AJAX to retrieve “LastDeleted” and “Modified” properties for each ListID in the hashtable that was created earlier.
      • For each ListID in hashtable
        • compare values for LastDeleted and Modified with those values retrieved as part of the previous loop iteration for this ListID (unless it’s the first iteration).
        • If a change in one of the two property values has been detected (indicating that someone inserted, updated or deleted an item) mark this ListID as “UpdatePending”, storing it on our javascript object that holds our ListIDs and WebPartIDs.
      • If any of the ListIDs are marked as UpdatePending
        • Make an AJAX request to page that is currently loaded in the browser (allowing us to get a fresh copy of the current page containing the new list data)
        • For each ListID marked as UpdatePending
          • For each WebPartID associated with ListID in our javascript hashtable object thingy
            • Replace div with matching WebPartID attribute in current document with “same” div in AJAX response (which contains the new list data).

This is basically how it works in a nutshell.

For examples on usage, check out the downloads tab on the SharePoint LiveListData CodePlex site, where you can also download the script!

Written by jvossers

November 3, 2009 at 11:40 pm

TunnelPoint review

with 4 comments

Last Wednesday during the UK SharePint event in London, Daniel McPherson from Zevenseas mentioned their new TunnelPoint service (Beta). I was kind of curious what the fuss was all about so I decided to spend a little time playing with it. I am quite excited and I must say that I love the concept. Let me try and explain how it works.

TunnelPoint is a hosted service provided by Zevenseas. It connects external services (for example SOAP web services) to SharePoint List data in your SharePoint Site. TunnelPoint uses the built-in SharePoint SOAP web services exposed by your SharePoint environment to read and write list data. Really, all you need to do is log in to TunnelPoint using your TunnelPoint account and use the web interface provided to configure which external services should map to which lists in your SharePoint site. Once you have completed your configuration, TunnelPoint will periodically consume the service and update field values in your list. The whole idea being that you do not touch your server and you do not write a single line of code.

tunnelpoint_overview

Currently, TunnelPoint offers several services to connect with, one of which is a Currency Conversion service. I decided I would try that one out. My goal was to have a list of currency conversions in my hosted WSS site, and have TunnelPoint periodically perform the conversion for me based on the latest exchange rates.

I performed the following steps to achieve my goal:

  1. Registered with TunnelPoint.com to get a Beta user account
  2. Setup a SharePoint site within my hosted WSS environment.
  3. Created a user and added it to the owners group of my newly created site
  4. Logged in TunnelPoint.com and registered my SharePoint site by supplying its url and account credentials to be used by TunnelPoint to access the web services of my SharePoint site.
  5. Using the TunnelPoint web interface, I added the Currency Conversion service and configured it to point to the site I registered earlier and configured it to create the list for me.
  6. Manually added list items to the newly created list in my SharePoint site. These list items can be seen as tasks to be processed by TunnelPoint.
  7. Wait for TunnelPoint to operate on my list

This is what my list looked like before TunnelPoint started doing its work:

tunnelpoint_list_before

Now, after a few minutes, TunnelPoint started to wake up and decide it should update my To Amount fields by applying the currency conversion (using the external service) for each list item.

After TunnelPoint did its job, my list looked like this:

tunnelpoint_list_after

It all works like a charm and the fact that I got this to work on my hosted WSS environment where I have limited access to (I can’t even deploy a Feature to it) opens so many doors for so many people.

In my example I only connect to the Currency Conversion service, but Zevenseas offers several other services like, SMS, stock quote, short url and web site preview + more services to be added later.

On a final note, to make TunnelPoint even more powerful I would like to suggest to Zevenseas to provide a generic service, where you can configure a SOAP web service url and define mappings between list fields and web service parameters. That way the pool of services to connect to instantly grows from several, to… a lot more!

Thumbs up Zevenseas!

Written by jvossers

April 10, 2009 at 7:51 pm