views:

386

answers:

5

I would like to create a custom document library where I use the standard UI but implement a different persistence layer. Basically fetch and display documents from a different source system. This way I can use my existing object model but leverage the great office integration within SharePoint.

I found a decent article here but they are cheating, they have coded a completely new UI for the external persistence.

I have looked at the SPList and SPDocumentLibrary objects but I can't override the necessary methods.

I have looked at the event framework and it is closer but it lacks important events such as 'GetFile' or 'PopulateList'.

Any thoughts?

+4  A: 

This isn't a perfect (or probably even a "good") fit for what you're trying to do, but I mention it primarily for awareness and to possibly give you some additional ideas (and warnings).

SharePoint's storage architecture leverages two different back-end stores: one for metadata (always SharePoint's SQL databases), and another for BLOB storage (also SQL by default). In its current form, though, SharePoint allows you to "wire-in" your own BLOB storage provider via a type that implements the ISPExternalBinaryProvider interface. Wiring in a type that implements this interface allows you to continue storing metadata in SQL while storing documents and other BLOB item types in a different store of your choice.

This probably sounds somewhat promising, but there are a couple of serious considerations:

  1. Wiring-in your own ISPExternalBinaryProvider has a farm-wide impact. It's all or nothing, so once the provider is wired in, all sites and libaries will use the new provider.

  2. You'll need to dive into unmanaged code, as the ISPExternalBinaryProvider is doing to require you to work with some IDL.

You can read more here: http://msdn.microsoft.com/en-us/library/bb802976.aspx

My take is that the external BLOB storage (EBS) system is something of a "prototype" at this point -- not ready for prime-time. If nothing else, though, it gives you something to think about. SharePoint Server 2010 will hopefully do more with it and make it more attractive and easy to implement.

For what it's worth!

Sean McDonough
Great thought! Unfortunately I can't implement this on the whole farm, I have to be able to optionally turn it on per Document Library.
Cube Pirate
How does AvePoint (for example) do this with their archiver product? They advertise that they can selectively (apparently on a per-list basis) off-load document storage to another device. Am I misunderstanding their product?
Chris Farmer
Excellent question, Chris. I'm not overly familiar with the product, but the limited research I did led me to believe that once content is archived, it's wholly outside of SharePoint (i.e., in a custom store). The product includes Web Parts and indexing support so that data is "visible" to SharePoint, but the actual act of getting the data back (from archive) requires a restore operation. It gave me the impression that the product operates like a more flexible (and exposed) backup system. Just my take, though, and not confirmed with AvePoint.
Sean McDonough
Cube Pirate: I don't think you're going to be able to coerce SharePoint into working the way you've indicated without heavy customization. A "lighter-weight" approach might be to leverage the BDC (for read functionality) and then write custom code to persist back to whatever back-end store you're using. Again -- not a perfect match, but I think you're going to be doing some real pro-con tradeoff analysis with whatever solution you elect to implement or build.
Sean McDonough
A: 

Sorry to say, but ISPExternalBinaryProvider is the only way to do this i'm afraid if you want to use standard UI.

P.S. Another major setback is that is a backup / versioning nightmare. Not even sure if versioning is supported.

Perhaps SharePoint 2010 will have a better way to do this...

Colin
+1  A: 

I have implemented SQL persistence in a Form Library by using a persistence Workflow that runs on creation and update of the library's documents.

I created an Office SharePoint 2007 Workflow project in Visual Studio 2008, retrieved my SPItem document content and extracted the relevant data from the XML generated by the InfoPath WebForm and persisted it to a database.

mgcm
+1  A: 

If you really wanna roll your own external persistance, try taking a look at this brand new, extensive article from june on TechNet:

http://technet.microsoft.com/en-us/magazine/2009.06.insidesharepoint.aspx

Now, hand me the bounty. ;)

anchorpoint
ISPExternalBinaryProvider has already been thrown into the mix, but excellent cut and paste skills!!!
Cube Pirate
A: 

The most vendors create a new feature, which will add a menu entry where you can click on an archive button. This can easily be done. (search for it in MSDN) After registration the button will appear in the Menus in the document library. After clicking on that button the integration will archive the document and will create a stub. The stub is often a HTML-file which contains a Link where you can retrieve the original document. (so it's more a redirect and will be done by the browser)

So it's just on your side to create the logic, what happens when the button will be clicked.

Daniel Manzke