Thursday, July 14, 2011

Push changes from the SharePoint Content hub to a SiteCollection

When working with the Content hub, you may need the content type you just added to the hub, to be pushed out to a specific site collection immediately. This can be done by activating the timer jobs specified here, or you can just force an activation of the Feature “TaxonomyFieldAdded” on the target SiteCollection.

The TaxonomyFieldAdded feature is a site scoped and hidden feature, its job is to enable the site as Content hub receiver and sync up with the hub immediately. Therefore a reactivation of the feature will get the latest changes from the Content hub, and do not take a lot of time waiting for the timer jobs to finish.

PowerShell:

Enable-SPFeature "TaxonomyFieldAdded" -url "http://mydomain/mySiteCollection/" –force

Code: C#

//The FeatureDefinition id of “TaxonomyFieldAdded” is "73ef14b1-13a9-416b-a9b5-ececa2b0604c". The last “true” is for “Force” feature activation.

site.Features.Add(
new Guid("73ef14b1-13a9-416b-a9b5-ececa2b0604c"), true);

 

So this enables the scenario where you can create a Site Feature Receiver that will publish a content type on the content hub, then force the sync to the local site collection and create a list that uses the content type. All within the same receiver and only takes a couple of seconds to execute.

Monday, May 02, 2011

My Presentation at SharePoint Saturday in Copenhagen (April 30 / 2011)

I did a presentation on SharePoint Enterprise Development with lots of code in it.

For anyone that wants the presentation, you can download it from here code.zip

The zip file contains the PowerPoint presentation and demo code.

Thank you all for a fantastic SharePoint Saturday in Copenhagen.

Saturday, January 22, 2011

SharePoint Manager 2010 v2 in development

I’m currently working on a new version (Alpha) of the SharePoint Manager 2010 application. This new version will be a much more complete view of the SharePoint object model with data. It is based the look and feel of the “old” version, but done with WPF instead of the GDI+ windows form of the old version.

image

Because the old version of SPM was done in a rater unplanned manner, the code ended up being a mess and making it harder to update and create new functionality. Therefore I decided to create a new version from the bottom up and do things right from the beginning. This means that the new version supports the MEF (Managed Extensibility Framework 3.5)  technology from Microsoft. Other applications that supports MEF is Visual Studio 2010 and MEF was included into .NET 4.0, so that shows that the technology is here to stay. MEF is implemented into the core of SPM2010 v2 and therefore enables anyone replace or hook into anything in the application, by just providing there own DLL.  The idea is that this application should be the base for a hole range of tools and functions, that seems as natural part of the application, but is actually just “Add-ins” DLL’s located i the application folder.

Some of the new features of the v2 will be.

  • MEF support for extensibility.
  • Hugh increase of SharePoint objects displayed.
  • WPF
  • Splash screen.
  • Check for SharePoint and user rights on start up.
  • Improved Xml text editor with color coding.
  • A dynamic Settings system.

Things that should have been so good, turns out to the worse.

WPF is the new presentation framework from Microsoft that will replace the old GDI+ forms technology. This also seems very promising when working directly on the machine, everything still feels quick and snappy. But when using the WPF over a Remote Desktop (RD) the app can slow down because of RD’s lack of support for WPF. Basically RD just transfers the raw bit map when working with WPF where GDI+ is lot faster. Also a major component of SPM2 is the PropertyGrid control that is missing from WPF library and forcing me to include the “old” GDI+ PropertyGrid component into the WPF application, this also slows things down, but on the plus side, at least I known that the PropertyGrid works properly.

Join the project team?

The idea of the application is just to provide the basic framework and extend it from there on. Therefore the core team will be kept small, however because of the MEF system, it will be possible to include team members that will provide there own contribution in form of their own DLLs thereby not conflicting with anyone else in the development process.

So if you like to help out please notify me carsten@keutmann.dk

Documentation for extending the application
This is always the most funny part of a project so I love to save it for the last thing I do. Smiley, der blinker
Really… there will be some documentation on how to extend the application and some Visual Studio demo projects and so on, more to come.

Download

You can find the new version here!