Pages

Dec 30, 2010

10 reasons to use Sandboxed Solutions

  • Sandboxed solutions are secure.
  • Sandboxed solutions can be monitored.
  • Sandboxed solutions do not affect other sandboxed solutions, well atleast not in other site collections is what I mean.
  • Sandboxed solutions do not touch the file system for the most part
  • Sandboxed solutions skip application pool recycles, so debugging is not such a pain.
  • Sandboxed solutions allow the site collection administrator to perform deployment and upgrades
  • Sandboxed solutions make CAS policies look like the out of style hairstyles of 1980s
  • The Solution validation framework for sandboxed solutions is exntensible, simply inherit from the SPSolutionValidator base class.
  • Sandboxed solutions remove the need for line by line code reviews
  • Sandboxed solutions allow you to offer different level of SLAs to different site collections using Resource Quotas.

What is supported by sandboxed solutions?

Basically it is a narrowed down subset of the SharePoint OM. This is controlled with VS2010 by selecting your Visual Studio project as a sandboxed solution. It will hide any methods/classes that are not available automatically.

The following capabilities and elements are available in sandboxed solutions:

  • List definitions
  • List instances
  • Onet.xml
  • WebTemplate Feature element instead of Webtemp.xml
  • Content Types/Fields
  • Navigation
  • Module/files
  • Feature callouts
  • Web Parts derived from WebPart
  • Event receivers
    • SPItemEventReceiver
    • SPListEventReceiver
    • SPWebEventReceiver
  • Custom Actions
  • Workflows

What is not supported by sandboxed solutions?

The following capabilities and elements are not available in sandboxed solutions (from MSDN):

  • Custom Action groups
  • HideCustomAction element
  • Content Type Binding
  • Web Application-scoped Features
  • Farm-scoped Features
  • CustomPropertyToolPart Class
  • programmatic workflow
  • Event receivers
    • SPLimitedWebPartManager
  • timer jobs
  • visual WebParts
  • SharePoint mapped folders (e.g. "_layouts", and "images")

The following .NET namespaces are not supported by sandboxed solutions:

  • ADO.NET
  • System.IO
  • System.Security.Cryptography
  • System.Web.UI.ClientScriptManager

No comments: