Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building Sandbox Solutions for SharePoint 2010 Scott Jamison Managing Partner, Jornata LLC

Similar presentations


Presentation on theme: "Building Sandbox Solutions for SharePoint 2010 Scott Jamison Managing Partner, Jornata LLC"— Presentation transcript:

1 Building Sandbox Solutions for SharePoint 2010 Scott Jamison Managing Partner, Jornata LLC scott.jamison@jornata.com

2 Session Info Part 1: Why Sandboxed Solutions? Part 2: Building and Deploying a Sandboxed Solution Part 3: Managing Sandboxed Solutions

3 Part 1: Why Sandboxed Solutions?

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)

5 Sandboxed Solutions – Why?

6

7

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’

9 Part 2: Building and Deploying a Sandboxed Solution

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

11 A Separate Process User Code Service (SPUCHostService.exe) Sandbox Worker Process (SPUCWorkerProcess.exe) Sandbox Worker Process Proxy (SPUCWorkerProcessProxy.exe)

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

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

14 Solution Gallery Site Collection library located at /_catalogs/solutions Upload, delete, activate, deactivate, upgrade solutions

15 DEMO Building and Deploying a Sandboxed Solution

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

17 Part 3: Managing Sandboxed Solutions

18 Central Administration Farm Management  Manage User Solutions Block Solutions Configure Load Balancing

19 Central Administration Farm Management  Site Collection Quotas Quotas Locks

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

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, …

22 Resource ‘Quota’ Points AbnormalProcessTerminationCount CPUExecutionTime CriticalExceptionCount InvocationCount PercentProcessorTime ProcessCPUCycles ProcessHandleCount ProcessIOBytes ProcessThreadCount ProcessVirtualBytes SharePointDatabaseQueryCount SharePointDatabaseQueryTime UnhandledExceptionCount UnresponsiveprocessCount

23 Resource Quotas Central Admin Solution Gallery Measured in ‘Resource Points’

24 DEMO Managing Sandboxed Solutions

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 scott.jamison@jornata.com


Download ppt "Building Sandbox Solutions for SharePoint 2010 Scott Jamison Managing Partner, Jornata LLC"

Similar presentations


Ads by Google