SharePoint 2013 training

In addition to my previous blog post about the first available training material on SharePoint 2010, called SharePoint 2013 preview: first training material, Microsoft is releasing more training content.

From the Microsoft website, there is a Downloadable eBook: Explore SharePoint 2013 containing all the articles about the changes in SharePoint 2013.

In addition, there is the article SharePoint 2013 training for IT pros that contains training videos about SharePoint 2013.

Visual Studio: how to develop SharePoint apps without SharePoint installed

How to develop to SharePoint without having SharePoint installed: you need to place the dll both in the hive folder and in the GAC.

This can be useful when it is needed to develop for both SharePoint 2007 and 2010: of course it's not possible to have both of them installed in a developer machine.

This hint has been taken from the blog post How to Perform SharePoint Development On A Client Workstation.

SharePoint: CAML paginated queries

In SharePoint it is very important to query the system, using CAML, with paginated queries. This is to avoid retrieving from the database and from the application server huge quantities of data.

CAML queries can be implemented using the SPListItemCollectionPosition class.

Here a few articles:

How install WSS 3 and MOSS 2007 on Windows 7

To install WSS 3 and MOSS 2007 on Windows 7, there is this wonderful tool: Installing WSS 3.0 SP2 / MOSS SP2 on Windows 7 RC, that will redicrect to another page: How to Install Windows SharePoint Services 3.0 SP1 on Vista x64/x86.

A few notes:

  • install wss 3,
  • clear the xtracted folder
  • extract the MOSS iso file to a temporary folder
  • install moss 2007.

 

The required file is Wss on Vista, that can be also found in the local copy WssVista.Install.zip.

SharePoint: preventing duplicate web parts

During deployment of web parts with features, there is an annoying problem if the solution is redeployed: the web parts inside the pages are duplicated.

Here is a link that can help in solving this problem during the activation of the feature: Preventing provisioning duplicate Web Parts instances on Feature reactivation. This article is referenced by many websites, because it offers a rather simple solution, even if it is not the perfect one (it removes duplicates only, but not web parts from previous feature not present in the last one anymore).

Another similar article is the following one: Removing duplicate web parts when changing page layout via the ribbon.

SPWebApplicatin url and port number

One question I'm asked rather often is how to get the url or port number of a SharePoint application.

It's not readly available as a property of the SPWebApplication class, because there can be multiple address associated with a single web application, through the access mappings.

But it's still possible to get it, via the the SPWebApplication.IisSettings property, as described in the blog posting To get port number of a SPWebApplication through server object model.

SharePoint: custom lookup field with EntityPicker

If you need to implement a SharePoint custom lookup field with a EntityPicker control, here are some useful links:

In addition, you can find open source and already complete examples on codeplex:

Finally, in the blog post Suggestions and Picker: Lookup vs. Managed Metadata there is the suggestion to use Managed Metadata fields instead of lookup columns, to use the native ajax drop down. Sincerly from the theoretical point of view I don't like this approach, because it's not correct to compromise the data architecture for the UI, but it's true that in some situations this can at least be taken in consideration.

SharePoint 2010: feature upgrading

SharePoint 2010 introduces the concept of Feature Upgrading.

This allows, for example, to write code in the FeatureUpgrade method of our features.

The process to use this method is not automatic, as there are some steps to follow to make it work:

  • in the feature properties, it is needed to give values to the properties "Upgrade Actions Receiver Assembly", "Upgrade Actions Receiver Class" and Version (that, if null, equals to 0.0.0.0);
    it's possible to copy the first two properties from the "Receiver Assembly" and "Receiver Class" respectively;
  • in the feature designer, in the manifest, add the xml fragment for the upgrade actions;
    this allows to define multiple actions, based on the source and target feature versions;
  • finally, in the FeatureUpgrade method of your feature class, take your actions based on the current upgrade action.

The complete process is described very carefully in the blog post Using the FeatureUpgrading event to upgrade features.