Thursday, March 01, 2012

Arctic SharePoint Challenge 2012

I’m very happy to announce that I will be a jury member on the Arctic SharePoint Challenge this year. (Spinning of the March 22-24th) I think its going to be a blast and a lot of fun Smiley med åben mund

What is the ASPC2012? …

#ASPC​ aims to stimulate collaborative learning, networking and idea generation for participants through hands-on time-limited challenges. We are fiercely competitive, but vastly helpful and extremely sharing (also across teams) realizing that the collective learning is more important than personal gain!

We are working on the optimal formula for 2012, so the rules are still not forged in stone, but expect something similar to last year, only better/more fun/more awesome.

I’ll also be doing some sessions on Advanced SharePoint Caching for developers, SharePoint Patterns and Practices Guidance and MVP pattern for SharePoint Web-parts.

Wednesday, January 25, 2012

Using the MVP pattern for SharePoint Web Parts Presentation

I did a webcast presentation for Adelaide SharePoint User Group this Tuesday. However no recording was made, therefore only the PowerPoint and Demo code is available here: MVPPresentation.zip

MVPDiagram

MVP Pattern rocks for SharePoint!

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!

Monday, April 19, 2010

WSPBuilder systems compatibility

The following table show the compatibility with different systems. The WSPBuilder is a normal console application build in c# .NET. The WSPBuilder Extensions is addon made for Visual Studio, but its still the same console application running in the background when building from Visual Studio.

System WSPBuilder 0.9.9.0728 WSPBuilder 2010*
.NET 2.0 Yes Yes
x32 bit Yes Yes
x64 bit Yes Yes
All versions of Windows with .NET installed Yes Yes
Visual Studio 2005 Yes Yes
Visual Studio 2008 Yes Yes
Visual Studio 2010 No Yes
SharePoint 2007 Yes Yes
SharePoint 2010 No Yes

* Note: WSPBuilder 2010 may still be in beta.

WSPBuilder 2010 supports all the same systems as the previous WSPBuilder versions, so you can use it for building SharePoint 2007 (Wss 3.0) solutions without any problems.

Extract WSP packages with WSPBuilder

It is possible to extract (unpack) the contents of a WSP package into the file system with use of WSPBuilder. This function currently only supports a full extract of everything, so you have to pick what you need afterwards. The command syntax is:

WSPBuilder.exe -o extractwsp
-Filename : (Optional) Define the WSP file to extract. Default is the last created WSP file from the current directory.
-TargetPath : (Optional) Defines the target path to extract the wsp file in. Default is the current directory.
-Overwrite : (Optional) Overwrite existing files.

Example:

WSPBuilder.exe –o extractwsp –filename mypackage.wsp –overwrite true

Warning! I have not fully tested the ExtractWSP functionality in every possible scenario, so please understand.

The function is supported from WSPBuilder version 0.9.9.0728 and forward, including the WSPBuilder 2010 versions.

Sunday, April 18, 2010

Project structure for SharePoint

I made a suggestion on how to create a SharePoint project structure in my "SharePoint Development" presentation at Microsoft Copenhagen back in January, but there is no documentation on it in the PowerPoint presentation.

http://www.keutmann.dk/sharepointblog/SharepointDevelopment.zip

In my experience, I find that keeping the number of WSP packages down to a minimum is the easiest thing to managed. Therefore I put all my SharePoint artifacts in one project. Some large SharePoint solutions may require more than one WSP package, but generally not many. I also separate the business logic from the SharePoint project, so it will not be GUI dependent. I use this structure as a general template whenever I create a new Visual Studio solution.

MyCompany.Framework
This project is not specific per solution, but can be used as a library across multiple solutions. This project do not contain any business or SharePoint logic, only clean .NET code. I usually create a lot of.NET Extensions in this project.

MyCompany.SharePoint.Framework
This project is for generally SharePoint related extensions and is still generic across multiple solutions. A lot of .NET SharePoint Extensions is added to this project.

MyCompany.BusinessModel (or ObjectModel)
This project will contain all my business logic and data objects. The project will not contain any UI logic.

MyCompany.MyProjectName (SharePoint Project)
This is the SharePoint artifact project from where I will build my WSP package by use of WSPBuilder. All the SharePoint webparts, features and so on will be created here. It is usually set to deploy to Global Assembly Cache. However if company policy requires the code to be deploy with Code Access Security (CAS), I will create an additional SharePoint project, so I have one project for the GAC and one for the WebApplications bin folder.

MyCompany.Test
The project for Units tests.

I do not say that this is the best structure, but I find it as a good template to start from, specially that I can reuse the Framework projects from solution to solution.