Microsoft ® Official Course Designing and Managing Features and Solutions Microsoft SharePoint 2013 SharePoint Practice

Embed Size (px)

DESCRIPTION

Lesson 1: Understanding Features and Solutions Understanding Features Anatomy of a Feature Understanding Feature Scopes Demonstration: Exploring a Feature Understanding Solutions Anatomy of a Solution Demonstration: Exploring a Solution

Citation preview

Microsoft Official Course Designing and Managing Features and Solutions Microsoft SharePoint 2013 SharePoint Practice Module Overview Understanding Features and Solutions Configuring Features and Solutions Working with Sandboxed Solutions Lesson 1: Understanding Features and Solutions Understanding Features Anatomy of a Feature Understanding Feature Scopes Demonstration: Exploring a Feature Understanding Solutions Anatomy of a Solution Demonstration: Exploring a Solution Understanding Features What is a Feature? A way of defining and scoping declarative components A mechanism for turning components on and off What can you include in a Feature? Any declarative component How are Features deployed? Manually In a SharePoint solution (farm or sandboxed) In an app for SharePoint Anatomy of a Feature Feature folder Feature.xml Elements folder Elements1.xml Elements2.xml Understanding Feature Scopes Farm WebApplication Site Web ... Demonstration: Exploring a Feature In this demonstration, you will see: How built-in SharePoint Features are structured. How Feature manifest files reference element manifest files. How activation dependencies and feature receivers are configured. Demonstration: Exploring a Feature Understanding Solutions What is a solution? A cabinet file with a.wsp solution Farm solutions Sandboxed solutions Solutions in app packages What can you include in a solution? Features Assemblies (sometimes) and files Configuration settings How are solutions deployed? Windows PowerShell (farm solutions) Windows PowerShell or site collection UI (farm and sandboxed solutions) Within an app package Anatomy of a Solution Solution package (.wsp) Solution manifest (manifest.xml) Features Assemblies Demonstration: Exploring a Solution In this demonstration, you will: Explore the contents of a solution package. Review a typical solution manifest file. Demonstration: Exploring a Solution Lesson 2: Configuring Features and Solutions Planning and Configuring Feature Dependencies Creating Solution Activation Dependencies Demonstration: Using the Visual Studio Designer Managing Feature Upgrades Managing Solution Upgrades Administering Features and Solutions Creating Feature Receivers Discussion: Using Feature Receivers Planning and Configuring Feature Dependencies Dependency scenarios Grouping (automatic activation) Resource guarantees (manual activation) Dependency rules Same-scope dependencies Cross-scope dependencies Hidden Features Configuring dependencies ActivationDependency element Creating Solution Activation Dependencies Less common than Feature activation dependencies Solutions typically represent a self-contained solution Features often represent granular functionality Add an ActivationDependency element to the solution manifest file Demonstration: Using the Visual Studio Designer In this demonstration, you will see how to use the Visual Studio 2012 Feature Designer to add Feature activation dependencies. Demonstration: Using the Visual Studio Designer Managing Feature Upgrades Upgrading a Feature 1. Add new element manifests 2. Add an UpgradeActions element to the Feature manifest 3. Add one or more VersionRange child elements 4. Add actions within each VersionRange element Feature upgrade actions ApplyElementManifests MapFile AddContentTypeField CustomUpgradeAction Managing Solution Upgrades Approaches to solution upgrades Retract, uninstall, and then reinstall Use the Update-SPSolution cmdlet Retracting a solution is not always possible For example, when a content type in use Updating a solution has some restrictions For example, you cannot add or remove Features Assembly binding redirection Administering Features and Solutions Administering farm solutions Add the solution to the store Install the solution Retract the solution Remove the solution from the store Administering Features Install the Feature Activate the Feature Deactivate the Feature Uninstall the Feature Creating Feature Receivers Creating a Feature receiver Inherit from the SPFeatureReceiver base class Override appropriate method for life cycle event Registering a Feature receiver Edit the Feature manifest Discussion: Using Feature Receivers In what scenarios might you create a Feature receiver? In what scenarios might you add a Feature receiver to an empty Feature? Lesson 3: Working with Sandboxed Solutions Understanding Sandboxed Solutions Capabilities and Constraints Managing the Sandboxed Solution Life Cycle Creating and Installing Solution Validators Discussion: When Are Sandboxed Solutions Appropriate? Understanding Sandboxed Solutions Sandboxed solution fundamentals Deployment Scope Code execution Monitoring and throttling Resource points Resource measures Daily limits Per request limits Capabilities and Constraints Supported operations Limited subset of Microsoft.SharePoint.dll No file system access No network access No elevated permissions Supported components Any declarative component within a Site-scoped or Web-scoped Feature Some programmatic components Full-trust proxies Managing the Sandboxed Solution Life Cycle Deployment and activation Farm administrators: Windows PowerShell Site collection administrators: SharePoint site UI Versioning and upgrading Solution gallery stores multiple versions Features are upgraded automatically Creating and Installing Solution Validators Creating solution validators Inherit from SPSolutionValidator Override ValidateSolution Override ValidateAssembly Installing solution validators Deploy validator assembly to the global assembly cache Add the validator to the SolutionValidators collection of the user code service Typically implemented in a Feature receiver class Discussion: When Are Sandboxed Solutions Appropriate? When would you create a sandboxed solution instead of a farm solution? When would you create a sandboxed solution instead of an app for SharePoint? Lab: Working With Features and Solutions Exercise 1: Configuring SharePoint Features Exercise 2: Creating Feature Receiver Classes Exercise 3: Creating Features with Dependencies Lab Scenario Contoso increasingly relies on the assistance of contractors in various business divisions. Each contractor must sign a contract that specifies the terms of engagement and includes a non-disclosure agreement. The management team at Contoso wants a way to centrally manage these agreements. Your requirements analysis shows that you require some custom site columns, a content type, and a custom list template. You will use a Site-scoped Feature to deploy the site columns and the content type. You will create the site columns Lab Scenario declaratively, and you will use a Feature receiver class to create the content type programmatically. Creating content types programmatically provides more flexibility if you need to update the content type at a later date. You will then create a Web- scoped Feature to provision the list. Because the list relies on the site columns and the content type, the Web-scoped Feature must include a dependency on the Site-scoped Feature. Module Review and Takeaways