Features in SP 2010
Deployment scope of Features
- Farm,
- Web Application,
- Site Collection,
- Web Site
A sample Feature element tag is given below:
Id="F62C96CF-79FD-44be-8882-E9BFBD199184"
Title="Feature Title"
Description="Feature Description"
Version="1.0.0.0"
Scope="Site"
Hidden="false">
Web Site scoped Feature (Scope="Web"):A Web Site scoped Feature is one that can be activated only at the individual Web site level. List templates, list instances, custom actions, event receivers, etc are the some common elements for web site scoped features. Web Site scoped features can be activated by using:
Run the following STSADM command:
stsadm -o installfeature -name FeatureFolderName –url http://servername/site/subsite
A Site Collection scoped Feature is one that can be activated at the site collection level and contains items that apply to the site collection as a whole (for example, content types that are shared across the site collection), as well as items that can be activated per site (for example, list instances, etc). Site Collection scoped features can be activated by:
Run the following STSADM command:
stsadm -o installfeature -name FeatureFolderName –url http://servername/site/sitecollection
A Web Application scoped Feature is one that can be activated at the web application level and contains items like administrative web application links, delegate control registrations, feature/site template association, document form registrations, etc. A farm Feature can contain, for example, links to /_layouts pages and files, /_admin pages, and other elements. Web Applicationscoped features can be activated by using:
Run the following STSADM command:
stsadm -o installfeature -name FeatureFolderName -url http://servername
A Farm scoped Feature can be activated at the server farm level. A farm Feature contains a number of elements that are critical for implementing applications and logic anywhere within a deployment. A farm Feature can contain, for example, links to /_layouts pages and files, /_admin pages, and other elements. Farm scoped features can be activated by using:
Run the following STSADM command:
stsadm -o installfeature -name FeatureFolderName
Globally Deployed Solutions
When a solution is deployed globally, all SharePoint application pools, including Central Administration’s, are recycled automatically. This can be good and bad. This is good because any GAC installed DLL that has been upgraded needs to be reloaded. This can be bad though with regards to the availability of your entire SharePoint Farm.
Web Application Targeted Solutions
When a web application targeted solution is deployed or retracted, only the application pools of the targeted web applications are recycled. When deploying and retracting a web application targeted solution, deploy or retract it only to those web applications that will use it … thus preventing unnecessary recycling of application pools.
Sandbox Solutions
Sandbox solutions are deployed to the site collection. This new mechanism has been introduced in SharePoint 2010 to provided more isolation between deployed components. Sandbox Solutions deployment does not require application pool recycle and does not allow deploying DLLs into the GAC, as everything is stored in content database where site collection resides. These solution also provide much more restrictive execution model and limited access to SharePoint API.
Ref: http://sharepoint.stackexchange.com/questions/27436/explain-it-to-me-sharepoint-deployment-scope-solution-and-features