SharePoint #10. June 2013

k k SharePoint ® k k #10 June 2013 eMagazine #10 - June 2013 Contents We made it! Nr 10! 3 Custom Forms in SharePoint 2013 Workflows with Vis...
Author: Reginald Ford
15 downloads 0 Views 6MB Size
k

k

SharePoint

®

k k #10 June 2013

eMagazine #10 - June 2013

Contents We made it! Nr 10!

3

Custom Forms in SharePoint 2013 Workflows with Visual Studio 2012 5 Pimp your SharePoint search results

10

SharePoint, Yammer and the social landscape

16

Protecting SharePoint 2013 with DPM 2012

19

Strategic Thinking and SharePoint

27

Custom Display Templates for the Content Search Web Part

39

Optimizing SQL Server 2012 for SharePoint 2013

45

Enterprise Social Case Management, where Workflow and User Engagement meet

53

About the Authors

60

Colofon DIWUG SharePoint eMagazine Nr. 10, June 2013 Publisher: Stichting Dutch Information Worker User Group (DIWUG) http://www.diwug.nl Editors: Marianne van Wanrooij [email protected] Mirjam van Olst [email protected] Special thanks to: All authors and sponsors! Design and layout: Barth Sluyters [email protected] ©2013. All rights reserved. No part of this magazine may be reproduced in any way without prior written permission of DIWUG or the author. All trademarks mentioned in this magazine are the property of their respective owners.

2

eMagazine #10 - June 2013

We made it! Nr 10! We made it! Nr 10! You have in front of you the tenth (10th!) edition of the DIWUG SharePoint eMagazine.

You have in front ofto you the gotten tenth (10th!) of the DIWUG SharePoint eMagazine. We are very proud have to thisedition milestone and we loved every minute of it! We are very proud to have gotten to this milestone and we loved every minute it! We started this journey in January of 2010 with our first magazine, at that pointofstill We started this journey in January of 2010 with our first magazine, at that point still unsure if we would be able to produce a magazine. Thankfully when we launched unsure wepublishing would be aable to produce a magazine. Thankfully when launched the ideaif of magazine everyone was very enthusiastic andwe supportive. the idea of publishing a magazine everyone was very enthusiastic and supportive. We found some great SharePoint friends from around the world who were willing to We found some for great from around world who willing to write an article us SharePoint and we hadfriends no problem findingthe sponsors, evenwere though there write an article for us and we had no problem finding sponsors, even though there was no proof that we could deliver. And you, our readers, reacted by downloading was that we times. could deliver. And you, our readers, by us downloading that no firstproof edition 5000 All this enthusiasm is what has reacted motivated to create 9 that first edition 5000 times. All this enthusiasm is what has motivated us totogether create 9 more magazines over the course of the last 3.5 years. We still enjoy putting more magazines over the course of the last 3.5 years. We still enjoy putting together all the great content that makes up the magazines and we love seeing the end result all thetime. great content that makes up the magazines and we love seeing the end result every every time. This 10th edition is a memorable one with more great articles from renowned This 10th edition is aspeakers, memorable one former with more great product articles group from employees renowned SharePoint specialists, trainers, SharePoint SharePoint specialists, speakers, trainers, former SharePoint product group employees and MCMs. We would also like to use this opportunity to thank Barth Sluyters, who has and MCMs. We would also like use this to since thankthe Barth Sluyters, who has helped us with the design andtolayout ofopportunity the magazine very first magazine. helped us with the design and layout of the magazine since the very first magazine. Lastly we would like to thank Avanade, because this is the 5th magazine for which Lastly wesponsor would like to thank Avanade, because this is the 5th magazine for which they will the printing. they will sponsor the printing. A BIG THANK YOU TO EVERYONE A BIG THANK YOU TO EVERYONE SUPPORTING THE DIWUG SHAREPOINT eMAGAZINE SUPPORTING THE DIWUG SHAREPOINT eMAGAZINE There’s more great news, the registration site for the SharePoint Connections event There’s more great news, theregister registration siteJune for the Connections in Amsterdam is live! If you before 30thSharePoint you can use the Super event Early in Amsterdam is live! If you register before June 30th you can use the Early Bird discount and if you use the DIWUG code (TD935) when you register Super you get an Bird discount and if you use DIWUG when you you getup, an additional 25% discount. Thethe event has code some (TD935) great speakers andregister sessions lined additional 25% discount. The event has some great speakers and sessions lined up, so register now! I hope you enjoy reading this 10th edition of the DIWUG SharePoint so register now! reading this of the please DIWUGfeel SharePoint eMagazine and Iifhope you you wantenjoy to contribute to10th the edition next edition free to eMagazine and if you want to contribute to the next edition please feel free to contact us. contact us. Mirjam van Olst, Editor DIWUG SharePoint eMagazine, [email protected] Mirjam van Olst, Editor DIWUG SharePoint eMagazine, [email protected]

This This issue issue is is sponsored sponsored by by

See page See page

Imtech: Samen Succesvol Avanade: Worldwide ... Pulse: Is SharePoint jouw passie? SharePoint Connections Amsterdam 2013 Avanade: The leading partner ... Macaw: Wat doe jij volgende maand? Avanade: #1 ... Avanade: Our social collaboration experience ... SpikesTogether: Case Management getting Social Avanade: Passion, Technology, People, SharePoint Note: When using the Adobe® Acrobat® version all sponsor information is hyper linked.

3 3

4 9 15 17 21 26 32 36 40 64

Custom Forms in SharePoint 2013 Workflows with Visual Studio 2012 by Andrew Connell Ever since Microsoft added the ability to create custom workflows and use them in our SharePoint deployments, going all the way back to SharePoint 2007, we developers have worked hard to leverage them in our solutions. Prior to SharePoint 2013 adding and interacting with custom forms in our custom solutions was almost always very challenging. In the latest release Microsoft has made this process dramatically easier than in previous versions. In this article you will learn some of the reasons why forms were so challenging in SharePoint 2007 and SharePoint 2010. Next you will learn what Microsoft has done in SharePoint 2013, from a high-level view, to make incorporating and working with custom forms in your custom workflows so much easier than it was in SharePoint 2013. This includes learning about the addition of the Workflow Services coverage to the client side object model (CSOM). Finally, you will learn exactly how to do it... how to add a custom association form and a custom initiation form to your workflow.

Looking Back at Forms in Workflows Prior to SharePoint 2013 Before working in the present, I think it always helps to have some perspective on the past because it provides context and appreciation on the new direction. The workflow custom forms story for SharePoint 2007 and SharePoint 2010 involved creating custom forms either using InfoPath forms or ASP.NET pages. For workflows built using SharePoint Designer, the forms were constructed using InfoPath forms automatically generated from SharePoint Designer. The most developers could do with these forms was to customize them in the InfoPath designer, nothing much in the way of custom code. When it comes to workflows authored using Visual Studio, developers were free to use either InfoPath forms or ASPX pages. Using either of these forms presented the developer with different challenges. InfoPath forms were tricky to install and correctly connect to the installed workflow, but any data passed to and from the form was automatically serialized and deserialized thanks to the SharePoint workflow API. However if the developer elected to use ASP.NET Web Forms they were responsible for marshalling the data from the workflow to the form and back. Aside from these tasks, developers could create three types of workflow forms in SharePoint workflows: Association Forms: Displayed after the standard SharePoint association form when the user selected the workflow definition, provided a name and then specified the start options as well as the associated task and history lists. It was idea to capture workflow configuration information as well as any default values for the initiation forms. Initiation Forms: These forms were shown when a workflow was manually started. It allowed users to specify additional values the workflow would need during execution. Task Forms: As the name suggests, these were special forms used when a workflow assigned a task to someone. It enabled the developer to present a customized form for each task that was assigned to people. If the developer elected to create a custom association form, they were also responsible for creating the two lists that were needed for every workflow association: the task list and history list. This process left many developers scratching their heads with some of the things they needed to do. For instance, the way that SharePoint informed them that the user selected a new task or history list to be created was to prefix the

5

list name with the letter “z” ... because this is the apparent universal language to say “you need a new one of these.” Thankfully, as you’ll see in the remainder of this article, Microsoft has made this entire process much simpler, streamlined and overall, just an easier task for developers.

Overview of Forms in SharePoint 2013 Visual Studio Authored Workflows There are two very important changes to workflow forms when creating custom workflows using Visual Studio 2012. The first is a major investment of expanding the client-side object mode (CSOM) to provide coverage for the workflow API. The second is that all forms should be created as ASP.NET Web Forms rather than InfoPath forms. These two changes pivot to a new approach for workflow form development in that the forms are simply rendered in the browser and all logic associated with them is handled using JavaScript, or more specifically, the JavaScript object model (JSOM), implementation of the workflow services API. This is covered in a bit more depth in the next section. Another change in creating custom forms for custom workflows in SharePoint 2013 using Visual Studio 2012 is that developers will only focus on creating two types of forms: custom association forms and custom initiation forms. You will notice that the custom task forms have been dropped as a custom form type in SharePoint 2013. The reason for this is that SharePoint relies on the standard SharePoint display and edit form logic to render the task forms. If for some reason a developer wants to provide a custom rendering within the task form, they could leverage custom site columns, content types and the great new JSLink site column property, that take advantage of the new client side rendering (CSR) framework. Unfortunately the CSR will have to be tabled for another time as it’s a huge topic. First, before creating any custom workflow forms for SharePoint 2013 workflows authored for Visual Studio 2012, one must be familiar with the new CSOM additions for workflow.

Introduction to the SharePoint 2013 Workflow Services CSOM The addition to the SharePoint 2013 CSOM of the workflow services API is the core of what drives the new forms components. The way it works is that everything is routed through the Workflow Service Manager. This is the client component that is hosted in SharePoint and that knows how to communicate through a client proxy with the SharePoint farm’s configured Workflow Manager farm. The Workflow Service Manager provides interfaces to a few specialized workflow services: Deployment Service: This service provides a vehicle to interrogate and explore all deployed workflow definitions. In addition developers can validate and submit workflow definitions to SharePoint and Workflow Manager through this service. Subscription Service: This service provides a vehicle to interrogate, explore, modify and create new or existing workflow associations of a workflow definition with a specified site, list or library. Instance Service: This service, like the two other services previously mentioned, provides a vehicle to interrogate, explore, create and interact with new and existing workflow instances on a specific SharePoint site, list item or document. Using these new services developers can create some really interesting solutions. However from a practical standpoint, the Workflow Services JSOM will be most used within workflow forms, which are covered in the next section of the article. In order to use the workflow CSOM or JSOM, add the necessary references to your project (Microsoft.SharePoint.Client.WorkflowServices.dll in the case of the CSOM, sp.workflowservices.js in the case of JSOM). Next, pass a SharePoint client context and the target site to connect to. The following sample demonstrates how to do this using the JSOM:

6

Listing 1: Creating a reference to the Workflow Service Manager in SharePoint 2013’s JSOM With an understanding of how the CSOM workflow additions work in SharePoint 2013, the next step is to create the forms.

Creating Association Forms In order to add an association form, right-click the workflow SharePoint project item in Visual Studio 2012 and add a new project item using the Workflow Association Form template. Visual Studio will add the form to the Pages module in the project and update the workflow's properties to point to the URL of the item. The ASPX page that is created for the association form is nearly complete as it will leverage the Workflow Services JSOM to create the workflow history list and task list (if necessary) as well as the association. First notice, within the PlaceHolderMain section, there is a server control that's worth mentioning:

Listing 2: SharePoint 2013 Association Form Context Control This control collects the input form controls from the HTTP POST submitted on the previous page, the one where the user selects the workflow definition, task list, history list and workflow start configuration. Without this, the association could not be created. It simply adds a handful of hidden form controls on the page, that the JavaScript generated in this template accesses. Scroll a little further down to find the core form within a table. By default it includes a handful of from controls, but to simplify things delete the two form controls except the single textarea field control. This block is collecting three form values and placing them in the metadata array. Remove the code block that creates the intInputValue and dateTimeInputValue variables as those were previously removed in a step above. Now scroll down until the comment "Add new workflow association", past the code that is creating a history list and task list if it was mandated on the previous form:

Listing 3: Creating a Workflow Association on a List This code is first creating a new workflow association, which is referred to in the API as a subscription. Then it sets the definition ID of the association to the ID of the workflow you created. Next it sets the source ID of the association, which is the ID of the list or site the workflow is associated with. Next, it sets the start types of the workflow defined in the previous page and finally the name. The form loop adds all the values from the form that the developer created as properties on the workflow association and finally, it creates the subscription on the list. 7

Within the workflow, create a new string variable named AssociationFormValue. Next add a GetConfigurationValue to the workflow and set the Name property equal to the name of the property being passed in from the form via the Workflow Services JSOM and set the Result property to the local variable: AssociationFormValue. Now the workflow has access to the values passed in from the association form! This sample solution can be downloaded from the DIWUG site at http://w w w.diwug.nl/e-magazines /Samples /Connell%20 -%20Workflow%20 Forms%20-%20AssociationFormSample.zip.

Creating Initiation Forms To create an initiation form, right-click the workflow and add a new project item using the Workflow Initiation Form template. Visual Studio will add the form to the Pages module in the project and update the workflow's properties to point to the URL of the item. The ASPX page that is created for the initiation form, just like the association form, is nearly complete as it will leverage the Workflow Services JSOM to start the workflow and pass in specific values. Following the same process as the association form, find the form controls and remove the second textarea and date time controls. Next, change the strInput textarea control to an input control. To make things a little interesting, add another control, the SharePoint server-side people picker:

Listing 4: People Picker Control on an Initiation Form To make development a bit easier, add a reference to the included jQuery library to the head portion of the page, within the PlaceHolderAdditionalPageHead section, just after the sp.workflowservices.js reference. Now, scroll down into the JavaScript code to the comment "Set workflow in-arguments/initiation parameters" section which is where another array is created with all the things to send to the workflow. First, remove the two sections that are collecting the second textarea and date/ time controls previously removed. Rename the parameter that is being passed in to SomeRandomString and add some additional JavaScript that will get a reference to the people picker client-side control and extract the login name of the selected user as shown in the following code:

Listing 5: Collecting the Selected Value from a People Picker Control

SharePoint Search Tips

The search box in the SharePoint user interface is a lot more powerful than you might expect! To search for all people whose last name is Smith use:

LastName:Smith

To search for all people whose first name starts with S:

FirstName:S*

To find out what communities a user belongs to: Smith ContentType=”Community Member” 8

With the parameters selected, find the comment "Get workflow subscription and then start the workflow" further along in the JavaScript. This section obtains a reference to the workflow services manager, the core component to the Workflow Services JSOM, as well as references to the deployment and subscription services, covered in the previous section on the Workflow Services JSOM. It then obtains a subscription (association) using the subscriptionID which was passed into the page via a value on the query string by SharePoint 2013. The last step is to configure the workflow to collect these values being passed in. Within the workflow, add two input arguments for SomeRandomString and UserLoginName, both strings. The workflow engine and SharePoint will handle sending the form values into the workflow and linking them up with these arguments which can then be used within the workflow for various use cases. This sample solution can be downloaded from the DIWUG site at http://w w w.diwug.nl/e-magazines /Samples /Connell%20 -%20Workflow%20 Forms%20-%20InitiationFormSample.zip.

Conclusion So, as you can see, Microsoft has made it quite easy to implement custom forms within our workflows in SharePoint 2013. I really like this model of sticking with pure ASP. NET web forms in combination with a robust client side object model to implement everything you could need. The best part about this approach is there is no deep special implementation or black magic going on, similar to what we had in previous versions of SharePoint. This new model is very transparent and strictly adheres to the new model of extensibility for SharePoint 2013 sites that Microsoft is promoting: business logic outside of SharePoint, in this case in the browser, and implemented with a robust client side object model.

9

Pimp your SharePoint search results by Stefan Strube With the integration of FAST search in SharePoint 2013 lots of changes and improvements were made under the hood of Enterprise Search. But the search results should be presented especially attractive and for that purpose there are the so-called Display Templates available. This article will show how easy it is to pimp your SharePoint search results.

Display Templates Let us start with a quote from Steve Peschka (Microsoft) as an introduction: Quote

“SharePoint 2013 has a number of outstanding features that allow you to really use and customize search results like never before. ... In SharePoint 2013 – queue the music – we have display templates and what an improvement they are. No longer do you need to carry your XSLT Zen about you, now you can create your custom display code as straight HTML” – yahoo! The Display Templates are part of the Design Manager (Settings > Design Manager > 5. Edit Display Templates) and are stored in the same folder of the Master Page Gallery. They consist of JavaScript for the logic and Html for the markup that is rendered on the webpage at run time. Display templates come in pairs: one Html file and one Js file, both sharing the same title and name. You can/should only add or modify the Html files; the Js files are generated by the system itself. The best way to play around with Display Templates is to download a copy of the Html file and save it with another name. Open the file in your favorite editor and make your changes.

Refiners Compared to SharePoint 2013, the presentation and navigation of the search results in MOSS 2007 were dramatic. But with the help of the Codeplex project MOSS Faceted Search it was possible to extend the search function by so called Search Facets. These Search Facets were the predecessor of what’s now called Refiners. One of the nice things of the Search Facets was the possibility to configure icons for every type of value. This made it very attractive and more intuitive to navigate (see figure 1). When the refiners were introduced in SharePoint 2010 there were no icons. The main reason to start my own blog was the desire to share the solution to bring back the icons. I have dedicated an early blog post to customize the XSL of the Refiner web part to show an icon for every filter value. In prior versions of SharePoint XSL was used as the markup language for the search core results XML and the Refiners. Inspired by the MOSS Faceted Search, I want to show the icons for every File type in the Refiner web part (see figure 2). In SharePoint 2013 the markup of the refiners is also based on display templates which are selected in the Refiner web part.

JavaScript functions In XSL the function ‘ddwrt:MapToIcon’ would return the icon file name for the given extension, based on the mapping in the DOCICON.XML file. In SharePoint 2013 there is a similar function available in JavaScript: Srch.U.getIconUrlByFileExtension(arg1, arg2)

10

Figure 1: MOSS Search Facets

Figure 2: SP2013 Search Refiners This function needs an object as an input parameter. In JavaScript it is very easy to create a fake object. We just add a property called FileExtension to the object and give it the Refinement Name value of the File Extension refiner. See code snippet in listing 1.

Listing 1: Code snippet to insert in row 53

11

For some reason not all of the standard File Extensions are recognized by this function and return the standard icon file html16.png (see figure 3). Therefore we are going to use the second -optional- input parameter of the JavaScript function to define what it should be in case of “if no mapping is found”. We can construct the path of the standard icon files in the images folder of the server file system, or use a library in the search center site collection itself to store the custom icon files. In this case we will use the images folder. To show the icon inline with the refiner value we just add an image element to the Html part of the display template. See code snippet in listing 2.

Listing 2: Code snippet to insert in row 66 We are able to use the ‘onError’ event of the IMG element as a safety net in case the path of an icon file doesn’t exists. We will use another JavaScript function from SharePoint to retrieve the url of the image file for a general document. See figure 4 for the final result.

Figure 3: Standard results

Figure 4: Optimized results

12

Customizations To be able to customize the search results we have to create a new site collection based on the Enterprise Search Center template. In this way the search results pages will be editable. Multi-value refinement is a standard option in the configuration and functionality of the Enterprise Search. According to the information on TechNet there a two Display templates related to the multi-value refinement (see table 1).

Table 1: Display templates for Multi-value Refinement (source: TechNet) Now download a copy of these two Html files from the Display templates gallery in the Design Manager and save them as respectively ‘Filter_MultiValue_with_icon. html’ and ‘Filter_MultiValue_Body_with_icon.html’. Open the first file in your favorite editor and make the customization as listed in table 2.

Table 2: Customizations of the display template file ‘Filter_MultiValue_with_icon.html’ Following the tag is a tag with an ID. By default, the ID for this tag should match the name of the HTML file. The complete Display template file ‘Filter_MultiValue_with_icon.html’ can be downloaded here: http://www.diwug.nl/e-magazines/Samples/Filter_MultiValue_ Body_with_icon.html.

13

Open the second file in your favorite editor and make the customization as listed in table 3.

Table 3: Customizations of the display template file ‘Filter_MultiValue_Body_with_ icon.html’ The complete Display template file ‘Filter_MultiValue_Body_with_icon.html’’ can be downloaded from the DIWUG site here: https://www.diwug.nl/e-magazines/Samples/ Filter_MultiValue_Body_with_icon.html. Upload the custom display template files to the folder ‘/_catalogs/masterpage/ Display%20Templates/Filters/’. Don’t forget to publish a major version. The JavaScript files will be created automatically if the syntax is correct. The status of this process is shown in the column ‘Status’. It should say “Conversion successful”. Now we go back to the search results page where we are going to change the configuration of the Refinement web part by selecting the FileExtension refiner and choosing our custom display template (see figure 5).

Figure 5: Configuration of the Refinement web part 14

Apply the changes and save the page. Test the search by refreshing the page, type your keyword(s) and hit for Search. The result should look like the example in figure 4. This custom display template can also be selected for the Result Type refiner but not all File Types will be recognized by the search engine. It is not (yet) documented where this logic can be found and whether this can be customized.

Conclusion With some guidance it is rather easy to make your own custom display template based on a copy of existing ones. There are a lot of interesting JavaScript functions of SharePoint itself to explore and to make use of for your own benefit. The most potential can be found in the design templates that are used to render the items in the search results and the hover panels. See the references for more information.

References 1. Using Query Rules, Result Types and Display Templates for a Custom Search Sales Report in SharePoint 2013 by Steve Peschka on July 23rd, 2012 (http://blogs.technet.com/b/speschka/archive/2012/07/23/usingquery-rules-result-types-and-display-templates-for-a-custom-search-sales-report-in-sharepoint-2013. aspx) 2. SP2013 Search DYI Display Template by Will Tseng on February 21st, 2013 (http://blogs.perficient.com/ microsoft/2013/02/sp2013-search-dyi-display-template/)

15

SharePoint, Yammer and the social landscape by Chris Johnson The Social computing space has been “the” hot thing in tech for some time now. Although it’s very much standard practice to post photos, comment on your friends status updates and like things in your personal life, it’s still very much an emerging space in the enterprise. With Microsoft buying Yammer over a year ago the scene was set for a social reset at Microsoft.

SharePoint’s social history In the early versions SharePoint around 2001 one of the fundamental features it offered was the ability to store and collaborate on content with others. This was the start of the social revolution in SharePoint. That soon developed into other forms of collaboration like the ability to have a My Site and personal profile that people could use to find and connect with people. All these things prior to SharePoint were either custom solutions, expensive or nonexistent in organizations. Social computing has been at the heart of SharePoint since day 1 of the product, but until recently it was called collaboration. Now the cool kids in Silicon Valley have given it a new buzzword, Social Computing and the internet has exploded with social computing platforms like Facebook and Twitter. Like most things the enterprise takes some time to catchup and social computing has lagged what has been available in people’s personal lives. SharePoint’s social computing features were no exception. As services like Facebook took off and offered new features, SharePoint lagged behind and often needed additional products added on to bring it up to par with other platforms. Microsoft’s bold move with the purchase of Yammer aims to solve that for good.

QUOTE

Although it’s very much standard practice to post photos, comment on your friends status updates and like things in your personal life, it’s still very much an emerging space in the enterprise.

Building a Social Microsoft Microsoft has very much set the tone and direction for the next few years in its products. The purchase of Yammer for $1.2B USD signaled a very bold step forward for the tech giant. Microsoft wasn’t keeping pace with its competitors. The social landscape was moving faster than it could update its products. Traditional 3 year cycle products like SharePoint 2010 were released into a social world that didn’t exist when its blueprints and plans were being set. When SharePoint 2010 was being designed and built Facebook was still a very much university dorm room experiment. Microsoft couldn’t keep pace and it needed a quick fix. Enter Yammer. In one purchase Microsoft catapulted itself from having to answer social computing questions from awkward and substance free to far more solid. Even though many organizations are not ready for cloud computing at least Microsoft now had a direction and strategy for social computing. Yammer was not just purchased for its product. It was purchased for its knowledge in the space. The leadership and people at Yammer have been leading the enterprise social computing revolution and Microsoft desperately needed credible people solving the issue for them. Yammer also came with a rich depth of knowledge on how to build and release software as a service (SaaS) products at a cadence that Microsoft didn’t. Office 365 needs that cadence moving forward and so the infusion of that knowledge will be invaluable to them in the long run. 16

Microsoft have signaled that Yammer will be the social underpinnings in all its products. They want to build a social fabric that connects currently disconnected and separate software today. The first signs of this are in changes recently released in Microsoft CRM with inclusion of feeds from Yammer. This is just the beginning of things to come in Microsoft products and we will likely see social features included in many more to come over the next year.

Rebuilding SharePoint social computing SharePoint has a rich history with social features and obviously Microsoft has plenty of work ahead of itself to get the investment it has made in Yammer integrated into SharePoint. Microsoft has been reasonably coy about its plans but has recently indicated improvements coming in SharePoint Online to better integrate Yammer. Those start with the ability to switch out SharePoint’s newsfeed for Yammer. Additionally Microsoft are working on integrating Yammers authentication system with Office 365s. This will allow for single sign-on to Yammer when a user is signed into Office 365. In the future Microsoft will more deeply integrate Yammer into SharePoint. Currently there are two choices for social computing in SharePoint. The first is using the out of the box SharePoint 2013 features. These took a big step forward in 2013, but still lag those in Yammer. The second is using Yammer. However, if an organization chooses Yammer they are currently faced without great integration and they find they have duplicated features that can’t turn off. Additionally Yammer is only available as a cloud service, and will likely remain so. For organizations that are not able to use the cloud this is obviously not an available choice for them. This rift is currently providing a tough choice for people. On the one hand an organization could go with the out of the box social features and have a more deeply integrated experience that is available on premises. On the other they could pick the platform Microsoft is signaling is the

17

future of social computing in its products, but only available in the cloud. This choice is currently paralyzing many enterprise decision makers who are waiting to see the next moves Microsoft makes with Yammer. Microsoft will bet everything they have on Yammer. When Microsoft spends $1.2B USD on something they mean business. All indications they have given point to it being the social fabric in all their products. From what we know today SharePoint will still support it’s out of the box social features for some time to come. That will be the correct choice for organizations who can’t use the cloud today. Microsoft will continue to move the integration with Yammer deeper and deeper into SharePoint. That will likely mean that at some point there will be a social “switch” in SharePoint where an organization can pick either the older social features, or switch to the newer Yammer ones. We will likely see all the share and like buttons etc… that are throughout the product connected to Yammer. This will be when Yammer is a much nicer and seamless choice for organizations. It won’t feel like you are losing anything by picking the Yammer option. But these changes will take some time and it wouldn’t surprise the author if it were another 6-9 months before we see much more from Microsoft on this.

Using Yammer today For organizations that pick Yammer today the integration options are not that great. Over time we will see that corrected, but it will take some time. In the meantime there are a few things that people can do to make their Yammer experience better and a bit more seamless for users. Authentication. Both Office 365 and Yammer offer the ability to federate authentication with an organization’s identity system using products like ADFS. This means that when a user goes into Yammer they are authenticated with the same set of credential they use to login to their domain joined PC. Office 365 offers this too and it makes working with these services a lot simpler. Federating authentication is the first step in creating a more seamless experience for users. Integration. Yammer offers a number of options for integrating with SharePoint. They provide a solution for on premises SharePoint installations that allows for feeds of information to be added to sites, links to documents to be posted to yammer from SharePoint and to sync profile information from SharePoint to Yammer. For organizations that use Office 365 Yammer will provide a web part to show feeds and will soon update the navigation in 365 to include Yammer if you chose to turn this on. Additionally Yammer provide a set of web services for pushing and pulling information into and out of Yammer. These allow for actions such as posting to a person’s feed, posting to the activity stream via the OpenGraph API, and likes and shares from Yammer. This offers people options for developing solutions to do things that are not offered today. This could also include posting to Yammer when activity happens in other systems such as when a report is automatically produced that should be reviewed by others. The APIs offered give you the ability to build things that connect currently unsocial software to Microsoft’s new social fabric.

Conclusion Yammer is here to stay. Whether or not it will be called Yammer is yet to be seen, however the social fabric it provides will slowly start to weave together Microsoft’s products moving forward. We have started seeing this today in small ways, but this pace will pick up over the next year and beyond. Your organization can also start weaving social aspects into your solutions using Yammer behind the scenes using the APIs it provides. Whether or not your organization is ready for social computing or the cloud, social computing is now mainstream in the enterprise and will be a part of Microsoft’s connected and social enterprise software strategy moving forward. The question is how and when will your organization be ready to capitalize in the benefits it promises?

18

Protecting SharePoint 2013 with DPM 2012 by Sam Hassani SharePoint is made up of many components which consequently leads to complex backup and recovery procedures. For example, a content database relies on the farm configuration database and both must be in sync. Often backup and recovery is implemented incorrectly in SharePoint and more often than not this is unintentional. When used correctly, DPM can help overcome this issue of complicated backup and recovery by complementing SharePoint’s native backup and recovery capabilities.

When planning for disaster/content recovery you probably ask the same questions for every tool that you use to protect and recover data. Some of these questions should probably include: Will the tool allow us to meet our SLAs? How often can we perform backups? What backup types are supported (full, differential, incremental)? What level of backup and recovery granularity is offered? What level of complexity and costs are required for managing the tool? Are there any performance implications in using the tool? Does the tool leave the farm in a supported state upon restoration of objects? Hopefully throughout the course of this article, we’ll answer these questions when considering DPM 2012 to protect SharePoint 2013.

SharePoint 2013 Backup and Recovery Recap Before we dive in to the details of DPM, and how it can complement native SharePoint backup options, let’s first recap on what SharePoint provides out of the box. It’s worth calling out here that SharePoint 2013 doesn’t bring any major improvements to the table, however SharePoint 2010 offered some new capabilities over SharePoint 2007. As per SharePoint 2010, SharePoint 2013 allows us to carry out a backup (and recovery) of Configuration Settings of a farm. This doesn’t backup the configuration database (which is in fact unsupported – more on this later) but grabs key farm-wide settings and writes them to an XML file. This XML file can then be restored to the same farm for recovery purposes. All SharePoint service applications are supported for backup and recovery through SharePoint 2013 using either Central Admin or PowerShell. It’s also possible to recover certain Service Applications using SQL database backups. However there are certain pre/post recovery steps to be aware of depending on the Service Application. SharePoint 2010 introduced the Unattached Content database restore capability which is still present in SharePoint 2013. This allows you to restore objects (e.g. sites/ lists) from a content database once restored in SQL without having to actually mount the database in SharePoint, eliminating numerous steps from the recovery process reducing recovery time for relevant items. SharePoint 2010 also introduced UI based backup/recovery in Central Admin for sites and lists, and equivalent PowerShell cmdlets too. These cmdlets also introduced SQL Snapshot support, allowing a snapshot to be taken when for example backing up a site, no longer requiring our site to be locked/in read-only mode as we carry out the backup.

19

SharePoint 2013 Backup and Recovery Limitations Let’s consider some of the shortcomings with SharePoint backup/recovery. There never has been and is still no way to carry out in-line item level recovery. Yes the unattached content database restore feature makes this a little easier, but overall this is still very much a manual process. Most importantly, SharePoint does not support backup and restore of the Configuration and Central Administration databases. There is a slight exception to this in that if we shut down all SharePoint services in our farm and carry out the backups when the farm is in a “stopped” state it would be supported to recover these databases to the same farm. However recovery of these databases in any other scenario is not supported.

How can DPM 2012 help? This brings us nicely to DPM and some of the capabilities it offers when considering it as a tool to protect SharePoint 2013: In-line item level recovery: With DPM you protect SharePoint at the farm level. This is achieved with a single checkbox. You are then able to perform recovery down to the item level (more on this later). Configuration recovery: Restoration of the farm configuration database and associated Central Administration content database is supported as part of a farm recovery in DPM. In this scenario all content databases must be restored to the exact same point in time also. This is made possible because DPM uses VSS (Volume Shadow Copy Service) which allows for a point in time snapshot of all databases in a SharePoint farm. For this exact reason, restoration of the configuration and Central Administration databases is supported when recovering an entire farm. Service applications: Although DPM does not protect service applications through the farm recovery option, it does allow you to protect the SQL server databases backing the service applications, and configure pre/post backup and recovery scripts which will allow you to automate backup and recovery of service applications that support this approach. Generic capabilities: In addition to the above, DPM offers non-SharePoint specific capabilities which include backup to the cloud using Windows Azure Online Backup (http://www.windowsazure.com/en-us/home/features/onlinebackup/), protection of other Microsoft products such as Hyper-V, Exchange, etc., and role based backup and recovery management and administration.

How does DPM 2012 protect SharePoint 2013? The SharePoint Volume Shadow Copy Service (VSS) writer is the first key component used for protecting a SharePoint farm down to the item level by using DPM. The VSS, introduced in Windows Server 2003, is the infrastructure that provides built-in shadow copy capabilities. The SharePoint VSS writer is a referential writer that enables backup applications like DPM to use a single writer interface to call upon other VSS writers such as the SQL Server VSS writer. This is crucial from a SharePoint perspective and is what allows us to protect everything in a SharePoint farm including the Configuration database and Central Administration content database. As mentioned earlier it’s not typically supported to restore these databases as there is no way to ensure their consistency with the rest of the farm. However, with VSS and DPM we can because VSS will use the SharePoint Writer to freeze and snapshot all associated content at once, thus ensuring we have a consistent point in time replica of the content being protected. For more information around VSS and how this works, see http://technet.microsoft.com/en-us/library/cc785914.aspx.

20

At a high level, when the backups are taken, the data flow can be illustrated as per Figure 1.

Figure 1: DPM Backup Data flow. 1. DPM requests a backup to be taken by communicating with its agent which is installed on one of the SharePoint servers in the farm. 2. The DPM Agent uses the referential SharePoint Writer to snapshot all farm content sources by invoking the SQL Server VSS Writer and other VSS Writers on remote servers. 3. Data is replicated back to the DPM server by using agents on remote servers. 4. Finally the SharePoint cataloguing activity takes place which is where up to date information about SharePoint items is requested by DPM (at a later time) and sent back from SharePoint to enable item level restore. DPM works on an incremental basis, but first creates a full replica of the data being protected. It then sends over only the changed blocks of data at each specified recovery point time - up to every 30 minutes with SharePoint. With DPM, you do not need to worry about maintenance windows and data sizes as much as you may have with SQL based backup/recovery. This is because DPM utilises VSS. You can have recovery points created throughout the day without noticeable impact on your environment. Since only changed data is sent across to the DPM server, large data sources do not affect DPM backup times like they may affect SQL Server backup times.

21

As with any backup and recovery solution, there will be a performance hit, but with DPM this is negligible. Again, this is because DPM leverages VSS which is extremely efficient. An agent is installed on each server you wish to protect in your farm and this has minimal CPU and memory impact. Bandwidth throttling is supported in DPM allowing you to minimise the impact on your network.

Configuring DPM 2012 to protect SharePoint 2013 Before attempting to protect a SharePoint farm, there are certain pre-requisites and configuration steps you need to take. 1. Firstly ensure your DPM 2012 server is fully configured with SP1 and you’ve attached storage pool disks to store the replica of data being protected and recovery points. 2. Once this is done, you can install the DPM agent on each of the servers to be protected. The agent is used to communicate between DPM and the data sources being protected. For SharePoint, this only needs to be: •

One SharePoint server that is used to invoke the VSS writer. •

All back end SQL servers.

So why not the other SharePoint servers? Well since the SharePoint servers do not host content, you only need to protect one to protect your entire farm. In fact this server is only really used to serve as an entry point for DPM to protect your farm. Protecting only one server does however mean that you couldn’t grab system state and directories on other servers in the farm. 3. The SharePoint Writer service must be configured before you can protect SharePoint data. To do this there is a utility available called ConfigureSharePoint. exe. The utility can be found in the \bin folder of the SharePoint server that you have deployed the protection agent to. This utility configures the SharePoint Writer service with the correct credentials required to access the farm for backup and recovery purposes as per Figure 2.

Figure 2: Running ConfigureSharePoint.exe Once the pre-requisites are in place and initial configuration is complete, you can look at protecting SharePoint with the DPM management console:

22

1. The first step is to create and configure a protection group – this is the logical container for a group of data sources to be protected and is used to define the backup schedule, retention policies and so on. 2. As shown in Figure 3, when protecting a SharePoint farm, you only need protect it with a single check-box in the UI via the SharePoint server with the DPM agent configured. The farm is displayed in the name format: ‘Server\ConfigDBName’.

Figure 3: One-tick protection in DPM 2012 Once you have specified your protection goals and configured any other settings, DPM will be protecting your SharePoint farm according to your schedule! It’s that easy. As mentioned previously DPM does not protect service applications natively but it does allow you to protect the SQL server databases backing the service applications, and configure pre/post backup and recovery scripts which will allow you to automate backup and recovery of service applications that support this approach. For example the following article details the steps that must be taken when using SQL to back up the User Profile Service Application http://technet.microsoft.com/en-us/library/ gg576965.aspx#proc3. You could therefore use DPM pre/post backup scripts to carry out these steps (detailed here http://technet.microsoft.com/en-us/library/bb808870. aspx). A similar approach could be taken for the restore process.

Recovering SharePoint 2013 data using DPM 2012 Restoration of SharePoint data using DPM can be broken into a few key recovery scenarios: Farm Configuration with Content Service Applications (covered in protection section of this article) Content databases Sites, Lists and Items (everything below the content database level) Restoration of data from each of these categories can involve a different process, supportability implications and prerequisites. For example, restoration of the farm configuration database and associated Central Administration content database is only supported as part of a farm recovery. In this scenario all content databases must be restored to the exact same point in time also.

Farm Configuration with Content As already discussed above, recovery of the Configuration and Central Administration databases is possible when performing a “Farm” recovery. DPM refers to this as full farm recovery, but really this is just restoring the two aforementioned databases along with your content databases.

23

As previously mentioned this recovery option requires these database to be recovered together to the same point in time. It is possible to select the Configuration and Central Administration databases for restore individually, but this is not a supported operation. To recover an entire farm, you simply select the ‘All Protected SharePoint Data’ option, followed by hitting recover on the configuration database as shown in Figure 4.

Figure 4: Farm Recovery in DPM 2012 This may not seem obvious at first but it is the correct way to restore these databases. At this point you can follow the wizard to recover the farm and all its content. During the recovery process, DPM will recover all databases to the SQL Server instance(s) used by the farm. The DPM Agent and SQL VSS Writer are used for this process.

Content databases Restoration of SharePoint content databases is very simple. Although backed up as part of the farm, the content databases are treated like any other SQL Server database and can be selected for restore individually. You have a few operations for restore: recover to original location; recover to alternate SQL Server instance; or copy to a network folder. The wizard is fairly intuitive, so I won’t explain each step any further. I would however like to point out that the copy to network folder option is great and can be used to properly verify your backups and keep that all important test farm data up to date. Of course the option is less valuable when performed manually in the UI, but how about you use a PowerShell script to do this for you?! This would be straightforward to formulate and would allow you to test the restore of your SharePoint content databases routinely.

Sites, Lists and Items Recovery at this level can be classed as item level recovery. In essence this is anything in the SharePoint object hierarchy that is stored within a SharePoint content database. Restoration of these items is only possible (in a supported manner) via the SharePoint Object Model. The DPM product team worked with the SharePoint product team to ensure this recovery scenario could be implemented in DPM in a way fully supported by SharePoint. As such, DPM uses the SharePoint Object Model when performing item level restores. For this to work, in previous versions of DPM a ‘recovery’ farm was required and was used to temporarily host a recovered version of the content database that holds the SharePoint object you wish to recover. The object was then exported using the SharePoint Object Model and imported back into the production farm. 24

Whilst this approach is still present in DPM 2012 for fall-back, it is not the default in 2013. The problem with this approach is that even for a 10KB Word document, we may need to restore a 200GB content database from the DPM server to a SQL Server instance, before we can start recovery of the item. With DPM 2013, when recovery is initiated, the replica on the DPM server is exposed as a share. The remote SQL Server then remotely mounts the database from the share, no restore of the database required. The process for extracting content and importing it back to the production farm is then the same. This approach means DPM 2013 can recover content from large content databases within seconds. You can use the DPM management console to search or drill down through a content database down to the item level. As you can see in Figure 5 it’s as simple as navigating the SharePoint object hierarchy and selecting the item you wish to recover, be it a site collection or single document.

Figure 5: Drilling down through a content database using the DPM management console You are able to navigate the SharePoint object hierarchy like this because DPM catalogues your farm when it creates a recovery point storing it locally for search and navigation during a restore. When the wizard fires up, you get a couple of recovery choices; recover to original site or recover to an alternate site. Again I won’t speak you through the whole wizard; you can refer to TechNet for those articles.

Conclusion Although DPM isn’t a magic bullet, it certainly compliments the out of the box backup and recovery tools, providing simple, fast, and automated backup and recovery. DPM addresses some of the limitations with SharePoint 2013 native backup and recovery tools. DPM 2012 provides a cost effective solution to reducing the complexity of backup and recovery procedures in SharePoint 2013 when planned for and implemented correctly.

Setting taxonomy values from code to work with Office 2010

When a taxonomy field value is set for a document, the GUID should always be lowercasted for it to work correctly with the Office 2010 ribbon. Kevin Timmerman, developer at Avanade

25

Strategic Thinking and SharePoint by Jaap Zwart The characteristics of strategic thinking and strategic leadership are additions to the theories of leadership styles and they are complementary. This short overview of strategic thinking and strategic leadership will be related to SharePoint implementations or using SharePoint as a strategic asset. SharePoint is a huge platform and when its implementation is part of the organizational strategy, research shows that it will have a higher chance to be successful. When it is implemented as an afterthought or side effect and only by the technical layers of the organization, failure is very much waiting to happen.

Introduction Strategic thinking and strategic leadership transcend plain leadership. Leadership is more about directing the organization to some goal and future, which is set by strategy. This strategy is defined and characterized by strategic thinking and strategic leadership which set the stage for leadership within the organization. Different layers play a role within an organization when implementing or using SharePoint as a strategic asset. It is not only about the technical implementation or about proper change management and leadership. It is also very much connected with strategic thinking and strategic leadership. Although strategy is a science on its own, this article will try to make the connection between Strategic Thinking and SharePoint a little bit less obscure.

Figure 1: Strategy Triangle

About strategic leadership Strategic leadership is more than the process of influencing an organization to understand and agree what needs to be done and how it can be done effectively. Strategic leadership is focused on the external direction of the organization and how the organization must be guided to reach strategic goals. It must be decided upfront if SharePoint will be part of that strategy and how it is embedded in these strategic goals. For example, strategic goals could be: our employees must be connected to all information wherever they are and as easy as possible. All information at their fingertips and all kinds of sources presented through one interface. All existing 27

information carriers must be enabled to pass the information to where it belongs and we want to make this happen with the SharePoint platform. We want to create a strategic competitive information advantage in comparison with our competitors in the market to be able to react faster to possible opportunities. When implementing SharePoint it is important to have a vision around it that backs up the strategy. The strategic leader is able to formulate that vision of where to go with SharePoint and how to get there. A good strategic leader knows how to align the formulated strategic leadership style to the context of the organization. If these elements are not connected, it will be SharePoint without a vision. It will be SharePoint at drift. Strategic Leadership around SharePoint is not a static phenomenon. The style of strategic leadership must be tailored to the context of SharePoint in which it is used and the most successful leaders are able to do that. The SharePoint strategy and implementation should not only start bottom up, as it is done currently in many cases. This narrow minded and not well educated approach is the cause of many SharePoint implementation failures.

Figure 2: Strategic Leadership Strategy around SharePoint is not a one man show or the sole responsibility of one strategic management layer. Strategic leadership is changing and it becomes the responsibility of many people instead of just one strategic top layer. Different management layers should contribute to implementing, sustaining and exposing the SharePoint strategy of an organization. Analysis of strategic responsibilities among different management layers within organizations related to SharePoint show a fundamental change in how these responsibilities are divided.

Strategic thinking It is interesting to investigate how strategic leadership around a SharePoint implementation can be improved. Strategic thinking about SharePoint is the foundation of strategic leadership when SharePoint is used as a strategic asset. Strategic leadership is not just leading a company during day to day operations wherein all the members can perform. Strategic leadership is more than just leadership. Strategic leadership is closely bound to visionary guidance around the SharePoint implementation, setting the goals and head to it. In a sense, strategic leadership is visionary leadership embedded in proper strategic planning to reach the goal. It is understanding and shaping the future in such a way that it secures realizing the SharePoint vision. If the future with SharePoint is not well 28

understood, then securing and realizing the vision around it is impossible because there just is no well-defined vision where the SharePoint implementation can be based upon. Strategic thinking is closely linked to the cognitive processes that make it possible to collect and interpret information to form ideas which sustain the competitive advantage of an organization. This is very much needed when using SharePoint to create that competitive advantage. If the collection and interpretation of the information around the SharePoint implementation is not done properly, then the implementation and usage of SharePoint will be based on false assumptions. False assumptions are never a good foundation for success. Strategic thinking is not a process on its own. It is an interaction between people and together this can result in a collective process. It is besides a process of the head also a process of the heart and partly a matter of intuition. Strategic thinking must be lifted above the visible level of reality and include also the realm of what is not yet visible. This can be the driving force behind unforeseen competitive advantages which can be realized with SharePoint. The heart and intuition can make the difference between failure and success when implementing SharePoint and using it as a strategic asset. When embedded within a justified strategic guidance, it is a save procedure to at least analyze these soft strategic motivations.

Figure 3: Strategic Thinking Strategic thinking must also include possibilities which only can be defined when the personal mental models are exceeded. In this sense, strategic thinking is a creative and innovative process where thinking outside the box is a key element of successful strategy implementation. SharePoint is all about innovation and thinking outside the box. SharePoint is equivalent to a new way of working and old mental models must be adjusted to make it work to its full potential. When SharePoint is used strategically, then cognitive maps must change on different levels and often this include the cognitive map of the organization itself.

Pestle, SWOT and Competition External factors are important for an organization and are of influence on the strategic choices. This is also often the case when SharePoint is chosen as a strategic asset. There are two main characteristics of strategy and they are free choice or imposed. A free chosen or imposed strategy is based on internal and external forces like important stakeholders or political, economic, sociological, technological, legal and environmental (PESTLE) elements. When the SharePoint implementation is a result of an imposed strategy, then the start is less attractive than acting on a free chosen strategy with SharePoint. An imposed 29

strategy with SharePoint should be avoided. A way to do this is analyzing the PESTLE forces on a regular basis and check if SharePoint is a positive competitive strategic choice to be used and implemented. This regular strategic analysis is much better for the organization than being forced to include SharePoint in an imposed strategy because in such a case the organization will often not be in a leading position but will be led by what the PESTLE forces are dictating.

Figure 4: PESTLE Forces The PESTLE elements can be used with a SWOT analysis to check the score of the strength, weaknesses, opportunities and threats of the organization. If SharePoint is part of the strategy, then it should be part of this analysis. This SWOT analysis based on the PESTLE forces can make it clear where and how the participants in the industry, also known as competitors, are stronger and where the strategy must take note of. If SharePoint is a main strategic asset within those other competitors, the SWOT must make it clear where the organization must be optimized to harden its strategic strength. Else the SWOT can be used to analyze how SharePoint as a strategic asset can create the most competitive advantage possible.

Figure 5: PESTLE and SWOT This analysis is furthermore very useful when a strategic map must be created and taking advantage on competitors is the goal. The strategic map, mainly based on the PESTLE elements and driven by the SWOT outcomes and embedded in competition thinking, can help focus the strategy needed to relate the strategic vision around SharePoint to the internal and external reality of the organization.

30

Figure 6: Example of a Strategic Map

Linear and Adaptive strategy Linear strategy can be called a simple sequential view on the strategy process. It has often to do with planned strategy and logical thinking. It was concluded in later times that strategy is not just a linear process where only objective and rational numbers play a role.

Figure 7: Linear Thinking Because linear strategy implementations showed flaws in usefulness on the long term, organizations tried other variations and one of them is adaptive strategy. It is obvious that PESTLE forces make it a tedious task to come up with a static planned sequential strategy. It often occurs that external and internal forces change down the strategic road and flexibility to adapt is needed. This is especially true when using and implementing SharePoint. SharePoint is on its own innovative, complex and difficult to formulate in one overall definition. SharePoint is a very dynamic product and it demands an even so dynamic strategic approach. Being adaptive to internal and external forces almost automatically brings an organization to the use of incremental strategy; implementing strategy in iterations. After defining the initial strategic vision around SharePoint, the road towards that vision can be done in increments after which single loop or double loop learning can be used to make the next increment, or iteration, more effective than the previous increment.

31

Figure 8: Single and Double Loop Learning For this behavior to be most effective some intelligent opportunism is needed or else the organization is less able to adapt new strategies when using SharePoint. It is this adaptive behavior that can help organizations face the challenges of the current fast changing competitive world and make the transformations needed to survive. When SharePoint is used and approached in this way, the strategy around SharePoint will stay dynamic and vivid; else it will end in a costly and useless burden.

Figure 9: Adaptive Strategy

32

Interpretive strategy Lateral thinking is related to problem solving through indirect and creative processes. Lateral thinking makes it possible that identification with external and internal forces is done by thinking outside the box. Lateral thinking can be linked to interpretive thinking in the sense that they both are concerned with the perception of the stakeholders interpreting internal and external forces that influence the strategy around SharePoint. Lateral thinking can be a very useful approach to a SharePoint implementation or the use of SharePoint as a strategic asset. Again, thinking outside the box is very important when using SharePoint.

Figure 10: Lateral Thinking It is also about orienting metaphors or frames of reference. This is done to let stakeholders understand the organization and its environment to get motivated for more favorable behavior towards the organization and its use of SharePoint within its strategy. Influencing the perception of the stakeholders concerning the internal and external forces related to SharePoint as a strategic asset, can be a key element in increasing the acceptance of the product. Interpretive strategy is on itself a new approach to strategy and this by definition can be called a lateral oriented strategy. Changing your cognitive map is part of lateral thinking because it makes you able to approach problems in a different way. SharePoint is doing things differently than most people are used to and indeed problems and opportunities can and will be approached in different ways. Changing the cognitive maps of subordinates is a very important element of the success of SharePoint within an organization. When this focus is part of the organizational strategy, then SharePoint is already hallway of being a success.

Figure 11: Creative Thinking 33

Creative and innovative minds are often capable of changing their cognitive map to think outside the usual box. These minds must be put in front of the SharePoint focus. Using SharePoint as a strategic asset is also about creating a shared vision and aligning mental models of several stakeholders. Interpret the environment in combination with the inner processes of the organization and make all elements a part of the strategy around SharePoint. When this is not done properly, failure will come from unforeseen sides. Often organizations are not aware of these dimensions when implementing SharePoint or using it as a strategic asset. It is very important that this attitude change and that awareness is improved. Interpretive strategy is also related to having a holistic understanding of the organization and its environment to create a vision of the future of the organization related to how SharePoint will be used and how it can increase the competitive position of the organization. It is about true systems thinking based on the organization’s values, opportunities, possibilities and values related to using SharePoint as a strategic asset.

Figure 12: Interpretive, adaptive and Linear Thinking Areas Associative thinking can be useful for correct interpretation of distant opportunities when using SharePoint. It helps to associate with businesses in other industries which also use SharePoint as a strategic asset for better alignment of own strategy and for the interpretation of yet unknown realities which would otherwise stay invisible and under the strategic SharePoint radar. Strategy and Innovation It is reckoned that highly formalized strategic systems of planning tend to be rigid and rather static. When this is combined with detailed mechanisms of control than it can result in an inflexible and hierarchical organization where innovation is made difficult to come to fruitiness. For this to prevent it is important to get people outside their working environment, for brainstorming new ideas which otherwise would stay under the surface. When things get rigid and rather static, then SharePoint as a strategic asset is in danger and the implementation loses its vividness. SharePoint is equivalent to innovation and bringing people outside their working environment and changing their mental modals will help to prevent entering the phase of flux wherein SharePoint is stuck to the organizational wall without effectiveness.

34

Innovation is needed to go beyond your cognitive map. Your cognitive map guides your priorities during certain situations and determines which issues get priority. It is important that a strategic leader is able to align his cognitive map to the strategic situation of the organization and act accordingly. This is even more important when SharePoint is involved because SharePoint hits the cognitive maps of its users and demands mental flexibility. The strategic leader is prepared for this situation and will prevent deadlocks.

Figure 13: Strategy and Innovation Lateral thinking has everything to do with thinking outside the box. It needs some mental creativity to be able to use it. Innovation happens also through using unorthodox think patterns and that is where Lateral thinking can be of help. Using unorthodox think patterns can be very useful when using SharePoint as a strategic asset because it brings many new things into the organization. A learning organization is often able to see more than its own perspectives. Through learning and adapting it is putting organizational thinking in a wider context and tries to see the whole picture. This ability for a wider view is perhaps comparable with the systems thinking perspective and also with associative thinking, to create better innovative ideas and stimulate creativity. This could be a very profound and useful foundation for a SharePoint implementation or using SharePoint as a strategic asset. When SharePoint is put in a wider context, then often its full potential can enter the consciousness of the organization.

Strategy and Change It is being said that today’s leader needs to be that lateral thinker which is better equipped for fast and discontinuous change. The more conventional leader is better suited for command and control and slow and incremental changes. The lateral leader is more focused on initiating the innovative and creative parts of the team by taking some risks and entrepreneurial endeavor. This should be the driving force behind the strategy around SharePoint. Innovation and creativity are both a natural fit with SharePoint and without these elements using SharePoint within your strategy is asking for rigid troubles. Change is managed by making it happen through innovative subordinates. Followers are important and the vision of change must be constantly communicated to make it a permanent element of the creative and innovative mind of the organization.

35

Figure 14: Strategy and Change Change is an important element of the strategy around SharePoint. This change is often difficult because of organizational culture and heritage of resources. Change even gets worse when there is a top strategic management layer afraid of taking hard decisions and lower layers with a lack of taking accountability for certain actions. These are killing characteristics for a SharePoint strategy. Hard decisions are almost unavoidable when using SharePoint as a strategic asset and SharePoint decisions can flow through all layers. When the raw guts are missing and responsibilities are being avoided at key moments, then be prepared for failure and money down the drain.

Figure 15: Strategy Tree

36

Strategy trees can help to clarify how the elements of the organizational strategy are related to each-other and why they are related in such a way. Furthermore this strategy tree can also make it more clear who is responsible for what and how these responsibilities relate. This strategy tree can be the guidance when choosing SharePoint as strategic asset and the implementation can be followed through all branches and leaves.

Conclusion Figure 16: SharePoint Strategy and Governance Plan Even this short introduction into strategic thinking and strategic leadership related to SharePoint makes it clear that these elements can be beneficial when SharePoint is part of the overall strategy of the organization or if it is implemented on a wide scale. If SharePoint becomes the main platform of communication within the organization, then strategic thinking and strategic leadership do play their separate and important roles. Research show that when a collaboration platform enters the regions where it is of influence on the strategic performance of an organization, if it is not included in the strategic vision and goal formulation it can have a negative effect on the realization of these strategic goals. Having thought about this possible relationship of SharePoint with the strategy of the organization can help avoid many unforeseen problems down the strategic road. It is better to be aware and prepared, than to be ignorant and fall into very frustrating and expensive traps.

Bibliography Beer, M., 2009. High Commitment, High performance. First ed. San Fransisco: Jossey Bass. Bennis, W., 2009. On Becoming a Leader. Second ed. New York: Basic Books. Bennis, W. & Nanus, B., 1997. Leaders; Strategies for taking charge. Second ed. New York: First HarperBusiness. Bono de, E., 1990. Lateral Thinking. Third ed. London: Pinquin books . Chaffee, E. E., 1984. Three Models of Strategy, Boston: Annual meeting of the Academy of Management. Collins, J., 2001. Good to Great. First ed. New York: HarperCollins Publishers. Conger, J. A. & Riggio, R. E., 2007. The Practice of Leadership. First ed. San Fransisco: John Wiley & Sons. 37

de Witt, B. & Meyer, R., 2005. Strategy Synthesis. Third ed. s.l.:Cengage Learning. Garrat, B., 2003. The Fish Rots from the head, The crisis in our board rooms. Second ed. London: Profile Books LTD. Gavetti, G., 2011. The New Psychology of Strategic Leadership. Harvard Business Review, 13(4), pp. 118-125. Grant, R., 2010. Contemporary Strategy Analysis. Seven ed. West Sussex: John Wiley. Hofstadter, D., 2008. A am a strange loop. First ed. Philidelphia: The Perseus Books Group . Holbeche, L., 2006. Understanding Change. First ed. Oxford: ButterworthHeinemann. Hooijberg, R. et al., 2007. Being there even when you are not: leading through strategy, structures, and systems. First ed. Amsterdam: Elsevier. Hughes, R. L. & Blatty, K., 2005. Becoming a Strategic Leader. First ed. San Fransisco: John While & Sons. Johnson, G., Scholes, K. & Whittington, R., 2008. Exploring Corporate Strategy. Eeight ed. Harlow: Prentice Hall. Kaplan, R. S. & Norton, D. P., 2001. The Strategy Focused organization. First ed. Boston: Harvard Business School Press. Liedtka, J. M., 1998. Strategic Thinking; can it be thought?. Long Range Planning, 31(1), pp. 120-129. Mintzberg, H., 1987. Crafting strategy. s.l.:Hardvard Business School. Pardey, D., 2007. Introducing Leadership. First ed. Burlington: ButterworthHeinemann. Porter, M., 1998. On Competition. Six ed. Boston: Harvard Business Press. Senge, P. M., 2006. The Fifth Discipline: the art and practice of the learning organization. Third ed. New York: CrownBroadway Business. Sloane, P., 2003. The Leader’s guide to Lateral Thinking Skills. First ed. London: Kogan Page. Sloan, J., 2006. Learning to think strategically. First ed. Oxford: Elsevier. Yukl, G., 2002 and 2006. Leadership in Organizations. 5th ed. s.l.:Academic Internet Publishers Incorporated. Zaleznik, A., 1977. Managers and Leadsr: Are They Different?. harvard Business review, May/june.

38

Custom Display Templates for the Content Search Web Part by Martin Hatch This article will look at building custom templates for probably the most popular new Web Part in SharePoint 2013 – the Content by Search Web Part. A pleasant departure from the old XSLT approaches these new templates are entirely HTML and JavaScript based.

What are “Display Templates”? Well this is my first article for DIWUG (so please be gentle!) but I have to admit I had to wrack my brains initially when Mirjam asked me what topic I would like to write about, mostly because SharePoint 2013 is such a massive platform now (even more than its predecessors) and has a ton of great new features. But the new Display Templates are so awesome that I couldn’t resist the opportunity to write about them! The new Display Templates are so awesome that I couldn’t resist the opportunity to write about them! For anyone who is familiar with building templates for the old Content by Query Web Parts (CQWP) or Search Results in previous versions of SharePoint you will know it was a laborious (and often painful) experience involving lots of XSLT and fiddling about with XML web part properties. You will be pleased to know that the new experience is vastly improved and entirely composed of HTML and JavaScript (that’s right... no more XSLT!). They are deployed (for some reason) to the Master Page and Page Layout Gallery into a folder called (surprisingly) “Display Templates”. In here you will find all of the standard templates which are deployed with SharePoint 2013 and they will be in two separate formats. HTML files, which are the “designer” files. JavaScript Files, which are generated automatically (from the HTML)

Figure 1: Some CSWP Display Templates in the Master Page Gallery The key thing is that you don’t need to modify the JavaScript files themselves as they will be automatically generated simply by adding an HTML file (or modifying an existing one). You can of course do this by either uploading / deploying a file to the correct folder or by editing it in-place using a tool like SharePoint Designer. This of course makes it fantastically easy to create and modify these templates.

39

A final note on this which is prompted by several conversations I have had with Chris O’Brien (SharePoint MVP and author of www.sharepointnutsandbolts.com) and that is whether or not you should actually deploy the HTML files or not (note - you don’t have to!). If you are creating these as part of a development package then you can actually just deploy the JavaScript file on its own, it really becomes a question of whether you want the template to be editable directly on the environment you are deploying to (which is really the only purpose of the HTML file).

The Content by Search Web Part (CSWP) For anyone who is particularly fond of the Content by Query Web Part (CQWP, from the 2007 and 2010 versions of SharePoint) then this is really the replacement in SharePoint 2013. It is hugely powerful and allows you to pull together information from all over your SharePoint farm because it uses the Search Engine to retrieve content instead of a query based approach. If you want to use the CSWP in your on-premises environment then you are going to need a SharePoint Server 2013 Enterprise edition license (which is also needed for Image Renditions as well). At the moment there is no sign of the CSWP in SharePoint Online (i.e. Office 365) but I was told by the Office 365 team that the Content by Search Web Part is coming to Office 365 soon, just as soon as they finish some more testing around performance and capacity planning (which makes sense as this web part is bound to be popular and if used heavily could put a lot of extra strain on your Search infrastructure!). In fact, the Display Templates can still be found in current Office 365 sites (just the web part itself is missing) so I would expect to be able to use it relatively soon, but watch this space!

40

I was told by the Office 365 team that the Content by Search Web Part is coming to Office 365 soon … The CSWP has a massive amount of flexibility in terms of being able to build custom queries (leveraging the new SharePoint 2013 Search “Result Sources”) which I unfortunately don’t have time to go into here, but the web part does allow you to select both the Display Templates and Property Mappings (as you can see in Figure 2).

Figure 2: Display Template and Property Mappings in the CSWP Properties Control Templates are used to define the rendering around the outside of the results that are being shown in the web part. There are initially three to choose from, a simple “List”, a “List with Paging” (which adds automatic JavaScript paging) and a “Slideshow” (which adds a fade-out / fade-in animated slideshow effect). The Item Templates allow you to choose the rendering for each item in the results, the choices for which are “Large Picture”, several variations on “Picture with 3 lines”, a “Two lines” and a “Video” (which interestingly uses the new HTML5 video element). Once you have picked your Item Template you can then view (and optionally change) the Property Mappings. This basically controls which properties are used for each piece of information used in the item template (such as the Source URL being used for the image, or the Link URL which is used when you click on the item). It is important to remember that these are the names of the Search “Managed Properties” (don’t forget, all of the results are retrieved using Search!). If it isn’t being indexed by Search then you can’t use it. The second thing to realize is that you can specify multiple properties (separated by semi-colons). If the first property has no value then it will automatically move to the second value, and so on until it finds one it can use.

41

And the really good news is that all of these can be modified and added to through your own Custom Display Templates …

Getting Started with your own Display Templates So now we can get on to the good stuff, and you will (hopefully) be pleasantly surprised at how easy this is. Now the first thing to note is that the name of the file won’t have any bearing on the name of your Template, but it does determine the type of template. If your filename starts with “Item” then it will be an item template, and if your file name starts with “Control” then it will be a Control template. For example: Item_MyItemTemplate.html Control_MyControlTemplate.html To get going you are best off taking one of the “out of the box” templates as a starting point and going from there (especially if one of the starting templates provides very similar output). The first thing you should change when you are doing this is the tags in the HTML file. These actually drive the name of the template in the drop-down list when editing the Web Part, the filename has no bearing and there are no checks to ensure that each template has the same name. In fact the first time I tried this I ended up with two “Picture on Left with 3 Lines” templates and the Web Part editing experience didn’t give me any way of knowing which one was which without picking one and looking at the output.

Listing 1: Make sure you set the title for your template, this will be the name which appears in the Web Part editing pane when selecting a template We then have really only two more things you need to know about: Using Property Mappings The HTML and JavaScript bits

Using Property Mappings These are only relevant to Item Templates but are really what makes your templates flexible as they allow the users of your template to pick which Search Properties will be used to render the details in your web part. At the top of the template is an HTML element:

Listing 2: This element at the top of your Template allows you to define your Property Mappings Property Mappings are what makes your templates flexible as they allow the users of your template to pick which Search Properties will be used The value of this element declares your Property Mappings. First you specify the name of your mapping (in quotes) then a colon followed by the name of the Search Managed Property you want to use for the default mapping (if you want to have multiple search properties then you can separate them with semi-colons). Each mappings are then separated by commas.

42

The format of the value is then:

Listing 3: Format of a Property Mapping So for example, if you wanted to create a Property Mapping called “Item Title” which you wanted to map to the “Title” Search property then you would use the following:

Listing 4: An example property mapping called “Item Title”, mapped to the “Title” Search Managed Property If you are lacking inspiration, or just want to get an idea of how these work, then take a look at the out of the box templates which have a large range of different examples to pick from. Once you have your templates then you can use a simple JavaScript function to pull that mapping into a variable (which you can then use and manipulate) using the $getItemValue function.

Listing 5: Example JavaScript loading our “Item Title” mapping into a JavaScript variable

The HTML and JavaScript bits Now this is where the really juicy bits are and you can really go all out with the full power of your JavaScript libraries (yes, including jQuery) and all your HTML and CSS know-how. The really good news is that this is where the really EASY bit is too. The template should have plenty of comments in there which explain how things work (although I’ll walk you through them here)

Listing 6: The comments in the out of the box templates are quite comprehensive You have both the full fidelity of HTML and CSS in its own native format, but also the power of JavaScript to work with your variables So, this means that if you want to put some actual JavaScript on your page (such as declaring functions or manipulating variables) then you state them as follows:

Listing 7: JavaScript code needs wrapping in special tokens

43

Although this is a very neat approach it does also kill off any ability that Visual Studio (or your IDE of choice) has to provide intellisense or error checking (as far as Visual Studio is concerned all your code is in an HTML comment, so it won’t be parsed!). I’m hoping this gets fixed in a future update but I’m not going to hold my breath. So once you’ve declared your variables and run all your functions then you can use them in your HTML, which is incredibly easy:

Listing 8: You can use your JavaScript variables directly in your HTML Once you understand and master this technique you can do pretty much anything you want. You have both the full fidelity of HTML and CSS in its own native format, but also the power of JavaScript to work with your variables (so you can do very easy loops, if statements and casts) which could have been very painful in the old days of trying to write XSLT. One final thing it is worth remembering is that this is all JavaScript, which means everything you are doing will be happening client side. This can have several impacts, one of which is performance (if your client workstation is perhaps a slower machine or running a much older browser). You might also want to consider that the Item Template code will be executed for EACH ITEM in the result set, so if you have a large number of items you might want to be careful and think about how you want to plan for declaring functions or referencing any third party JS libraries. Other than that, the sky’s the limit and I look forward to seeing people (hopefully) sharing all their cool display templates that they have been writing!

Conclusion So that should give you everything you need to get started with building your own Display Templates for the Content Search Web Part. Of course most of these principals are also valid for other Display Templates (such as those used to render Search Results) so this is definitely a technique you are going to want to master. And finally don’t forget to check out all of the templates which come out of the box... they contain a wealth of examples! Have Fun!

44

Optimizing SQL Server 2012 for SharePoint 2013 by Brian Alderman SharePoint stores a significant portion of its information in SQL Server, so it’s important that SQL Server is configured correctly to ensure an optimal integration of the two products and experience for your SharePoint users.

Microsoft SQL Server is the repository for all the content contained in the lists and libraries available in Microsoft SharePoint 2013, as well as the storage location of most SharePoint 2013 configuration information. As a SharePoint administrator, it’s important to understand the integration of these products and also understand how SQL Server’s performance affects SharePoint’s performance. In this article I will describe several SQL Server settings, some that are configured at the SQL Server instance level and others at the system database level that can be configured to optimize the interaction between SQL Server and SharePoint. If you are fortunate enough to have a dedicated database administrator (DBA) you’ll have the knowledge to have a discussion on these topics and determine if any changes need to be made or if they have already made the changes necessary to improve the performance of SharePoint.

Integration of SharePoint 2013 and SQL Server 1012 A large majority of your SharePoint configuration information and content is stored in one of several SQL Server databases in the instance of SQL Server hosting your SharePoint content. The following list contains some of the SharePoint information that is located in these SQL Server databases: Lists Libraries Farm configuration information Central Administration information Service application information Search information Web application information Logging information Reporting Services Global content types Global metadata Information management policy information This will hopefully give you an idea as to why there is such a concern with how you can optimize SQL Server for SharePoint 2013. As I mentioned previously SharePoint 2013 can run on both SQL Server 2012 and SQL Server 2008 R2 SP1, and you’ll be happy to know that this information applies to both versions of SQL Server and also to previous versions of SharePoint. These optimization steps can be applied to most any combination of versions of SQL Server and SharePoint.

45

SQL Server Concepts and Terminology Let’s begin by introducing SQL Server and the components and terminology that will provide the basic understanding of SQL Server. SQL Server is Microsoft’s Relational Database Management System (RDBMS) software that provides integrated data management and analysis software that enables organizations to reliably and confidently manage mission-critical applications like SharePoint. SharePoint 2013 can only be installed using a 64-bit version of SQL Server 2008 R2 SP1 or SQL Server 2012. SQL Server 2012 is the recommended version as it contains the following functionality that SharePoint 2013 can benefit from: Provides new AlwaysOn functionality for high availability Improved performance by optimizing the network traffic between the front end and back end servers with the introduction of Shredded Storage Reduced data redundancy for some features, meaning reduced data storage requirements The SQL Server setup.exe can be run several times on the same Windows server to create separate installations of SQL Server on the same machine. These different installations are referred to as instances. It is recommended that SharePoint has its own instance of SQL Server so you can make configuration changes to it specifically for SharePoint 2013. Each instance has components specific to that instance such as the Database Engine, Analysis Services, and Reporting Services. However, there are also some components shared across all instances on the server including; a single program group (used to access the different SQL Server components on that server), Integration Services, SQL Server Management Studio, and SQL Server Books Online.

SQL Server Databases For each instance of SQL Server that you install there are four System Databases created as you see in Figure 1. Master - contains all SQL Server configuration information for this instance Msdb - contains information used for automating administrative tasks (Jobs, Operators, and Alerts) Model - “template” from which all new databases created, including all SharePoint content databases Tempdb - “work” area used by SQL Server for temporarily storing data during operations like sorting

Figure 1: SQL Server System Databases 46

There are two system databases here that can be configured to optimize SQL Server; model and tempdb. The model database is used as a template for all new user databases including the SharePoint service application databases and the web application content databases. By default there are settings that are applied to the each SharePoint database and can cause performance issues within SharePoint. It is important for you to know that there are three types of files associated with a SQL Server database. Each database will always have two of these files; the third file type is optional and is used only if you want to have multiple data files associated with a single database. The three files associated with a database are Primary data file The primary data file is the starting point of the database and points to the other optional data files in the database. Every database has only one primary data file. The default file name extension for your primary data files is .mdf. Transaction log files Transaction log files hold all data modifications made to the primary data file and can be used to recover the database. You must have at least one log file for each database, although you can have more than one to improve performance. The default file name extension for transaction log files is .ldf. Secondary data files Secondary data files are optional, but they include all other data files associated with a database. The default file name extension for secondary data files is .ndf. Note

SQL Server does not enforce the .mdf, .ndf, and .ldf file name extensions, but the consistency of these file extensions will help you, as well as anyone else who may work with SQL Server, being they can easily identify the different types of files associated with each database. Now that we have an understanding of the integration of SharePoint and some basic concepts, terminology, and component we can address ways to improve SharePoint performance by making configuration changes to some of these SQL Server components. The following sections will discuss what components in SQL Server can be configured to improve your SharePoint performance.

SQL Server Memory Settings SQL Server is a memory-intensive application, and it is selfish when it comes to memory utilization so it’s important to control the amount of memory utilized by each instance of SQL Server. SQL Server has two primary types of memory that it uses: Buffer cache (also called data cache) holds data pages in memory so that frequently accessed data can be retrieved from it. Reading data pages from the buffer cache optimizes performance by minimizing the number of required (I/O) operations, which are inherently slower than retrieving data from memory. Procedure cache holds the stored procedures and query execution plans to minimize the number of times the query plans have to be generated therefore if you are running similar queries repeatedly it will store it in cache which optimizes the future uses of that query.

47

To determine if you have the appropriate amount of RAM allocated to your SQL Server instance, you can monitor the following two SQL Server performance counters. SQL Server: Buffer Manager – Buffer Cache Hit Ratio Percentage of pages found in the DATA buffer without having to read from disk (good > 95%) SQL Server: Cache Manager – Cache Hit Ratio Percentage of pages found in the PROCEDURE cache without having to read from disk (good > 85%). By default, each SQL Server instance accesses the available memory dynamically based on its need and the amount of RAM available. This default setting can have a major impact on the operating system and on other applications, running on the same server, including other instances of SQL Server. When SQL Server is dynamically accessing memory, it queries the system periodically to determine the amount of free physical memory and takes as much as needed to complete the task at hand. If not configured to do otherwise it can cause performance issues for other applications running on that server. To prevent this behavior, you must configure the amount of memory each instance of SQL Server uses by modifying two memory configuration options: min server memory and max server memory on each instance of SQL Server as shown in Figure 2. min server memory by default is 0, which means it will release memory back to the operating system when it finishes using it. max server memory by default is 2147483647 MB, (no server I have worked with has that much memory) which means it will request all memory available as it needs it to complete the SQL Server operations.

Figure 2: SQL Server Instance Memory Settings

48

The configuration of these two settings can be used to prevent SQL Server from releasing too much memory only to have to request it again later, and it can also prevent SQL Server from requesting too much memory. To avoid this problem you can set the min server memory and max server memory options to the same value, which corresponds to a fixed amount of memory allocated to the SQL Server buffer pool after the value is reached. Note

SQL Server will not automatically receive the memory setting configured for min server memory, it will only receive additional memory as requested until it reaches that setting, and will not release memory to allow it to fall below that amount once it’s reached.

Default Database Files Location By default, your SharePoint database files are created on the C drive of the server where SQL Server is install in the following directory. C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\ To improve performance and provide redundancy for your SharePoint content, you will want to place the database files elsewhere. You should place your data and transaction log files on a separate physical drives or on a RAID 5 or RAID 10 array to provide redundancy and avoid the loss of data should there be a disk failure.

Figure 3: Changing the Database default locations for new database files using Database Settings

49

To specify the location of database files for new databases, you can modify the SQL Server Database Default Locations settings as shown in Figure 3. This will not affect the current databases, you will have to manually move them if you need to do so. Check out the following article to move your current database files: http://msdn.microsoft.com/en-us/library/ms189133.aspx This screenshot is for SQL Server 2012, SQL Server 2008 does not have a default database location setting for backups.

Model Database Default Settings All new SharePoint databases will inherit most model database properties. For instance, if you create a new service application, web application, or add a content database to an existing web application using PowerShell or from within Central Administration, the new database will inherit the following properties from the Model database. Initial Size of primary data file Initial Size of transaction log Recovery model Most often the default settings of the model are not adequate for the SharePoint databases you’ll create. Figure 4 shows the default Files properties for the model database.

Figure 4: Model database default Files settings There are a couple performance concerns with these default database Files settings; the Initial Size values are small and the Autogrowth / Maxsize values are small. You may be wondering why it is important to consider the value of these settings before you create new databases.

50

Being the Initial Size setting for new databases file is small and the Autogrowth option is enabled, and is also small whenever you add content to a SharePoint database where there isn’t enough available space, SQL Server has to expand it using the incremental value in the Autogrowth setting. For instance, if you were to upload a 10 MB file into this database using the default Initial Size and Autogrowth settings, SQL Server would have to lock the database 8 to 10 times to grow the data file in 1-MB increments until there was enough room in the database file to accept the 10-MB file you’re uploading. Furthermore, because the Log file Initial Size is small and its Autogrowth setting is set to 10 percent, this file would also have to grow to accept the file being uploaded. On top of the performance hit every time it needs to stop and grow, it causes fragmentation of your hard drive each time these files are enlarged in the default 1-MB increments. As you can imagine, this can have an enormous impact on your SharePoint performance. The idea is to create the initial size large enough to not have to use the Autogrowth option. It is a nice to have in place so it won’t prevent the users from adding content, but because of the risk it should be thought more as an insurance policy, it’s there for emergencies. To avoid the automatic growing of your files, you need to carefully analyze how much information will be stored in your SharePoint databases, as well as how much information will be added, modified, or deleted within these databases. Using the outcome of your analyses you can then modify the Initial Size setting in the Model database for both the data file and the log file. After you make the changes to the model database, all new databases will begin with the new Initial Size value, which will eliminate—or at least reduce the need for Autogrowth to occur. There is no magic number that is best for the Initial Size setting of the content databases; you must perform a careful analysis to make that determination to meet the business needs. However, there is a best practice indicated by Microsoft that the size of your content databases should not exceed 200 GB. This is a soft limit that has been identified as the size that will increase the chances of performing data recovery in less than four hours. The database transaction log initial size is normally set to 25 percent of the size of the associated data file. Unlike the Initial size settings of the database file and the transaction log file, even if you configure the Model database with specific Autogrowth settings, they will not be applied to new databases created from SharePoint. However, if the database is created from within SQL Server the Autogrowth setting will be applied, a bit of a gotcha. With that said, if you create a database from within SharePoint you’ll have to talk to your DBA and ask them to change the Autogrowth setting on the new database if you anticipate it may be needed in the future.

Tempdb Database Settings SharePoint performance can also be improved with a properly configured Tempdb database. The Tempdb database is the temporary work storage area that is used when sorting content, and its location and configuration can impact SQL Server performance and ultimately SharePoint’s performance. Similar to the Model database, the location, Initial Size, and Autogrowth settings for the Tempdb database can affect your overall SharePoint performance. There are some guidelines for suggested Autogrowth for your tempdb database in Table 1.

Table 1: Suggested Tempdb File Growth Increments

51

Make similar modifications to the Tempdb database as those suggested for the Model database. The Tempdb database is cleared out each time you stop and start your SQL Server instance, so if it isn’t properly configured, it will experience the same growth issues as the Model database, causing performance issues for your users. The following list contains recommendations for optimizing your Tempdb database in your production environment. Place the Tempdb database on the fastest I/O subsystem available. Use disk striping if there are many directly attached disks. If possible, store the tempdb database on a RAID 10 disk array. Pre-allocate space for your Tempdb files by setting the Initial File size to a larger value so it can accommodate the typical workload in your environment. Create multiple data files to maximize disk bandwidth. This reduces Tempdb storage contention and yields better scalability. Make each of these .ndf files the same size; this allows for optimal proportional-fill performance. Allow your Tempdb files to grow automatically as needed. Set the file growth increment to a reasonable size to prevent the database files from growing in small increments. Put the Tempdb database on disks other than those used by your content databases. Set the recovery model to simple, which is the default. This will automatically reclaim transaction log space and keep the space requirements to a minimum. If you can separate only one database from the rest, make it your Tempdb, because SharePoint performs reads and writes to it constantly. Your SharePoint installation can’t be faster than your Tempdb database.

Summary This article provides suggested modifications to improve the overall performance of the SQL Server instance hosting your SharePoint content. You should make the appropriate changes to the minimum and maximum memory settings, and change the default location of your database and transaction log files. You should also modify the Files settings on the model primary database file and transaction log files to reflect larger initial sizes and appropriate Autogrowth settings on newly created databases. Lastly be sure you configure the Tempdb database as discussed as that will be instrumental to improving your SharePoint performance.

52

Enterprise Social Case Management, where Workflow and User Engagement meet by Marc Vanderheyden Many managers are still hesitating to allow Social Media into their organization. Social media as we know it from Facebook and Twitter seem too futile and meaningless in an enterprise context. This article explains how Enterprise Social Computing (ESC) in SharePoint 2013 and/or Yammer can help any organization to achieve its goals for instance by integrating conversations into the business processes and the line-of-business applications. Particular attention is paid to the integration of ESC in workflows and Case Management solutions in SharePoint 2013 and/or Yammer.

What is User Engagement? A large part of the users – in a SharePoint context - are of the type ‘knowledge workers’. The main characteristic of knowledge workers is that they have to interpret the information they receive and decide on how to proceed with it. In other words, knowledge workers are almost the opposite of routine workers. “User Engagement: Empowering business by focusing from the ‘user down’, not the ‘system up’.” - Deloitte Over the last 10 years the focus of IT was on knowledge work (as opposed to the focus on transactional work in ERPs in the years before that). The conclusion of IT developments for knowledge workers was that we need much more flexibility on one hand, and more integration on the other. In order to do their daily job knowledge workers have to switch between multitudes of IT systems (from e-mail to transactional systems, from document management systems to decision support systems, etc.). That is very time-consuming and inefficient. Since recently the term ‘Systems of Engagement’ is used to identify the evolution from isolated IT systems (from an end-user’s perspective) to IT systems that interact with each other and with the user. “Basically, Systems of Engagement refers to the transition from current enterprise systems designed around discrete pieces of information (‘records’) to systems which are more decentralized, incorporate technologies which encourage peer interactions, and which often leverage cloud technologies to provide the capabilities to enable those interactions.” - IBM Systems of Engagement are the opposite of Systems of Record which provide isolated silos of data.

What is Enterprise Social Computing (ESC)? Enterprise Social Computing is the use of social networks within the Enterprise. You could say: “it is the ‘Facebook for enterprises’”, but then I would emphasize the main reason why management is reluctant to introduce social computing in the enterprise: the fact that it seems futile and a loss of valuable time and company resources. The next paragraph will tackle that misunderstanding.

53

The definition of ESC is the combination of software and behavior of employees to initiate and hold conversations in an open community of people with similar interests. The software to accommodate this must have features like: creating interest groups and becoming member of a group, initiating a conversation, replying in a conversation, ‘liking’ messages, rewarding people for valuable input (give ‘kudos’ in ESC-speak), ‘following’ groups, tags, people or documents, having a personal portal to keep track of conversations you are following and last but not least: a search engine that allows you to find conversations. Enterprise Social Computing is the combination of software and behavior of employees to initiate and hold conversations in an open community of people with similar interests. In an enterprise context two ESC tools are top-of-mind: Yammer and SharePoint 2013.

How to create value with Enterprise Social Computing? Management doesn’t like social media. Their opinion is biased by how social media as they know it from Facebook and Twitter are used. They see mainly two reasons for not liking it: it is too much ‘me’-oriented and it is obvious that you can’t create business value with it. Can we turn these disadvantages into advantages? Social media: too ‘me’-oriented, and no apparent business value? Too much ‘me’-oriented? In the end every individual in an organization is responsible for executing his or her job in a correct way. So if you would be able to use the social computing mechanisms to support individual responsibilities, wouldn’t that be great? ESC doesn’t create business value? There are roughly 5 ways to create business value in an organization: 1. Increase revenue, 2. Lower costs, 3. Improve quality, 4. Improve or speed-up innovation, 5. Motivate employees There is your answer: when introducing social media into the enterprise, make sure to do it with the explicit intention of becoming better in one of these 5 areas. That is all the more possible because of a fundamental property of ESC: it is an open communication mechanism. This means that you communicate with a group of people without knowing exactly who is participating in the group. This will lead very often to faster responses of higher quality (providing the participants understand your objectives). Compare this to the more traditional way of working in which you send an e-mail to the person or people you think have an answer to your question. It is obvious that the success of Enterprise Social Computing depends largely on the relevance of the discussions in the groups. This relevance can be increased in two ways: By defining communities with a common interest By integrating ESC in the Line-of-Business Applications (LOB).

54

Communities with a common interest It is not possible to go too deep into the discussion on a typology of social groups (and therefore of ESC implementations) in the context of this article. Moritz Berger of Microsoft identifies the following types of ESC: User-centric: this is ‘social media as we know it’ in which the individual can publish and promote himself; MySites is the mechanism of SharePoint for this type of ESC Group-centric: this is new; what if we would see ‘groups’ in the enterprise as individuals? What if groups could promote and publish themselves; the easiest way to imagine this is to look at existing formal groups in the organization: departments, project teams, etc. Application-centric: what if all users of a given application would form a community on your ESC-platform? Marketing-centric: this is mainly the use of ESC to push information to the organization; compare it to publishing news items on the intranet, with the difference that in a ESC-context, you will be able to see the reactions of the audiences of your news items My favorite derived type of community from this typology is Process-centric ESC in which all people working in a specific Business Process participate in a process-centric group.

Integration with LOB Applications A second ‘condition precedent’ to the success of social media in the enterprise is its integration with the Line-of-Business systems. What is the subject employees mostly talk about in their job context? Customers, offers, products, orders, projects, etc. in other words ‘business objects’. There are two integration directions: Show conversations in a ‘business object’-context Initiate a conversation from a ‘business object’-context.

Figure 1: 2-Way integration between ESC and LOB Application Imagine that you could display conversations about a customer when you look at the customer data in your CRM system, or see the conversation about a case when you look at the documents of that case in your case management system: wouldn’t that be a big added value to the users? Or imaging that when looking at a proposal, you might want to initiate a conversation about that proposal? But instead of having to start up your ESC-application yourself, you would be able to start the conversation from within your LOB-application: wouldn’t that be a big added value to the users?

55

Enterprise Social Computing in a process context Companies create value through business processes. Core processes helps an organization to bring products and services to its end-customers, while supporting processes help the organization to operate smoothly and efficiently. When describing and documenting business processes, one normally identifies only the formal steps of the process, i.e. the steps that you want to track and measure, steps that you want to integrate in software, etc. But we all know that in many information processes a lot of informal communication occurs. That informal communication is hardly ever documented in the processes: e.g. when writing the requirements for application the analyst has e-mail or telephone contact with users, but that is not documented as a separate step in the process; it is part of writing the document. What role can ESC have in a process context? Well, ESC can support these moments of informal communication in business processes and by doing so, making them more visible and reusable. There are two patterns: In-process help Free-flow process step

In-process help What happens when an employee has a question about the work he is asked to do (when he is asked to execute an activity in a process context)? For example: ‘Assess a purchase request’. He might talk to a colleague sitting next to him, or call someone on the phone. In any case he will ask the question to someone he knows and of which he thinks that this person might have the answer. What if this employee would post his question in an open group on the Enterprise Social Computing platform? First of all more people would be able to help AND you might get more correct and better answers!

Example: A group of HR-people working in different geographical locations. The experience of a group in one location could be used by another location. This hardly ever happens in the traditional way of working.

Figure 2: In-process help

56

And if one would use hash tags to add some context information to the conversation, the answers could be used in the future to help other employees having the same question. A side effect is that Enterprise Social Computing can help to surface the (recurring) questions people have about their daily job that would otherwise be buried in mailboxes or lost in telephone calls; this information can help to improve the process.

Free-flow process step There are many business processes that are partly formal and partly informal. Take the example of a tendering process in which people work together on a proposal as an answer to a Request for Proposal (RFP) that the organization received from a customer. At some point after the decision is made to answer the RFP a number of people will start to write a document simultaneously, each with a responsibility for different chapters of the document. During that writing process they will probably discuss various items with each other, without following the formalized steps of a process. Without social media those conversations would be hidden in exchanged e-mails, or untraceable all together in telephone conversations. If the conversations about the writing of the document would be held in a community group in which all the project members working on the document would participate these conversations would be visible to everyone now and in the future. This is especially valuable for project members who work at different locations or when members join the team later in the project.

Figure 3: Free-flow process step The group would continue to work informally on the document until they agree that it is ready for review and approval. At that moment, the business process would continue as a formal process with a formal approval step.

Workflow and Enterprise Social Media In the future, workflows should embrace Enterprise Social Media and integrate it. A typical integration function might be that whenever a workflow task is assigned to a user, a feed is written to a conversation about that workflow. That way, all group members are informed about the activity in the workflow, and conversations can be started immediately in the right context.

57

Another useful integration would be that a conversation can be initiated from the task screen by the user. In this case the workflow tool can make sure to pass the right context information to the conversation feed.

Enterprise Social Computing and Case Management Why is Enterprise Social Computing relevant in a Case Management context? The integration of Case Management and ESC is a perfect example of the value that can be obtained with social media in the enterprise. Case Management is a combination of a business object - the case- with a business process - the workflow that supports the processing of the case. Therefore by enhancing your Case Management solutions with ESC, you create a ‘System of Engagement’: By displaying the ESC conversation about the case on the Case Overview screen, you add important information to the case By allowing a user to initiate or participate in an ESC conversation, you make life a lot easier to him. Social conversations add a type of information to the case that until now remained hidden in exchanged e-mails or telephone conversations. It is important to understand that ‘conversations’ are becoming an important piece of information in relation with the case: they help to make the processing of the case more efficient and more transparent, they add a type of information to the case that until now remained hidden in exchanged e-mail or telephone conversations. Figure 4 shows an example of a conversation (an Activity Feed in SharePoint 2013) as part of a case.

Figure 4: Conversation feed as part of a Case As explained in the paragraph “Enterprise Social Computing in a process context” there are two ways to enhance the processing of a case: By allowing a user to seek help via a community By introducing free-flow steps into your workflow to allow flexible collaboration.

58

Both patterns can be implemented with SharePoint and/or Yammer resulting in a new flavor of case management: Social Case Management. Therefore there is no reason why you shouldn’t start integrating ESC in your workflows right now.

Social Case Management with SharePoint 2013 and Yammer SharePoint 2013 and Yammer are the ideal technologies to implement Social Case Management. Both have integration functions that allow you to retrieve conversations related to a specific context (read ‘business object’) on one hand, or to post to conversations in specific groups or communities while passing the context to which the conversation element refers (read ‘business object’).

Enterprise Social Computing and SharePoint 2013 SharePoint 2013 has everything to implement Enterprise Social Computing: Communities Feeds Liking messages Rewarding people for valuable input (give kudos in ESC-speak), Following groups, tags, people or documents, MySite: a personal portal to keep track of conversations you are following A powerful search engine that allows you amongst others to find conversations on a specific context. The development model of SharePoint also allows you to retrieve (parts of) conversations related to a given topic (tag) and display the conversation in a different context. The model also allows you to write to a conversation in a group from within an external context (e.g. from a LOB application).

Enterprise Social Computing and Yammer Yammer also has all the functions to implement Enterprise Social Computing, although the terminology may differ slightly: Groups Conversations Liking messages Rewarding people for valuable input (give kudos in ESC-speak), Following groups, tags, people or documents, Personal Home Page: a personal portal to keep track of conversations you are following A search engine to find people, groups and conversations. To display data from Yammer in your HTML based LOB application, Yammer provides embeddable JavaScript widgets that display a snapshot of a specified feed and function as a scaled-down version of Yammer. In order to post information from your LOB application to Yammer, you should use the OpenGraph mechanism as shown in listing 1.

Listing 1: OpenGraph Yammer

59

This activity will be displayed in engaging ways to the user’s Yammer network. People in the network can click through the activity into your application.

Conclusion Enterprise Social Computing can add a lot of value to an organization provided it is implemented correctly. There are two key success factors for a successful implementation: 1) creating meaningful groups or communities, and 2) developing a two-way integration between ESC and your LOB applications. Integrating Enterprise Social Computing and Case Management is a good example of a creating a ‘System of Engagement’ to support the knowledge workers in their daily job, resulting in a new type of Case Management: ‘Social Case Management’. SharePoint and Yammer are the ideal tools to enhance your Case Management with Enterprise Social Computing.

About the Authors

60

61

62