Friday, September 14, 2012

SharePoint 2010 Farm solutions and Sandbox solutions

Hi all,

Recently I found article about building sandbox solutions. I have jotted down few points in this blog post.

Farm Solution
Sandbox Solution
Deploying solution  
Farm solution is typically added by farm administrators via Central Administration >> System Settings >> Farm Management >>   Manage Farm Solutions in a Web Solution Package (.wsp).  
Sandbox solution is added by site owners or site collection administrators & uploaded to the “Solution Gallery” for a specific site collection again in .wsp format.
Farm administrators though view via Central Administration >> System Settings >> Farm Management >>   Manage User solutions.
Object Model
Farm solution has full access to the SharePoint object model.
Sandbox solution has restricted SharePoint object model.

Farm solutions have complete of SharePoint object model that includes >>developing programmatically workflows,
>> custom web parts,
>> Programmatically develop site definitions,
>> Full access to content database,
>> Custom application pages & master pages with delegate controls etc.
Sandbox has quite a few restrictions such as following functionality is PROHIBITED:
>> Control (Delegate Controls)
>> Access to read/write on the FILE SYTEM
>> Programmatically developing  workflows, SharePoint.WebControls
>> Programmatically developing applications pages
>>Write to disk
>> No Code behind
>> No custom web services
>> Talking to other farms

Check out restrictions on code on MSDN
Farm solution has complete control over the content such as features, workflows, site definition at the farm level. For debugging purposes developers user w3wp.exe or owstimer.exe.
Sandbox solution has a separate worker process called SPUCWorkerProcess.exe for debugging purposes.
Farm solution is not governed any security. However, developer could develop their own security model.
Furthermore, farm administrators have visibility of solution health & resources needs in the context of sandbox solutions
Sandbox solution is governed by using a point system & if developers’ code exceed the specified point per day the solution would be blocked. Default point for sandbox solution is 300 points & it’s configurable by farm administrators.   

Farms solutions are not monitored.  
Site collection administrators are responsible for monitoring the sandbox solutions which are based on restrictions by the company’s governance & farm administrator.  

However, its possible to building useful sandbox solutions such as:
  • Useful when working on the SharePoint 2010 Client object model (Micorsoft.SharePoint.Client) using JavaScript & Silverlight
  • WebParts 
  • InfoPath  
     Visual Studio 2010 SharePoint Power Tools facilitates developers to build Sandbox compatible & Sandbox compilation.


References: Farm solution VS Sandbox solution

How to: Use cascading drop-down lists in PowerApps

Hi all, Using cascading dropdown, users can easily fill the forms by selecting drop-down values dependent on values from another dro...