1 / 25

Building Sandbox Solutions for SharePoint 2010

Building Sandbox Solutions for SharePoint 2010. Scott Jamison Managing Partner, Jornata LLC scott.jamison@jornata.com. Session Info. Part 1: Why Sandboxed Solutions? Part 2: Building and Deploying a Sandboxed Solution Part 3 : Managing Sandboxed Solutions.

torin
Download Presentation

Building Sandbox Solutions for SharePoint 2010

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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? Security & Stability BusinessAgility Totally Agile Business • Simple deployment model • Limited restrictions on developer access to farm • All resources are available to solutions • Iterative development process

  6. Sandboxed Solutions – Why? Security & Stability BusinessAgility Totally Stable & Secure • ‘Clean Room’ Datacenter • 3 week change control process • Formal code review • Severe restrictions on resource access

  7. Sandboxed Solutions – Why? Security & Stability BusinessAgility Essential Agility Essential Stability • Easy deployment • Iterative development • Safe • Limited API Access • Monitored

  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 In concept: From the site collection down • Microsoft.SharePointExcept • SPSite constructor • SPSecurity object • SPWorkItem and SPWorkItemCollection objects • SPAlertCollection.Addmethod • SPAlertTemplateCollection.Add method • SPUserSolution and SPUserSolutionCollection objects • SPTransformUtilities • Microsoft.SharePoint.Navigation • Microsoft.SharePoint.UtilitiesExcept • SPUtility.SendEmail method • SPUtility.GetNTFullNameandEmailFromLogin method • Microsoft.SharePoint.Workflow • Microsoft.SharePoint.WebPartPagesExcept • SPWebPartManager object • SPWebPartConnection object • WebPartZone object • WebPartPage object • ToolPane object • ToolPart object

  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

More Related