Saturday, June 26, 2010

Sharepoint 2010 Sandbox solutions

I would like to highlight about sandbox solutions available in sharepoint 2010.

Sandbox solutions are  a way where sharepoint solutions can be deplyod in safe envirenments. When we create a WSP package in sharepoint 2007, generally we are creating a batch file for using STSADM tool in order to install WSP package to farm. And those are full trust solutions. While sandbox solutions can directly be uploaded to site collection level using access rights of site collection administrator. It doesnt requires Farm server administrator.

Sandbox solutions are limited to site collection only. They are being stored @ solution gallary of top level site collection.

SPUCWorkerprocess.exe

Sandbox solutions are loaded into a separate process (SPUCWorkerProcess.exe). This process is monitored and implements quotas and throttling to protect the farm from sandboxed solutions that perform harmful activities, such as running tight loops that consume CPU cycles.

FOR DEVELOPERS: in oder to debug sharepoint solutions you need to attach your visual studio solution to this process.

Capabilities of Sandbox Solutions

  • List Definitions
  • List Instances 
  • Onet.xml
  • WebTemplate feature elements (instead of Webtemp.xml) 
  • Content Types/Fields 
  • Navigation 
  • Module/files 
  • Feature callouts 
  • Web Parts 
  • Support for all Web Parts that derive from System.Web.UI.WebControls.WebParts.WebPart 
  • Event receivers 
  • SPItemEventReceiver 
  • SPListEventReceiver 
  • SPWebEventReceiver 
  • Custom actions 
  • Declarative workflows

What Sandbox solutions are not supporting
  • Visual Web Parts  
  • Application Pages 
  • Custom Action Group 
  • HideCustomAction element 
  • Content Type Binding 
  • Web Application-scoped features 
  • Farm-scoped features 
  • Workflows with code




Advantages of Sandbox Solutions

  • Solutions can be installed directly by site collection administrators, no need for farm administrator. (NOTE: DONT FORGET TO ACTIVATE SOLUTION AFTER UPLOADING)
  • No need to deploy from server. No server reset required (what? no IISReset??? :) ), what else a developer required!!!!
  • Testing could be achieved from test site collection itself @production server.

Limitations of Sandbox solutions
  • Not all kind of code will be permitted in sandbox solutions. (cannot create site collections, cannot create visual webparts, can not do any IO operations)
  • There is a special environment to execute sandbox solutions. Separate storage of the solution files, separate process that runs its code and separate memory to go with it.  This will increase overhead when there are plenty of sandbox solutions. If you have deployed same solution on multiple site collections and in case when u want to upgrade that solution, it needs to be done one by one.
  • Have to remove, re-add and re-configure web parts when switching between deployment methods of same solution
  • Cannot use Page.ClientScript to register scripts
  • No support to Microsoft.SharePoint.WebPartPages namespace.
  • Making web service calls over the internet, or accessing code that is not marked to allow partially trusted callers are not supported. You also can’t deploy files to disk or add assemblies to the GAC in a sandboxed solution, and security-related functionality, such as running RunWithElevatedPriviledges and other SPSecurity methods, is not allowed.
  • No support to SPUtility.SendEmail namespace for sending mails.

 Examples

  1. http://msdn.microsoft.com/en-us/magazine/ee335711.aspx
  2. http://sandbox.codeplex.com/

Related posts

Thursday, June 24, 2010

WHAT ’S NEW IN SHAREPOINT 2010

I would like to highlight few new things introduced in Sharepoint 2010.

LINQ - With SharePoint 2010, a new LINQ provider for SharePoint converts object operations into the correct SharePoint operations using the native CAML language that SharePoint understands.

List Enhancements - List is the basic data storage element in sharepoint environment. Below is the enhancement / New features intoduced in sharepoint 2010

XSLT List View web part is a new type of web part that lets you manipulate data in a flexible manner using SharePoint Designer. A designer can easily connect to a variety of data sources to display data as needed and also setup any required conditional formatting of data. The best part about this setup is that a member of the site who is later using this data through the browser can easily interact with the views of this data or create additional views.

Business Connectivity Services (visit  http://msdn.microsoft.com/en-us/magazine/ee819133.aspx for more details)

Silverlight Integration 

Sandbox Solutions (visit http://msdn.microsoft.com/en-us/magazine/ee335711.aspx for more details). You can deploy sandboxed solutions to quickly and more securely solve business problems. Sandboxed solutions are like farm solutions except in the following ways: they are rights-restricted and have a more permissive deployment policy than farm solutions; they are limited to the site collection to which they are deployed; and their server resource usage is monitored against an administrator-controlled quota for the site collection.
Visio Services (visit http://www.chakkaradeep.com/post/SharePoint-2010-Visio-Services.aspx for more details)


InfoPath Enhancements

InfoPath forms as native SharePoint forms both on the web and when offline from within the SharePoint Workspace client. InfoPath is becoming the common form designer for forms that can be ported to SharePoint and SharePoint Workspace. Some other improvements include the ability to call REST services as a data connection and having "cascading dropdowns". There was plenty of room for improvement with InfoPath - we look forward to making use of them.

NEW IN COLLABORATION/SOCIAL COMPUTING

Blogs and wikis

Below features are now added to Blog and Wikis

  • Content rating
  • Tagging
  • Feeds
  • Record Management can now work with them
Social Tagging and Rating

Activity Feeds

Social Bookmarking

Organization Browser


NEW IN SEARCH

New Core Search Query Capabilities

  • Wildcard
  • suffix matchings
  • grouping of query items
  • logical operators
Enhanced Core Search Results

  • Content previewing for office documents
  • Filter search results by author, document types and others
Enhanced People Search: Phonetics

Enhanced People Search: Address Book Style Lookups

Enhanced People Search Results

FAST Integration

NEW IN ECM - DOCUMENT MANAGEMENT

Metadata Management and Navigation : organize your navigation and also list views by using the metadata of your content

Location - Based Metadata : SharePoint 2010 supports location - based metadata so that if a user posts a document into a specifi c location, metadata is automatically fi lled in for the user.

Document Routing : Document can automatically be routed to perticular location when it gets uploaded based on the content types and set of rules.

Unique Document IDs: Each documents are now assigned a new ID in order to seach them quickly.

Taxonomy Services (visit http://geeklit.blogspot.com/2009/12/sharepoint-taxonomy-hierarchy.html for more details)

Document Sets : Set of different documents can be grouped into a single set of document and matadata, workflows and versions can be applied to them. They can also be exported into zip.

NEW IN ECM - WCM

Standards and Browser Support : Extended support to Firefox and safari

One - Click Page Layout : Change layout of the page in single click

Enhanced Page Libraries: Now one can create folders in pages library