Building Sandbox Solutions for SharePoint 2010 Scott Jamison Managing Partner, Jornata LLC [email protected]

Embed Size (px)

Citation preview

  • Slide 1
  • Building Sandbox Solutions for SharePoint 2010 Scott Jamison Managing Partner, Jornata LLC [email protected]
  • Slide 2
  • Session Info Part 1: Why Sandboxed Solutions? Part 2: Building and Deploying a Sandboxed Solution Part 3: Managing Sandboxed Solutions
  • Slide 3
  • Part 1: Why Sandboxed Solutions?
  • Slide 4
  • Issues With SharePoint Solutions Non-code solutions (SPD, Lists) are easy to deploy but are limited Code-based solutions require either: Lengthy deployment process (not agile), or Developer access to production (not safe)
  • Slide 5
  • Sandboxed Solutions Why?
  • Slide 6
  • Slide 7
  • Slide 8
  • Farm Solutions vs User Soluitons Farm Solution: Code is deployed in the solution store via stsadm o addsolution, just like in MOSS 2007 User Solution: Code is uploaded via the solutions gallery directly by the user/developer a.k.a. Sandboxed Solutions
  • Slide 9
  • Part 2: Building and Deploying a Sandboxed Solution
  • Slide 10
  • What is a Sandbox? A separate process for the Sandboxed solutions Limited functionality: Subset of Microsoft.SharePoint API Code Access Security policy Gallery for deployment Site Collection Solution Gallery Administration for managing/monitoring solutions Central administration
  • Slide 11
  • A Separate Process User Code Service (SPUCHostService.exe) Sandbox Worker Process (SPUCWorkerProcess.exe) Sandbox Worker Process Proxy (SPUCWorkerProcessProxy.exe)
  • Slide 12
  • A Subset of Microsoft.SharePoint API Microsoft.SharePoint Except SPSite constructor SPSecurity object SPWorkItem and SPWorkItemCollection objects SPAlertCollection.Add method SPAlertTemplateCollection.Add method SPUserSolution and SPUserSolutionCollection objects SPTransformUtilities Microsoft.SharePoint.Navigation Microsoft.SharePoint.Utilities Except SPUtility.SendEmail method SPUtility.GetNTFullNameandEmailFromLogin method Microsoft.SharePoint.Workflow Microsoft.SharePoint.WebPartPages Except SPWebPartManager object SPWebPartConnection object WebPartZone object WebPartPage object ToolPane object ToolPart object In concept: From the site collection down
  • Slide 13
  • Code Access Security Policy SharePointPermission.ObjectModel SecurityPermission.Execution AspNetHostingPermission.Level = Minimal Note: A fully-trusted proxy class can be created to gain access to additional resources
  • Slide 14
  • Solution Gallery Site Collection library located at /_catalogs/solutions Upload, delete, activate, deactivate, upgrade solutions
  • Slide 15
  • DEMO Building and Deploying a Sandboxed Solution
  • Slide 16
  • Supported Solution Types Content Types, Site Columns Custom Actions Declarative Workflows Event Receivers, Feature Receivers InfoPath Forms Services (not admin-appr) JavaScript, AJAX, jQuery, Silverlight List Definitions Non-visual web parts Site Pages SharePoint OnLine
  • Slide 17
  • Part 3: Managing Sandboxed Solutions
  • Slide 18
  • Central Administration Farm Management Manage User Solutions Block Solutions Configure Load Balancing
  • Slide 19
  • Central Administration Farm Management Site Collection Quotas Quotas Locks
  • Slide 20
  • Load Balancing Partial Trust can run in one of two modes Local Mode Execute code on WFE Low administration overhead Lower scalability Remote mode Execute on back-end farm machine Load balanced distribution of code execution requests Create custom Load balancers
  • Slide 21
  • Solution Monitoring Farm Administrators Set absolute limits Site Administrators Identify expensive solutions SharePoint Tracks Server Resources: CPU, Memory, SQL, Exceptions, Critical Errors, Handles, Threads,
  • Slide 22
  • Resource Quota Points AbnormalProcessTerminationCount CPUExecutionTime CriticalExceptionCount InvocationCount PercentProcessorTime ProcessCPUCycles ProcessHandleCount ProcessIOBytes ProcessThreadCount ProcessVirtualBytes SharePointDatabaseQueryCount SharePointDatabaseQueryTime UnhandledExceptionCount UnresponsiveprocessCount
  • Slide 23
  • Resource Quotas Central Admin Solution Gallery Measured in Resource Points
  • Slide 24
  • DEMO Managing Sandboxed Solutions
  • Slide 25
  • Summary Sandbox Solutions Balance agility and stability Run in a separate process Are built using Visual Studio 2010 Use a subset of the SharePoint API Are now the preferred solution type Contact Info: Scott Jamison [email protected]