SharePoint Connections Amsterdam 2013 slide deck and Silly Facts demo source code

Last Tuesday and Wednesday the SharePoint Connections Amsterdam 2013 were held in Amsterdam, Netherlands. I did a session on Developing SharePoint 2013 Apps with Visual Studio 2012 and enjoyed it very much.

Besides my session I was on the Ask The Experts team for the DIWUG. Handed out the new edition of the DIWUG SharePoint eMagazine (download for free) and helped people with their questions. At the start of the conference is was quite, but along the way more and more people came up the Ask The Experts panel. Some interesting question, a big thanks for that!

In this article:

Demo 1: Silly Facts SharePoint-hosted App

The Silly Facts demo is about creating a list with silly facts, like the ones below. The list is provisioned in the App web using a Content Type and List Instance artifact.

Site Contents showing the Silly Facts app Default page as part of the app displaying the Facts list instance with generated silly facts 

Once the list is in place I added a App Part (Client Web Part) to the Host web which shows a random fact every time the page gets loaded.

Adding the App Part onto the page (simular like a web part) App Part showing random silly fact on page load

Next to generating silly facts via the JavaScript CSOM a Custom Action is hooked to an Announcement list in the Host web allowing users to easily add new facts to the Facts list.

Extending the context menu via the Custom Action 

Demo 2: Provider-hosted App retrieving data via CSOM and REST

The next demo is extending demo 1 and changing it to a Provider-Hosted app and adding logic for retrieving data with SharePoint via CSOM (Taxonomy) and REST (Search). Changing the SharePoint-Hosted app to a Provider-Hosted app is done in the AppManifest.xml. Here you can change the type and instantly it will ask to generate a Web Project for you.

Next step is adding the chrome which allows you to add a custom menu shown in the top right corner. You can add you own options which integrate with the chrome.

Changing the app type in the AppManifest.xml (in Visual Studio) Provider-Hosted app with chrome and menu customizations (top right corner) 

With everything in place we will retrieve Taxonomy data via the CSOM and perform search queries via the REST API. This is done via code-behind of the Default.aspx on the button click.

After clicking the button "Get Facts" it shows the silly facts with actual data from SharePoint The retrieved data is stored as a facts in the Facts list

Downloads

You can check the slide deck and source if you want. When you have question, please use the comments section below.

Source code is found on Codeplex: https://sillyfacts.codeplex.com/

SharePoint 2013 Client Browser: Now support for Taxonomy and User Profiles

It’s been around 2 months since the last release of the SharePoint 2o13 Client Browser but work has progressed! Today I updated the tool with two new features.

  • Taxonomy support by showing the hierarchy of Term Store, Groups, Term Sets and Terms.
  • Limited support for User Profiles by showing the User Profile of the current user with the related properties and peers.

Download the SharePoint 2013 Client Browser here!

Taxonomy

By using the Microsoft.SharePoint.Client.Taxonomy namespace it’s possible to get the complete hierarchy of the Term Store and even manipulate it.

SharePoint 2013 Client Browser showing the Taxonomy

User Profiles

Next to the Taxonomy SharePoint 2013 client object model is extended with the Microsoft.SharePoint.Client.UserProfiles namespace for interaction with the User Profiles. For now I only included the current user profile. Future releases will be extended with other properties and showing more user profiles of other users within the environment.

SharePoint 2013 Client Browser showing the User Profile of the current user