Monday, May 14, 2012

SharePoint: Lists Based on Domino Views With CRUD | Blog

SharePoint: Lists Based on Domino Views With CRUD | Blog:
Here's an example of a typical SharePoint List:
image

What's different about this List is that it's displaying data from this Lotus Notes View:
image
Not only does the List display this data but it also offers full CRUD-like capabilities - you can also create, change and remove the documents from the Notes database using the SharePoint List frontend.
Here it is creating a new document from within the SharePoint site that will update in to the Notes database.
image
All this with very little (as in no) evidence that what the user is looking at is anything other than a simple SharePoint Site.

How?

It uses "Business Data Connectivity" to create an External Content Type. This Content Type can then be mapped to a List.
Remember recently I've been talking about using Domino-based Web Service Providers to show Notes data in ASP.NET. Well this is an extension of that.
First thing I did was extend the Web Service by adding the methods required to make it CRUD-like. The skeleton code for it looks like this:
public class DesignerService {
    public FashionDesigner[] getAllDesigners(){
        //return an array of Fashion Designers
    }

    public FashionDesigner getDesignerByName(String name){
        //Lookup and return a Fashion Designer object
    }

    public void updateDesigner(FashionDesigner designer){
        //Makes changes to and save the Notes documents
    }

    public void createDesigner(FashionDesigner designer){
        //Add a new Fashion Designer
    }

    public void deleteDesigner(FashionDesigner designer){
        //Delete a document
    }
}
You can now setup an External Content Type. To do this, open up Microsoft SharePoint Designer 2010, connect to your site and browse to the External Content Types section on the left hand pane.
The step-by-step process for doing this is too long-winded and I can't be bothered to write it all up. Basically you create a new External Content Type, add a data connection to it (point to your Domino Web Service's URL) and then map each method of the Web Service to the CRUD operation it corresponds to. Doing this is semi-intuitive from within SharePoint Designer.
In the shot below on the lower right you should be able to see that I've mapped each method to a particular type of operation.
image
With the External Content Type configured and saved we can now create a List based on it.
Still in SharePoint Designer navigate to the Lists and Libraries section, as below, and click on the (new) External List button:
image
In the dialog that appears you should see the External Content Type you already created. Select it and continue on to give your list a name. Once done the List will appear on the left have side of the site itself, as in the first screenshot above.

Why?

Why might you want to do this? Good question. It seems to me that lots of businesses are migrating from Domino to SharePoint. There's no denying that. It seems unlikely that that migration will happen overnight and that Domino will be switched off the day SharePoint goes live - there's bound to be a period of co-existence. No? If so, then it seems obvious that the two will need to talk to each other in such a way.
There are of course huge holes in the above solution. It doesn't take any kind of security or permissions in to account. It was merely as a proof of concept that I did it. Don't pull it apart too much.
Click here to post a response

ICT4PE&D

No comments:

Post a Comment

Thank's!