Question

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?

Was it helpful?

Solution

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!

OTHER TIPS

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.

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. ;)

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...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top