Developing Microsoft SharePoint Server 2
Developing Microsoft SharePoint Server 2
20489B
Developing Microsoft® SharePoint® Server
2013 Advanced Solutions
Information in this document, including URL and other Internet Web site references, is subject to change
without notice. Unless otherwise noted, the example companies, organizations, products, domain names,
e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with
any real company, organization, product, domain name, e-mail address, logo, person, place or event is
intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the
user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in
or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical,
photocopying, recording, or otherwise), or for any purpose, without the express written permission of
Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property
rights covering subject matter in this document. Except as expressly provided in any written license
agreement from Microsoft, the furnishing of this document does not give you any license to these
patents, trademarks, copyrights, or other intellectual property.
The names of manufacturers, products, or URLs are provided for informational purposes only and
Microsoft makes no representations and warranties, either expressed, implied, or statutory, regarding
these manufacturers or the use of the products with any Microsoft technologies. The inclusion of a
manufacturer or product does not imply endorsement of Microsoft of the manufacturer or product. Links
may be provided to third party sites. Such sites are not under the control of Microsoft and Microsoft is not
responsible for the contents of any linked site or any link contained in a linked site, or any changes or
updates to such sites. Microsoft is not responsible for webcasting or any other form of transmission
received from any linked site. Microsoft is providing these links to you only as a convenience, and the
inclusion of any link does not imply endorsement of Microsoft of the site or the products contained
therein.
© 2013 Microsoft Corporation. All rights reserved.
Released: 11/2013
Creating Robust and Efficient Apps for SharePoint 1-1
Module 1
Creating Robust and Efficient Apps for SharePoint
Contents:
Lesson 1: Apps for SharePoint 2
Lesson 1
Apps for SharePoint
Contents:
Resources 3
Demonstration: Exploring an App Package 3
Creating Robust and Efficient Apps for SharePoint 1-3
Resources
Fundamentals of Apps for SharePoint
Additional Reading: For more information on hosting models, see Choose patterns for
developing and hosting your app for SharePoint at
http://go.microsoft.com/fwlink/?LinkId=320734
Additional Reading: For more information on app webs and host webs, including app
prefixes and app IDs, see Host webs, app webs, and SharePoint components in SharePoint 2013 at
http://go.microsoft.com/fwlink/?LinkId=320735
3. Review the contents of the app manifest, noting in particular the Start page setting.
5. If you are prompted for credentials, log in as CONTOSO\Administrator with password Pa$$w0rd.
6. On the Site Suggestions page, in the Subject box, type the title of a suggestion.
7. In the Feedback box, type a sentence, and then click Submit Suggestion.
8. Below Here are the current suggestions, click the title of your suggestion.
15. Append .zip to the file extension, and then press Enter.
18. In the Extract Compressed (Zipped) Folders dialog box, click Extract.
19. Point out that, among other things, the app package contains an app manifest file (AppManifest.xml),
and a SharePoint solution package (SiteSuggestionsApp.wsp).
22. Review the contents of the published app manifest, and then close the file.
24. Append .cab to the file extension, and then press Enter.
27. Explore the contents of the solution package. Point out that the solution package contains all the
resources that are deployed to the app web, including pages, JavaScript files, CSS files, a Feature.xml
file, and feature manifests for each of the declarative components (site columns, content types, and
list instances).
Lesson 2
Communicating with SharePoint from an App
Contents:
Resources 6
1-6 Developing Microsoft SharePoint Server 2013 Advanced Solutions
Resources
Developing Robust JavaScript Code
Additional Reading: For more information on strict mode, see Strict Mode (JavaScript) at
http://go.microsoft.com/fwlink/?linkId=320736
Creating Robust and Efficient Apps for SharePoint 1-7
Lesson 3
Authenticating and Authorizing Apps for SharePoint
Contents:
Resources 8
1-8 Developing Microsoft SharePoint Server 2013 Advanced Solutions
Resources
Requesting Permissions
Additional Reading: For a comprehensive list of Scope URI values and the corresponding
available rights, see App permissions in SharePoint 2013 at
http://go.microsoft.com/fwlink/?LinkId=320738
Creating Robust and Efficient Apps for SharePoint 1-9
Answer: The App Management Service and the Subscription Settings Service.
Question: True or false: the REST API supports only CRUDQ data operations.
( ) True
( ) False
Answer:
( ) True
(√) False
Question: When you install an app for SharePoint, you must grant it all of the permissions it requests or
cancel the installation. Why does SharePoint not allow you to grant permissions selectively to apps?
Question: When you develop an app for SharePoint, at what points in your code should you consider
requesting a health score from the SharePoint server?
Answer: You should consider requesting a health score before you submit requests that may
demand a large amount of server resources, such as large list queries.
Developing Managed Metadata Solutions 2-1
Module 2
Developing Managed Metadata Solutions
Contents:
Lesson 2: Configuring Managed Metadata Term Sets 2
Lesson 2
Configuring Managed Metadata Term Sets
Contents:
Demonstration: Building a Term Set with the Server-Side Object Model 3
Developing Managed Metadata Solutions 2-3
2. In the Reference Manager - TermSetCreator dialog box, under Assemblies, click Extensions.
3. In the list of assemblies, click Microsoft.SharePoint, and then select the check box that appears.
4. In Solution Explorer, double-click Program.cs, and then locate the following line of code:
using System.Threading.Tasks;
5. Immediately after the located code, insert the following lines of code:
using Microsoft.SharePoint;
11. Replace the located code with the following line of code:
12. Locate the following line of code:
13. Replace the located code with the following line of code:
15. Replace the located code with the following line of code:
17. Replace the located code with the following line of code:
19. Replace the located code with the following line of code:
2-4 Developing Microsoft SharePoint Server 2013 Advanced Solutions
21. Replace the located code with the following line of code:
23. Replace the located code with the following line of code:
25. On the Windows Start screen, type SharePoint, and then click SharePoint 2013 Central
Administration.
Answer: Copy the "Sales Lead" term and then move it to the Sales term set.
Question: True or False: When you create a managed metadata site column, you can control the term set
that users pick terms from.
( ) True
( ) False
Answer:
(√) True
( ) False
Interacting with the Search Service 3-1
Module 3
Interacting with the Search Service
Contents:
Lesson 1: Understanding the SharePoint 2013 Search Service 2
Lesson 1
Understanding the SharePoint 2013 Search Service
Contents:
Resources 3
Demonstration: Exploring the Search Architecture 3
Demonstration: Exploring Crawl and Managed Properties 4
Demonstration: Exploring the Search Schema 4
Interacting with the Search Service 3-3
Resources
Crawled Properties
Managed Properties
Additional Reading: For more information on how to create managed properties by using
Windows PowerShell, see New-SPEnterpriseSearchMetadataManagedProperty at
http://go.microsoft.com/fwlink/?LinkId=321930.
3. On the Start screen, type SharePoint, and then click SharePoint 2013 Central Administration.
4. On the Central Administration web site, under Application Management, click Manage service
applications
5. On the Manage Service Applications page, in the Search Service Application row, click Contoso
Search.
6. Review the Search Administration page. Point out the Search Application Topology section and
how each role is assigned to a single server. Also point out how you cannot change the topology by
using the administration web site in SharePoint 2013; this must be done by using Windows
PowerShell.
8. In the Task Manage dialog box, click More details. On the Details tab, review the processes that are
running as noderunner.exe.
10. In the Services window, right-click SharePoint Search Host Controller, and then click Stop.
13. Under Search Application Topology, point out that the admin component is not running.
14. Switch to Task Manager.
15. Notice how all the noderunner.exe processes have been removed.
17. Right-click SharePoint Search Host Controller, and then click Start.
19. Press F5 until you see the services slowly come back up under Search Application Topology.
20. Switch to Task Manager. You should now see the noderunner.exe processes have started again.
3. On the Start screen, type SharePoint, and then click SharePoint 2013 Central Administration.
4. On the Central Administration web site, under Application Management, click Manage service
applications.
5. On the Manage Service Application page, click Contoso Search.
6. In the Quick Launch menu, under Queries and Results, click Search Schema.
7. In the Filter section, in the Managed property box, type author, and then click apply.
9. On the Edit Managed Property - Author page, review each of the settings for the managed
property.
10. Specifically notice the Mappings to crawled properties section and how there are several mapped to
this single managed property, and then click OK.
11. In the navigation at the top of the page, click the Crawled Properties link.
13. In the Crawled properties box, type name, and then click apply.
14. In the Crawled properties list, click the People:AccountName crawled property.
15. In the Include in full-text index section, select the Include in full-text index check box, and then
click OK.
16. In the navigation at the top of the page, click the Categories link.
17. You should be presented with a list of crawled property categories, and how many exist in each
category.
6. Under Search, click Schema. Notice that you have no ability to create a managed property at this
level.
7. Click Back to Site Settings.
10. On the Add Result Source page, in the Name box, type Tasks (Site), and then click Save.
11. On the Manage Result Sources page, click the Settings icon, and then click Site settings.
14. On the New Managed Property page, in the Property name box, type Classification.
15. In the Type section, observe that you can only add Text and Yes/No property types. Review the rest
of the page and observe that you cannot specify multiple values and you cannot add it as a refiner or
sortable managed property. Click OK.
16. On the Site Collection Administration - Managed Properties page, click the Settings icon, then
click Site settings.
17. Under Site Collection Administration, click Search Result Sources. Notice that the Tasks (Site)
result type is not visible.
18. On the Manage Result Source page, click New Result Source.
19. On the Add Result Source page, in the Name box, type Tasks (SiteCol), and then click Save.
20. On the Managed Result Sources page, click the Settings icon, and then click Site settings.
22. On the Site Collection Administration - Managed Properties page, in the Managed property
box, type Classification, and then click apply. You should now see your site collection property in
the Managed Properties list.
23. Click the Settings icon, and then click Site settings.
24. Under Search, click Result Sources. In the Result Sources list you should see the Tasks (SiteCol) site
collection result source.
25. On the Start screen, type SharePoint, and then click SharePoint 2013 Central Administration.
28. On the Quick Launch menu, under Queries and Results, click Result Sources. You should not see
the site collection or site level result sources created previously, as they are out of scope.
Lesson 2
Building Search Queries with KQL and FQL
Contents:
Resources 7
Interacting with the Search Service 3-7
Resources
FAST Query Language (FQL) Queries
Additional Reading: For more information on FAST Query Language, see FAST Query
Language (FQL) syntax reference at http://go.microsoft.com/fwlink/?LinkId=321932.
3-8 Developing Microsoft SharePoint Server 2013 Advanced Solutions
Lesson 3
Executing Search Queries from Code
Contents:
Resources 9
Demonstration: Server Side Object Model 9
Demonstration: Client Side Object Model 9
Demonstration: Executing FQL Queries 10
Interacting with the Search Service 3-9
Resources
Executing Server-Side Queries
Additional Reading: For more information on the available properties and endpoints, see
SharePoint Search REST API overview at http://go.microsoft.com/fwlink/?LinkId=321935.
5. In the How do you want to open this type of file (.sln)? dialog box, click Microsoft Visual Studio
Version Selector.
7. In the Form1.cs code file, review the button1_Click method. Notice that the calls are being made by
using the Server Side Object Model. Also point out the possibility of getting back multiple result
tables.
6. In the Form1.cs code page, review the button1_Click method. Notice that the calls are being made
by using the Client Side Object Model classes that look exactly like the service-side object model. Also
point out the possibility of getting multiple result tables back.
3-10 Developing Microsoft SharePoint Server 2013 Advanced Solutions
8. In the Form1 window, in the text box, type Contoso, and then click Search. You should get results
back in the grid view. Please note that this may take some time.
4. In the Address bar, type the following URL, and then press Enter:
http://search.contoso.com/_api/search/query?querytext='Sharepoint'&enablefql=true
5. Notice that you receive an HTTP 500 error. This is because the default result source has a KQL query
expression as its query transform.
6. On the Start screen, type SharePoint, and then click SharePoint 2013 Central Administration.
7. Under Application Management, click Manage service applications.
9. On the Quick Launch menu, under Queries and Results, click Result Sources.
10. On the Manage Result Sources page, click New Result Source.
11. On the Add Result Source page, in the Name box, type FQL.
12. In the Query Transform section, clear the Query Transform text box, and then click Save.
13. On the Manage Result Sources page, under Defined for this search service (1), point to FQL, click
the drop-down arrow, and then click Set as Default.
15. Press F5 to refresh the page. You should now see results using the FQL query.
17. On the Manage Result Sources page, under Provided by SharePoint (16), point to Local
SharePoint Results, click the drop-down arrow, and then click Set as Default.
( ) Administration
( ) Content Processing
( ) Analytics
( ) Crawler
( ) Index
Answer:
( ) Administration
( ) Content Processing
( ) Analytics
(√) Crawler
( ) Index
Question: Which of the following search queries will return all Word documents modified after 1/1/2013?
( ) Docx AND 1/1/2013
Answer:
( ) Docx AND 1/1/2013
Question: What is the maximum query length of a search query when using the user interface?
( ) 1,024
( ) 512
( ) 2,048
( ) 4,096
( ) 256
Answer:
( ) 1,024
( ) 512
(√) 2,048
( ) 4,096
( ) 256
Question: What permission does an App for SharePoint need in order to execute search queries?
( ) Search, QueryAsUserIgnoreAppPrincipal
( ) Web, FullControl
Answer:
Module 4
Customizing the Search Experience
Contents:
Lesson 1: Customizing Query Processing 2
Lesson 1
Customizing Query Processing
Contents:
Demonstration: Creating Result Sources with Query Transforms 3
Demonstration: Query Rules 3
Customizing the Search Experience 4-3
5. On the Contoso Team Site home page, click Settings, and then click Site settings.
12. In the How do you want to open this type of file (.sln) dialog box, click Visual Studio 2012.
13. In Visual Studio, in Solution Explorer, double-click Program.cs. Review the code, point out each of
the steps that are required to get a Search context, and also that this result source is scoped at a site
collection level. Note the way to create the QueryTransformProperties object. Be sure to mention
that after all items have been set, you make a call to Commit to save your changes.
14. On the DEBUG menu, click Start Debugging.
16. Click the My Custom Source result source. Point out that the Query template is now populated, and
then click Launch Query Builder.
17. In the Build Your Query dialog box, click the SORTING tab, point out that the sort is now based on
the LastModifiedTime in descending order, and then click Cancel.
7. On the Manage Query Rules page, in the Select a Result Source list, click Local SharePoint
Results (System).
9. On the Add Query Rule page, in the Rule name box, type SharePoint.
10. Click the Context link to expand the context configuration section.
12. In the Query Conditions section, in the Query exactly matches one of these phrases (semi-colon
separated) box, type SharePoint.
13. In the Actions section, click the Add Promoted Result link.
14. In the Add Promoted Result dialog box, in the Title box, type Microsoft SharePoint.
15. In the URL box, type http://www.microsoft.com/sharepoint, and then click Save.
16. On the Add Query Rule page, click the Publishing link to expand the publishing section.
17. For the Start Date, click the calendar icon, and then click today’s date.
18. For the End Date, click the calendar icon, click one week from today, and then click Save.
19. Click the Contoso Search link.
20. On the Search homepage, in the text box, type SharePoint, and then press Enter. You should see the
promoted result at the top of the page.
Lesson 2
Customizing Search Results
Contents:
Demonstration: Display Templates 6
Demonstration: Creating and Configuring Refiners 6
4-6 Developing Microsoft SharePoint Server 2013 Advanced Solutions
8. On the Add Result Type page, in the Give it a name box, type Word Documents.
9. Click Show more conditions to expand the advanced conditions area.
10. In the Which custom properties should match? list, click FileType.
14. In the What should these result look like? list, click Office Document Item, and then click Save.
15. Close Internet Explorer.
6. In the quick launch section, under Queries and Results, click Search Schema.
7. In the Managed property box, type Author, and then press Enter.
9. Note the Refinable property is set to Yes - active; this allows the property to be used as a refiner
10. Open a new browser tab, in the address bar, type http://search.contoso.com, and then press Enter.
11. On the Search home page, in the text box, type SharePoint, and then press Enter.
12. On the results page, click Settings, and then click Edit page.
13. In the Navigation Zone section, click the Refinement Web Part Menu drop-down arrow, and then
click Edit Web Part.
15. In the Refinement configuration for ‘Refinement’ dialog box, there is a list of all available
managed properties for use as a refiner. You should also see the default set of refiners, including the
DisplayAuthor managed property.
16. In the Selected refiners list, click DisplayAuthor, and notice how the configuration area changes.
17. In the Display name box, type Author, and then click OK.
Lesson 3
Customizing Content Processing
Contents:
Resources 8
Customizing the Search Experience 4-9
Resources
Creating and Deploying a Thesaurus
Reference Links: For more information on the supported languages, see Create and
deploy a thesaurus in SharePoint Server 2013 at http://go.microsoft.com/fwlink/?LinkId=321936
4-10 Developing Microsoft SharePoint Server 2013 Advanced Solutions
( ) Search Results
( ) Content Query
( ) Refinement
( ) Search Textbox
( ) Search Navigation
Answer:
( ) Content Query
( ) Refinement
( ) Search Textbox
( ) Search Navigation
( ) Entity extractors
( ) Thesaurus
( ) Content Enrichment Service
( ) Display Template
( ) Entity extractors
( ) Thesaurus
( ) Display Template
Question: True or False: You can create result types at the Service Application level.
( ) True
( ) False
Answer:
( ) True
(√) False
Customizing the Search Experience 4-11
Question: True or False: Setting the refinable property will make the refinement web part display the
refiner in search results.
( ) True
( ) False
Answer:
( ) True
(√) False
4-12 Developing Microsoft SharePoint Server 2013 Advanced Solutions
Answer: Four
Question: What must you do after registering the entity extractor file?
Answer: Set up the managed properties to use the entity extractor and then do a full crawl.
Implementing Enterprise Content Management 5-1
Module 5
Implementing Enterprise Content Management
Contents:
Lesson 2: Working with Content Management 2
Lesson 2
Working with Content Management
Contents:
Demonstration: Creating and Exporting a Policy 3
Implementing Enterprise Content Management 5-3
3. On the Edit Policy page, in the Name box, type Example Policy.
5. Select Enable Retention check box, and then click Add a retention stage.
6. In the Stage properties -- Webpage Dialog dialog box, in the Time Period boxes, enter Created
Date +1 years.
10. In the Do you want to open or save Example Poilcy.xml from dev.contoso.com? message box,
click Save.
11. In the The Example Poilcy.xml download has completed message box, click Open folder.
12. In the Downloads window, right-click Example Policy.xml, point to Open with, and then click
Choose default program.
13. In the How do you want to open this file? dialog box, clear the Use this app for all .xml files
check box, and then click More options.
5-4 Developing Microsoft SharePoint Server 2013 Advanced Solutions
Question: True or False: When you enable the Content Organizer in a site, users must always add their
documents to the Drop-Off Library.
( ) True
( ) False
Answer:
( ) True
(√) False
Developing a Publishing Site for Web Content 06-1
Module 6
Developing a Publishing Site for Web Content
Contents:
Lesson 1: Programming with the Web Content Publishing API 2
Lesson 1
Programming with the Web Content Publishing API
Contents:
Resources 3
Developing a Publishing Site for Web Content 06-3
Resources
Working with Navigation Settings
Lesson 2
Developing Page Components for Web Content
Publishing
Contents:
Resources 5
Demonstration: Deploying a ScriptLink Custom Action 5
Developing a Publishing Site for Web Content 06-5
Resources
Working with Field Controls
Best Practice: It is generally recommended to deploy custom files to the SharePoint root
folder path under a solution-specific sub-folder in order to separate out-of-box files from custom
solutions. In the case of rendering templates, SharePoint will only inspect the root folder, and will
not search child folders. User control files containing rendering templates must be deployed to
the root folder. To reduce the risk of file naming conflicts, you should prefix your user control file
names with a solution-specific identifier.
Best Practice: It is recommended that when embedding a web part in page layouts or
pages, that the part always be contained in a web part zone. The exception to this rule is when
adding web parts to a master page that does not support web part zones.
Additional Reading: For more information about Web Part Zones, read the WebPartZone
Class documentation on MSDN at http://go.microsoft.com/fwlink/?LinkId=321110.
Additional Reading: For a description of the standard properties available on all web
parts, read about the WebPart Class on MSDN at http://go.microsoft.com/fwlink/?LinkId=321111.
Additional Reading: You can find out more about the ScriptLink class on MSDN at
http://go.microsoft.com/fwlink/?LinkId=235313.
2. If you are not already logged on, log on to the LONDON machine as CONTOSO\Administrator with
password Pa$$w0rd.
5. In the How do you want to this this type of file (.sln)? dialog box, click Visual Studio 2012.
7. Point out that the jQuery-1.7.1.min.js is being deployed to the SharePoint file system. Note that this
location will allow the file to be accessed by using the virtual path "_layouts".
8. Expand the ScriptLinks folder, and then double-click the Elements.xml file.
9. Point out the two custom actions. Note that one custom action is using the ScriptSrc property to
insert a script link tag, and the other is using a ScriptBlock property to insert a snippet of JavaScript.
06-6 Developing Microsoft SharePoint 2013 Advanced Solutions
10. Note that the custom action with the lower sequence number of 150 will be inserted before the
higher sequence number of 151.
11. Expand the Features folder, and then double-click on the ScriptLinks feature.
14. Note that the script block has executed when the alert dialog is displayed in Internet Explorer.
21. Note that the script block is still executed on the site. Explain that the script links will now be inserted
on every site contained in the web application.
25. Wait for the retractions process to complete, and then close Visual Studio.
Developing a Publishing Site for Web Content 06-7
( ) SPField
( ) SPView
( ) BaseFieldControl
( ) SPContentType
( ) ListFormWebPart
Answer:
( ) SPField
( ) SPView
(√) BaseFieldControl
( ) SPContentType
( ) ListFormWebPart
Question: Can Publishing Page Layouts or Pages be provisioned from a SharePoint App by using a
Schema Element?
( ) True
( ) False
Answer:
( ) True
(√) False
Question: What is the purpose of the EditModePanel control in a Page Layout?
Answer: Controls contained within the panel are displayed only when the page is in edit mode.
( ) True
( ) False
Answer:
( ) True
(√) False
06-8 Developing Microsoft SharePoint 2013 Advanced Solutions
Question: Compare and contrast the Solution and Features Framework versus the Apps for SharePoint
model. What are some of the limitations in the Apps for SharePoint model that specifically related to Web
Content Management
Provisioning publishing artifacts to the HostWeb requires programming with the CSOM (Schema
Elements are not supported).
Many types of publishing controls cannot be customized and are not supported by SharePoint Apps.
Module 7
Structuring and Publishing Websites for All Users
Contents:
Lesson 3: Publishing to Mobile Devices 2
Lesson 3
Publishing to Mobile Devices
Contents:
Resources 3
Demonstration: Defining Device Channels 3
Structuring and Publishing Websites for All Users 07-3
Resources
Mobile Device Capabilities
6. On the Design Manager: Welcome page, in the numbered list, click 2. Manage Device Channels.
7. On the Design Manager: Manage Device Channels page, click Create a channel.
8. In the Device Channels - New Item dialog box, in the Name box, type Windows Phone.
12. Select the Active check box, and then click Save.
13. In the Device Channels - New Item dialog box, click Close dialog.
Lesson 4
Multi-Language Sites Using Variations
Contents:
Resources 5
Structuring and Publishing Websites for All Users 07-5
Resources
Variation Labels
Additional Reading: For more guidance on language packs, see Install or uninstall
language packs for SharePoint 2013 at http://go.microsoft.com/fwlink/?LinkId=141342.
Translating Content
Additional Reading: For more guidance on the XLIFF standard, see OASIS XML Localisation
Interchange File Format (XLIFF) TC at http://go.microsoft.com/fwlink/?LinkId=258217.
07-6 Developing Microsoft SharePoint 2013 Advanced Solutions
Question: True or False: A Search service application is required for cross-site publishing.
( ) True
( ) False
Answer:
(√) True
( ) False
( ) True
( ) False
Answer:
( ) True
(√) False
Question: What is the maximum number of device channels you can have?
( )2
( )4
( )6
( )8
( ) 10
Answer:
( )2
( )4
( )6
( )8
(√) 10
Question: True or False: Any term set can be used as a navigation term set?
( ) True
( ) False
Answer:
( ) True
(√) False
Structuring and Publishing Websites for All Users 07-7
Question: True or False: Target variations will display in the locale by default.
( ) True
( ) False
Answer:
( ) True
(√) False
Developing Optimized Internet Sites 8-1
Module 8
Developing Optimized Internet Sites
Contents:
Lesson 1: Optimizing a SharePoint Site for Search Engines 2
Lesson 1
Optimizing a SharePoint Site for Search Engines
Contents:
Resources 3
Demonstration: Reading SEO Properties 3
Developing Optimized Internet Sites 8-3
Resources
Generating Sitemaps
Reference Links: SharePoint generates an XML Sitemap by using the Sitemap Protocol that
is supported by most search engines, including Microsoft Bing, Yahoo, and Google. You can find
more information about the Sitemap standard at http://go.microsoft.com/fwlink/?LinkId=320800
Additional Reading: You can find additional details and formatting examples at
http://go.microsoft.com/fwlink/?LinkId=320801
4. In Internet Explorer, in the address bar, type http://www.contoso.com, and then press Enter.
7. On the ribbon, click Edit Properties, and then click Edit SEO Properties.
8. On the SEO Properties page, ensure the Name property is set to Home, enter a selection of sample
values for the remaining properties, and then click OK.
9. On the PUBLISH menu, click Publish.
13. In Windows PowerShell, note that the code is reading column values on page list items that store SEO
properties.
15. Note that the column values match the sample values you entered in a previous step.
Note: The welcome page of a publishing site does not have a Managed Navigation Term
context, so SEO properties are stored as columns on the page item regardless of whether the site
is using Structured or Managed Navigation.
19. On the PAGE menu, click Edit Properties, and then click Edit SEO Properties.
20. On the SEO Properties page, identify that the UI to edit the SEO properties is the same regardless of
whether the site is using Structured or Managed Navigation.
21. Ensure that the Browser Title property is set to News, enter a selection of sample values for the
remaining properties, and then click OK.
25. In Windows PowerShell, note that the code is now accessing a NavigationTermSet associated with the
site collection, and reading SEO properties from the NavigationTerm local custom properties
collection.
27. Note that the property values match the sample values you entered in the previous step.
28. Close all open windows.
Developing Optimized Internet Sites 8-5
Lesson 2
Optimizing Performance and Scalability
Contents:
Resources 6
Demonstration: Creating and Configuring an Image Rendition 6
8-6 Developing Microsoft SharePoint 2013 Advanced Solutions
Resources
Client-Side Programming
Additional Reading: For more information on programming with the SharePoint 2013
REST API, read Get Started with the SharePoint 2013 REST Service on MSDN at
http://go.microsoft.com/fwlink/?LinkId=320805
Additional Reading: For more information on programming with the SharePoint 2013
JavaScript Object Model, read “How to: Complete basic operations using JavaScript library code
in SharePoint 2013” on MSDN at http://go.microsoft.com/fwlink/?LinkId=320804
Reference Links: Visual Studio® Web Essentials in an extension for Microsoft Visual Studio
2013 that can perform minification and bundling for CSS and JavaScript files. You can down the
extension from http://go.microsoft.com/fwlink/?LinkId=320806
Caching
Additional Reading: For more information, read the Plan for caching and performance in
SharePoint Server 2013 on Microsoft TechNet at http://go.microsoft.com/fwlink/?LinkId=320808
Additional Reading: For more information on working with image renditions, read
SharePoint 2013 Design Manager image renditions on MSDN at
http://go.microsoft.com/fwlink/?LinkId=303705
Best Practice: Despite the implied high-availability of CDNs, in recent years there have
been some very public failures that have impacted the business operations of CDN customers. To
protect your site against potential CDN failures, it is a best practice to include fallback scripts to
local resources.
Reference Links: You can find out more information on the Windows Azure Content
Delivery Network on MSDN at http://go.microsoft.com/fwlink/?LinkId=205043
2. If you are not already logged on, log on to the LONDON machine as CONTOSO\Administrator with
the password Pa$$w0rd.
3. Open a File Explorer window and browse to C:\inetpub\wwwroot\wss\VirtualDirectories\80.
4. Right-click web.config, point to Open with, and then click Microsoft Visual Studio 2012.
Developing Optimized Internet Sites 8-7
o The location attribute specifies the file system location where files will be cached.
o The path attribute specifies the file types that should be cached, in the form of a regular
expression.
o The maxSize attribute specifies the maximum size of the cache in gigabytes (GB).
Note: The BLOB cache is already enabled in the virtual machine to save time during the
demonstration.
11. On the Site Settings page, under Look and Feel, click Image Renditions.
13. On the New Image Rendition page, in the Name box, type Landscape Large.
19. In the Add a document dialog box, browse to E:\Democode\VanGoghStarryNight.jpg, click Open,
and then click OK.
20. In the Site Collection Images – VanGoghStarryNight.jpg dialog box, click Save.
22. On the All Assets page, select the VanGoghStarryNight row (click in the column with a checkmark
header).
Note: Because you are viewing a newly-uploaded image, SharePoint may take
approximately a minute to generate the renditions.
24. Scroll down the page and briefly review how the image appears in each rendition.
27. Drag the image handles to resize the selected area. Notice how the resolution stays the same, at 500 x
400 pixels, but you are effectively zooming in on the selected area.
8-8 Developing Microsoft SharePoint 2013 Advanced Solutions
28. Drag the selected area, and notice how the preview image is updated.
Note: The key point here is that the dimensions of the rendition do not change; in this
case, they are fixed at 500 x 400 pixels. However, for individual images, you can configure
whether to scale the whole image down to the size of the rendition, or whether to crop the
image to size, or a combination of the two.
Answer: The robots.txt file supports the Robots Exclusion Protocol, a de facto standard for providing
instructions to Internet search engine crawlers about site paths that should be excluded from search
crawling.
It is configured in SharePoint by first activating the Search Engine Optimization feature on a Site
Collection, and then editing the Search Engine Sitemap settings found under the Site Collection
Administration group of the top-level site of a Site Collection settings page.
Question: Which type of SharePoint cache is targeted at static resources such as image files?
( ) BLOB Cache
( ) Distributed Cache
( ) Session State
( ) Page Cache
Answer:
( ) Session State
( ) Page Cache
Question: Can the use of canonical URLs improve search engine ranking?
( ) True
( ) False
Answer:
(√) True
( ) False
8-10 Developing Microsoft SharePoint 2013 Advanced Solutions
Question: Which optimization technique describes combining multiple source files into a single file?
( ) Minification
( ) Bundling
( ) Image Renditions
Answer:
( ) Minification
(√) Bundling
( ) Image Renditions
Module 9
Working with Business Connectivity Services
Contents:
Lesson 1: Business Connectivity Services in SharePoint 2013 2
Lesson 1
Business Connectivity Services in SharePoint 2013
Contents:
Resources 3
Demonstration: Exploring a BDC Model File 3
Working with Business Connectivity Services 9-3
Resources
Overview of Business Connectivity Services
Additional Reading: For more information on the core components of BCS in SharePoint
Server 2013, see Overview of Business Connectivity Services in SharePoint 2013 at
http://go.microsoft.com/fwlink/?LinkId=302076.
2. On the Start screen, type Visual Studio, and then click Visual Studio 2012.
4. In the Open File dialog box, browse to E:\Setupfiles, click ContosoDW.bdcm, and then click Open.
5. Point out the message stating that the BDC Model Designer only supports editing models with a
single .NET LobSystem. Explain that the ContosoDW.bdcm file models a SQL Server connection.
9. In the Properties pane, in the drop-down list box at the top of the pane, point out that the name
includes the text Model. This indicates that the node represents the top-level Model element of the
BDC model.
10. In the BDC Explorer pane, click the second ContosoDW element.
11. In the Properties pane, in the drop-down list box at the top of the pane, point out that the name
includes the text LobSystem. This indicates that the node represents the LobSystem element of the
BDC model.
12. In the BDC Explorer pane, expand the second ContosoDW element, and then expand the
LobSystemInstances element.
13. Point out that the model includes a single LobSystemInstance element named ContosoDW. Explain
that this defines properties for a specific instance of an external system, such as connection strings
and authentication settings.
15. Point out that the ECT contains two methods: a ReadItem method and a ReadList method.
16. On the ContosoDW.bdcm tab, click XML Editor.
18. Briefly review the XML content of the ContosoDW.bdcm file. Relate the elements in the XML file to
the structure you explored in the BDC Explorer pane.
Lesson 2
Creating BDC Models in SharePoint Designer
Contents:
Resources 5
Demonstration: Creating and Consuming an External Content Type 5
Working with Business Connectivity Services 9-5
Resources
Configuring External System Authentication
4. In the Login Properties - CONTOSO\Administrator dialog box, under Select a page, click User
Mapping.
5. Under Users mapped to this login, in the Map column, select the ContosoRetailDW check box.
6. Under Database role membership for: ContosoRetailDW, select the db_datareader check box,
and then click OK.
8. On the Start screen, type SharePoint, and then click SharePoint 2013 Central Administration.
10. On the list of service applications, click Contoso Secure Store Service Application.
Explain that you are now going to create a secure store target application that you will use to
connect to the external database.
11. On the ribbon, in the Manage Target Applications group, click New.
12. On the Create New Secure Store Target Application page, in the Target Application ID box, type
ContosoDWApp.
13. In the Display Name box, type Contoso Retail Data Warehouse.
16. Leave the Field Name, and Field Type unchanged, and then click Next.
18. In the Members box, type Everyone, and then click OK.
Explain that you have created a group target application that maps all users to a single set of
credentials. You will now set the credentials that the target application will use to connect to the
external database.
9-6 Developing Microsoft SharePoint Server 2013 Advanced Solutions
19. In the list of target applications, select the ContosoDWApp check box.
21. In the Set Credentials for Secure Store Target Application (Group) dialog box, in the Windows
User Name box, type CONTOSO\Administrator.
22. In the Windows Password, and Confirm Windows Password boxes, type Pa$$w0rd, and then click
OK.
24. On the Start screen, type SharePoint, and the then click SharePoint Designer 2013.
25. In SharePoint Designer, click Open Site.
26. In the Open Site dialog box, in the Site name box, type http://sharepoint.contoso.com, and then
click Open.
27. If the Windows Security dialog box appears, log in as CONTOSO\Administrator with password
Pa$$w0rd.
Note: SharePoint Designer may take some time to open the site.
28. When SharePoint Designer has finished loading the site, in the Navigation pane, click External
Content Types.
29. On the ribbon, in the New group, click External Content Type.
30. In the External Content Type Information pane, in the Name row, click New external content
type.
32. In the External System row, click Click here to discover external data sources.
35. In the SQL Server Connection dialog box, in the Database Server box, type LONDON.
38. In the Secure Store Application ID box, type ContosoDWApp, and then click OK.
39. In the BCS Secure Store : ContosoDWApp dialog box, log in as CONTOSO\Administrator with
password Pa$$w0rd, and then click OK.
40. On the Data Source Explorer tab, expand ContosoRetailDW, and then expand Tables.
41. If a Microsoft SharePoint Designer dialog box appears, displaying the error message Cannot
complete refresh, explain that this because BCS does not support some of the columns in the
database, and then click OK.
42. Right-click DimAccount, and then click Create All Operations.
43. In the All operations dialog box, on the Operation Properties page, click Next.
Working with Business Connectivity Services 9-7
44. On the Parameters Configuration page, in the Data Source Elements list, clear the
ParentAccountKey, AccountLabel, Operator, CustomMembers, ValueType,
CustomMemberOptions, ETLLoadID, LoadDate, and UpdateDate check boxes.
46. Click AccountName, and then select the Show In Picker check box.
47. Click AccountType, select the Show In Picker check box, and then click Next.
Explain that having created an external content type, you will now create an external list to display
data from the external content type.
49. On the ribbon, in the Lists & Forms group, click Create Lists & Form.
51. In the Create List and Form for Account dialog box, in the List Name box, type Accounts, and then
click OK.
Point out that the External Lists pane now includes a list named Accounts.
Explain that the final high-level step is to grant users permission to use the external content type you
have created.
54. On the Start screen, type SharePoint, and then click SharePoint 2013 Central Administration.
56. In the list of service applications, on the Business Data Connectivity Service Application row, click
the Contoto Business Data Connectivity Service Application link.
57. On the ribbon, in the Permissions group, click Set Metadata Store Permissions.
58. In the Set Metadata Store Permissions, type Administrator, and then click Add.
59. Under Permissions for CONTOSO\administrator, select all of the check boxes.
60. Select the Propagate permissions to all BDC Models, External Systems and External Content
Types in the BDC Metadata Store check box, and then click OK.
61. In the list of external content types, select the Account check box.
62. On the ribbon, in the Permissions group, click Set Object Permissions.
63. In the Set Object Permissions dialog box, type Everyone, and then click Add.
64. Under Permissions for Everyone, select the Execute and Selectable In Clients check boxes, and
then click OK.
65. In the Address bar, type http://sharepoint.contoso.com, and then press Enter.
66. On the Contoso SharePoint Site page, on the Quick Launch menu, click Accounts.
67. Verify that the Accounts list retrieves and displays a set of data from the external database.
Lesson 3
Creating BDC Models in Visual Studio 2012
Contents:
Resources 9
Working with Business Connectivity Services 9-9
Resources
Creating App-Scoped BDC Models
Additional Reading: For more information on how to convert an app-scoped BDC model
to farm-scoped model, see How to: Convert an app-scoped external content type to tenant-scoped
at http://go.microsoft.com/fwlink/?LinkId=321942.
Additional Reading: For more information on authentication modes, see Available
Authentication Modes at http://go.microsoft.com/fwlink/?LinkId=321943.
9-10 Developing Microsoft SharePoint Server 2013 Advanced Solutions
Answer: You need to create a farm-scoped external content type by using SharePoint Designer.
Question: You need to create an external content type to expose data from a custom data source. The
custom data source uses a binary file format documented by the developers who created it. What tools
would you use to create the ECT?
Module 10
Creating Advanced Business Data Connectivity Models
Contents:
Lesson 1: Configuring BDC Models for Search 2
Lesson 1
Configuring BDC Models for Search
Contents:
Demonstration: Exploring BDC Models for Search 3
Creating Advanced Business Data Connectivity Models 10-3
Lesson 3
Working with External Events and Notifications
Contents:
Demonstration: Working with External Events 5
Creating Advanced Business Data Connectivity Models 10-5
2. Open a new browser tab. In the address bar, type http://team.contoso.com, and then press Enter.
6. In the Adding External List dialog box, in the Name box, type Customer.
7. In the External Content Type box, click Select External Content Type.
8. In the External Content Type Picker dialog box, click Northwind, and then click OK.
9. In the Adding External List dialog box, click Create.
10. On the Site Contents page, click the Customer link. It should display data from the OData feed,
which is in turn coming from the database.
11. Switch to Visual Studio.
13. Right-click the first line of the Subscribe method, point to Breakpoint, and then click Insert
Breakpoint.
14. On the Windows Start page, type SQL, and then click SQL Server Management Studio.
16. In Object Explorer, expand Databases, expand Northwind, and then expand Tables.
17. Right-click dbo.EntitySubscribe, click Select Top 1000 Rows. Notice that there are no rows in the
table.
18. On the Windows Start page, type SharePoint, right-click SharePoint 2013 Management Shell, and
then click Run as administrator.
19. At the command prompt, type E:\Democode\SetupeventReceiver.ps1, and then press Enter.
Monitor Visual Studio for the breakpoint to be hit. Highlight the method variables to show that the
values were sent from SharePoint.
22. Switch back to Visual Studio, in the NotificationTesting project, double-click Program.cs. Notice
how it simply gets the latest delivery address and then sends an http post to that address. Point out
that the message that is sent is an Atom Feed.
24. In the Attach to Process dialog box, select the Show processes from all users check box.
25. Select all the w3wp.exe processes, and then click Attach.
31. In the Attach to Process dialog box, click the OWSTIMER.exe process, and then click Attach.
34. Right-click the following line of code, point to Breakpoint, and then click Insert Breakpoint:
base.ItemAdded(properties);
35. In Solution Explorer, right-click NotificationTesting, point to Debug, and then click Start new
instance. When the break point gets hit in your event receiver, SharePoint has successfully received
the message.
41. On the ribbon, in the View section, in the list, click BDC Models.
( ) IdEnumerator
( ) EventSubscriber
( ) Finder
( ) SpecificFinder
( ) StreamAccessor
Answer:
( ) IdEnumerator
( ) EventSubscriber
( ) Finder
(√) SpecificFinder
( ) StreamAccessor
( ) Custom Connector
( ) WCF Connector
( ) COM Connector
( ) Database Connector
Answer:
( ) .NET Connector
( ) Custom Connector
( ) WCF Connector
(√) COM Connector
( ) Database Connector
Question: True or False: ShowInSearchUI is the only property that you need to specify in a connector
model in order to use the model in search dialogs.
( ) True
( ) False
Answer:
( ) True
(√) False
10-8 Developing Microsoft SharePoint Server 2013 Advanced Solutions
( ) True
( ) False
Answer:
( ) True
(√) False
Creating Advanced Business Data Connectivity Models 10-9
Question: What is the reason for having multiple methods that retrieve information about single items
such as metadata, security, and file contents?
Answer: Performance.
Working with Business Data 11-1
Module 11
Working with Business Data
Contents:
Lesson 1: Working with Business Data in Composite Solutions 2
Lesson 1
Working with Business Data in Composite Solutions
Contents:
Demonstration: Using Actions and External Data Columns 3
Demonstration: Using Business Data in Workflows 4
Working with Business Data 11-3
5. Right-click NorthwindService.sln, point to Open with, and then click Microsoft Visual Studio
2012.
6. Press F5 to start the service. Explain that you have started an example OData service that provides
data from a back-end database.
7. On the Windows Start page, type Central Administration, and then press Enter.
8. On the Central Administration home page, under Application Management, click Manage service
applications.
9. On the list of service applications, click on the first instance of Business Data Connectivity Service.
10. In the list of external content types, on the Customers drop-down menu, click Add Action.
11. On the Add Action page, in the Action Name box, type Search Company.
12. In the Navigate To This URL box, type
http://team.contoso.com/_layouts/osssearchresults.aspx?k={0}.
Note: At this point, mention that you can use any URL, not just internal URLs, in ECT
actions. However, in a classroom environment the virtual machine is not connected to an external
network.
13. Under Launch the action in a new Web browser window (applies to External Data Web Parts
only), click Yes.
16. Select the Default action check box, and then click OK.
17. In the Address bar, type http://team.contoso.com, and then press Enter.
20. In the Adding External List dialog box, in the Name box, type Customers.
21. Under External Content Type, click the Select External Content Type icon.
22. In the External Content Type Picker dialog box, click Customers, and then click OK.
25. Verify that the Customers page displays several rows of data.
26. In any row, click the ellipsis, and then click Search Company.
11-4 Developing Microsoft SharePoint Server 2013 Advanced Solutions
27. Verify that Internet Explorer opens a new tab that displays a page named Search, where the search
text is the company name of the item you selected.
Note: The Search page will not display any results because the search service is not
configured on this virtual machine.
28. Close the Internet Explorer tab that contains the Search page.
31. In the Adding Custom List dialog box, type CustomerExt, and then click Create.
34. In the Create Column dialog box, in the Column name box, type CustomerID.
35. Under The type of information in this column is, click External Data.
36. Under External Content Type, click the Select External Content Type icon.
37. In the External Content Type Picker dialog box, click Customers, and then click OK.
38. In the Create Column dialog box, under Select the Field to be shown on this column, in the drop-
down list, click CustomerID.
39. Under Add a column to show each of these additional fields, select the CompanyName, and
ContactName check boxes, and then click OK.
42. In the CustomerID box, click the Select External Item(s) icon.
43. In the Choose Customers dialog box, click ALFKI, and then click OK.
3. Right-click NorthwindService.sln, point to Open with, and then click Microsoft Visual Studio
2012.
4. Press F5 to start the service. Explain that you have started an example OData service that provides
data from a backend database.
Working with Business Data 11-5
Explain that you will look up information from this list as part of a site workflow.
8. Point out that the first row of the list contains a CustomerID value of ALFKI, and that this
corresponds to a CompanyName value of Alfreds Futterkiste.
10. On the Start screen, type SharePoint Designer, and then press Enter.
12. In the Open Site dialog box, in the Site name box, type http://team.contoso.com, and then click
Open.
13. If the Windows Security dialog box appears, in the User name box, type Administrator, in the
Password box, type Pa$$w0rd, and then click OK.
14. On the ribbon, click List Workflow. Point out that the Customers external list is not listed because
you cannot create list workflows for external lists.
16. In the Create Site Workflow dialog box, in the Name box, type External List Workflow, and then
click OK.
Note: At this point, point out that you are using SharePoint 2010 workflow mode for simplicity,
because using SharePoint 2013 workflow requires additional configuration that would place additional
load on the virtual machine. In a SharePoint 2013 workflow, you would use the Call Web Service activity
to interact with the external list through the REST API.
17. On the ribbon, in the Insert group, on the Action drop-down menu, click Set Workflow Variable.
18. Click workflow variable, and then click Create a new variable.
19. In the Edit Variable dialog box, in the Name box, type CompanyName.
20. In the Type list, click String, and then click OK.
22. In the Lookup for String dialog box, in the Data source list, click Customers.
25. In the Value box, type ALFKI, and then click OK.
27. In the Step 1 box, click below the statement you just created.
28. On the ribbon, on the Action drop-down menu, click Log to History List.
31. In the Field from source list, click Variable: CompanyName, and then click OK.
33. Under Start Options, ensure Allow this workflow to be manually started is selected.
36. In the Address bar, type http://team.contoso.com, and then press Enter.
39. On the Workflows: Contoso Team Site page, click External List Workflow.
42. Point out that the Description column contains the value Alfreds Futterkiste. This is the company
name that corresponds to the customer ID you provided.
Lesson 3
Working with Business Data in Client Applications
Contents:
Demonstration: BCS and Office Clients 8
11-8 Developing Microsoft SharePoint Server 2013 Advanced Solutions
3. On the Windows Start page, type SharePoint Designer, and then press Enter.
5. In the Open Site dialog box, in the Site name box, type http://team.contoso.com, and then click
Open.
6. If you are prompted for credentials, log in as CONTOSO\Administrator with password Pa$$w0rd.
9. In the External Content Type Information section, next to Name, click New external content
type.
12. In the External Content Type Operations section, click Click here to discover external data
sources and define operations.
14. In the External Data Source Type Selection dialog box, in the Data Source Type list, click SQL
Server, and then click OK.
15. In the SQL Server Connection dialog box, in the Database Server box, type London.
18. In the Secure Store Application ID box, type ContosoDW, and then click OK.
19. In the BCS Secure Store : ContosoDW dialog box, in the User name box, type
CONTOSO\Administrator.
20. In the Password box, type Pa$$w0rd, and then click OK.
21. On the Data Source Explorer tab, expand ContosoRetailDW, and then expand Tables.
22. In the Microsoft SharePoint Designer dialog box, explain that the unsupported types will not affect
the demonstration, and then click OK.
23. Under Tables, right-click DimCustomer, and then click Create All Operations.
24. In the All operations dialog box, on the Operation Properties page, click Next.
25. On the Parameters Configuration page, under Data Source Elements, click FirstName (the text,
not the check box).
26. In the Properties pane, in the Office Property list, click First Name (FirstName).
27. Under Data Source Elements, click LastName (the text, not the check box).
28. In the Properties pane, in the Office Property list, click Last Name (LastName), and then click
Next.
Working with Business Data 11-9
29. On the Filter Parameters Configuration page, click Add Filter Parameter.
31. In the Filter Configuration dialog box, in the Filter Type list, click Limit, and then click OK.
32. In the Properties pane, in the Default Value box, type 25, and then click Finish.
35. In the Create List and Form for Customer Contacts dialog box, in the List name box, type
Customer Contacts, and then click OK.
37. On the Start screen, type Central Administration, and then press Enter.
40. On the list of external content types, on the Customer Contacts drop-down menu, click Set
Permissions.
41. In the Set Object Permissions dialog box, type Everyone, and then click Add.
42. Under Permissions for Everyone, select the Execute, and Selectable In Clients check boxes, and
then click OK.
43. In the Address bar, type http://team.contoso.com, and then press Enter.
44. If you are prompted for credentials, log on as CONTOSO\Administrator with password Pa$$w0rd.
47. On the Site Features page, in the Offline Synchronization for External Lists row, click Activate.
50. In the Microsoft Office Customization Installer dialog box, click Install.
51. When the Microsoft Office Customization Installer dialog box reports that the customization was
successfully installed, click Close.
52. When the BCS has finished generating the installation package, Outlook will open automatically.
Point out the list of customer contacts.
Question: You need to access an external content type hosted in a SharePoint site from a SharePoint
sandboxed solution. What object model should you use?
Question: True or False: You can associate workflows with external lists.
( ) True
( ) False
Answer:
( ) True
(√) False
Question: What is the name of the process that manages the Business Connectivity Service Client Cache?
( ) W3wp.exe
( ) Mssearch.exe
( ) BCSSync.exe
( ) Noderunner.exe
Answer:
( ) W3wp.exe
( ) Mssearch.exe
(√) BCSSync.exe
( ) Noderunner.exe
Question: True or False: You can deploy an ECT via the Client Side Object Model (CSOM)
( ) True
( ) False
Answer:
( ) True
(√) False
Managing and Accessing User Profile Data 12-1
Module 12
Managing and Accessing User Profile Data
Contents:
Lesson 1: User Profile Data in SharePoint 2013 2
Lesson 1
User Profile Data in SharePoint 2013
Contents:
Resources 3
Demonstration: Reviewing the Default User Profile Properties 3
Managing and Accessing User Profile Data 12-3
Resources
Profile Properties and Data Protection
Additional Reading: You can set the default privacy setting for a user profile property by
using code. For more information on setting privacy settings on user profile properties, see How
to: Set Privacy Policies for User Profile Properties at
http://go.microsoft.com/fwlink/?LinkId=321955
3. On the Start screen, type SharePoint, and then click SharePoint 2013 Central Administration.
4. In Internet Explorer, under Application Management, and then click Manage service applications.
5. On the Manage Service Applications page, click Contoso User Profiles.
6. On the Contoso User Profiles page, under People, click Manage User Properties.
7. On the Manage User Properties page, point to First name, click the drop-down arrow, and then
click Edit.
8. On the Edit User Profile Property page, point out the data type, profile subtypes, and default
privacy settings.
10. Click the Back to Manage Profile Service: Contoso User Profiles button.
11. On the Contoso User Profiles page, under Synchronization, click Configure Synchronization
Settings.
12. On the Configure Synchronization Settings page, point out that that the service application is
configured for basic Active Directory import, but that you can choose to use full SharePoint Profile
Synchronization, or use an external identity manager.
Lesson 2
Options for Accessing User Profile Data
Contents:
Resources 5
Managing and Accessing User Profile Data 12-5
Resources
Searching for Users
Additional Reading: For more information on how to configure people search, see Deploy
people search in SharePoint Server 2013 at http://go.microsoft.com/fwlink/?LinkId=321954
12-6 Developing Microsoft SharePoint Server 2013 Advanced Solutions
Lesson 3
Managing User Profile Data
Contents:
Resources 7
Demonstration: Retrieving User Profile Properties in Server-side Code 7
Managing and Accessing User Profile Data 12-7
Resources
Updating User Profile Properties
Additional Reading: For more information on working with user profiles in SharePoint
2013, see Work with user profiles in SharePoint 2013 at
http://go.microsoft.com/fwlink/?LinkId=321953
3. On the Start screen, type Visual Studio, and then click Visual Studio 2012.
4. In Visual Studio, on the FILE menu, point to Open, and then click Project/Solution.
7. Point out the code that obtains a reference to the user profile service application, and the code
enumerates the properties of the default profile subtype.
8. In Solution Explorer, right-click ManageUserProfileProperties, point to Debug, and then click Start
new instance.
11. In Solution Explorer, expand Loader, and then under Loader, double-click Program.cs.
12. Review the code. Explain that to connect to the user profile service application, the account requires
specific permissions. Explain that the Administrator account does not have these permissions, but
the SPFarm account does. This code grants the SPFarm account the necessary permissions to run an
interactive application (by adding the account to the Domain Admins security group) before starting
the ManageUserProfileProperties application in the context of the SPFarm account. This enables
the application to connect to the user profile service application. Finally, the code removes the
SPFarm account from the Domain Admins security group.
13. In Solution Explorer, right-click Loader, and then click Set as StartUp Project.
14. On the DEBUG menu, click Start Debugging. In the console window, point out the list of profile
properties.
Lesson 4
Managing User Profile Properties
Contents:
Resources 9
Managing and Accessing User Profile Data 12-9
Resources
Deleting User Profile Properties
Additional Reading: For more information on working with user profiles in server-side
code, see How to: Work with user profiles and organization profiles by using the server object
model in SharePoint 2013 at http://go.microsoft.com/fwlink/?LinkId=321952
12-10 Developing Microsoft SharePoint Server 2013 Advanced Solutions
( ) True
( ) False
Answer:
( ) True
(√) False
( ) True
( ) False
Answer:
( ) True
(√) False
( ) You can update all user profile properties by using either server-side or client-side code.
( ) You can update all user profile properties by using server-side code only.
( ) You can update all user profile properties by using client-side code only.
( ) You can update all user profile properties by using server-side code, and the user profile picture by
using client-side code.
( ) You can update all user profile properties by using client-side code, and the user profile picture by
using server-side code.
Answer:
( ) You can update all user profile properties by using either server-side or client-side code.
( ) You can update all user profile properties by using server-side code only.
( ) You can update all user profile properties by using client-side code only.
(√) You can update all user profile properties by using server-side code, and the user profile
picture by using client-side code.
( ) You can update all user profile properties by using client-side code, and the user profile
picture by using server-side code.
Managing and Accessing User Profile Data 12-11
Question: True or False: You can create more than one subtype property based on a single type property.
( ) True
( ) False
Answer:
(√) True
( ) False
Customizing the Social Workload 13-1
Module 13
Customizing the Social Workload
Contents:
Lesson 1: Overview of the Social Workload 2
Lesson 1
Overview of the Social Workload
Contents:
Demonstration: Using My Sites in SharePoint 2013 3
Customizing the Social Workload 13-3
4. In Internet Explorer, in the address bar, type http://my.contoso.com, and then press Enter.
5. If SharePoint displays the We’re still collecting the latest news. You may see more if you try
again a little later message, periodically refresh the page. This may take many minutes. Explain that
SharePoint uses timer jobs to populate the newsfeed and that as a result of the virtual machine being
shut down for extended periods, these timer jobs must execute before the feed is populated. This is
unlikely to happen in a production environment.
6. Point out the Newsfeed page including the Following, Everyone, and Mentions feeds.
13. Point out the list of apps, and the option to add an app.
Lesson 2
Developing Social Solutions
Contents:
Resources 5
Demonstration: Tagging and Following Entities by Using Out-of-the-Box Functionality 5
Customizing the Social Workload 13-5
Resources
Actors
Additional Reading: For more information about the properties available in the
SocialActor class, see the SocialActor members page at
http:/go.microsoft.com/fwlink/?LinkId=321957
4. In Internet Explorer, in the address bar, type http://project.contoso.com, and then press Enter.
5. On the Quick Launch menu, click Newsfeed.
6. On the Newsfeed page, in the Start a conversation text box, type This is a #newtag, and then click
Post.
Lesson 3
Working with Feeds
Contents:
Resources 7
Demonstration: Retrieving a Newsfeed by Using the JavaScript Object Model 7
Customizing the Social Workload 13-7
Resources
Retrieving Feeds
Additional Reading: For more information about the SocialFeedManager class, see the
SocialFeedManager members MSDN page at http://go.microsoft.com/fwlink/?LinkId=321960
Additional Reading: For more information about the SocialDataItem class, see the
SocialDataItem members MSDN page at http://go.microsoft.com/fwlink/?LinkId=321965
3. On the Start screen type Visual Studio, and then click Visual Studio 2012.
4. In Visual Studio, on the FILE menu, point to Open, and then click Project/Solution.
7. Review the contents of the Default.aspx page. Point out the additional JavaScript file reference for
the sp.userprofiles.js script file, and the empty posts div.
9. Review the contents of the App.js file. The getNewsFeed and getNewsFeedSuccess functions, load
the newsfeed for the current user and add the root post of each of the newsfeed threads to the page.
10. Point out the code that invokes the getNewsFeed function when the page loads, and then
subsequently every five seconds.
12. In the App Manifest designer, on the Permissions tab, point out that this app requires the User
Profiles (Social) and Tenant permissions to enable it to access the user’s newsfeed.
15. In a new instance of Internet Explorer, browse to http://my.contoso.com. Arrange the two instances
of Internet Explorer so that they can be seen side by side.
16. On the Newsfeed page, in the Start a conversation box, type A new post and then click Post.
17. Point out that the post appears in the newsfeed on the My Site newsfeed, and that the post also
appears in the app (the Newsfeed Posts page).
19. In the Reply text box, type A reply, and then under the Reply text box, click Post.
20. Point out that although the reply is displayed on the My Site, it is not displayed in the app. Explain
that this is because the app is only displaying the root post for each thread.
Answer:
( ) Site
( ) Document
( ) Post
( ) User
( ) Tag
Answer:
( ) Site
( ) Document
(√) Post
( ) User
( ) Tag
Question: A user can add a root post on a different user’s My Site feed.
( ) True
( ) False
Answer:
( ) True
(√) False
Monitoring and Troubleshooting Custom SharePoint Solutions 14-1
Module 14
Monitoring and Troubleshooting Custom SharePoint
Solutions
Contents:
Lesson 1: Debugging SharePoint Apps in Visual Studio 2
Lesson 1
Debugging SharePoint Apps in Visual Studio
Contents:
Resources 3
Demonstration: Debugging JavaScript in Visual Studio and Internet Explorer 3
Monitoring and Troubleshooting Custom SharePoint Solutions 14-3
Resources
Configuring a SharePoint Site for Debugging
Best Practice: You should enable debugging only in development, testing, and staging
sites. Never enable debugging in production sites, because debugging information can help
malicious users to find out about your configuration and software. This may enable those users to
mount an effective attack against your site.
Best Practice: Make sure all developers realize that they should switch to minimized
versions of all the JavaScript libraries just before the project is deployed. In addition, you should
bundle custom JavaScript into larger libraries to improve performance.
taxonomySession = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);
8. On the DEBUG menu, click Step Into. Visual Studio steps into code in the SP.Taxonomy.js file.
9. On the DEBUG menu, click Step Into. Visual Studio steps into code in the SP.Taxonomy.js file.
10. On the DEBUG menu, click Stop Debugging.
11. In Internet Explorer, click the Tools icon, and then click F12 developer tools.
12. In Internet Explorer, in the address bar, click the Refresh icon.
14. Type loadTermStore. The developer tools highlight the line for the loadTermStore function.
Lesson 2
Diagnosing Faults in Deployed Apps
Contents:
Resources 5
Monitoring and Troubleshooting Custom SharePoint Solutions 14-5
Resources
IIS Tracing
Best Practice: Make sure to provide the user with a second button or other method to
disable tracing when diagnostic information has been recorded.
14-6 Developing Microsoft SharePoint Server 2013 Advanced Solutions
Best Practice
If you use ASP.NET Tracing or MiniProfiler to investigate a problem in a deployed app, make sure you
disable those tools as soon as you have the information you require. These tools are likely to impact
performance because of the extra work they must do to record app behavior
Review Question(s)
Question: You want make recommendations for the server hardware necessary to run a SharePoint
remote-hosted app. You expect several thousand concurrent users at peak times. Should you use profiling
or stress testing to determine appropriate hardware?
Answer: You should use stress testing to determine this information.
Question: True or False: The ELMAH NuGet package can profile the behavior of JavaScript in SharePoint
Apps.
( ) True
( ) False
Answer:
( ) True
(√) False
When you try to start an app in debugging This error appears if you deploy an app to a
mode, you receive the error "Sideloading host web that does not have the Developer
of apps is not enabled on this site". feature enabled. You can enable this hidden
feature in PowerShell or you can debug the
app against a host web that is created from
the Developer site collection template.
Monitoring and Troubleshooting Custom SharePoint Solutions 14-7
Answer: The <trace> element you added configures default tracing properties, such as the
request limit and the trace mode.
Question: What are the consequences of leaving tracing enabled after you have diagnosed a bug?
Answer: The app continues to function smoothly if you leave tracing enabled longer than
necessary, but performance is reduced.