Feature and Solution Framework in SharePoint 2010, Ayman El-Hattab MVP
-
Upload
ayman-el-hattab -
Category
Technology
-
view
1.695 -
download
1
description
Transcript of Feature and Solution Framework in SharePoint 2010, Ayman El-Hattab MVP
Feature and Solution Framework in SP2010
Ayman El-HattabTechnology Solution ProfessionalMEA Center of ExpertiseSharePoint [email protected] www.aymanelhattab.com
Session Objectives
Become familiar with the Feature frameworkUnderstand how Solutions workFarm Solutions Vs. Sandboxed Solutions
Features
Provide the primary deployment unit for SharePointCan deliver functionality for Farms (SPFarm), Web Applications (SPWebApplication), Sites (SPSite) and Webs (SPWeb)Defined using CAMLAllow .NET execution on Installation, Uninstallation, Activation, Deactivation and Upgrade.
Capabilities of FeaturesInstall filesModify user interface elementsDefine data structure and storage elements
ColumnsContent TypesLists and Libraries
Create Site DefinitionsDefine WorkflowsApply propertiesAlmost everything you see and you don’t see in SharePoint
Features in the SharePoint Root
14\Template\FeaturesSubdirectory for each feature (14\Template\Features\[Feature Name])Feature.xml (Manifest, Scope,…)0 or more Elements (Fields, Content Types, etc…)0 or more feature resources or element files (Master Page, Web Part,…)
Feature and Solution Framework in SP2010
Exploring OOB Features in SharePoint Root (14 hive)
Demo
Installation and Activation
It’s not enough to just put some XML files on the disk to make use of the featureInstall
WSP (Best Practice).STSADM or PowerShell
Activate FeatureSite AdministrationSTSADM or PowerShell
Feature and Solution Framework in SP2010
Manually Create, Install and Activate a Module Feature
Demo
Demo Recap
We manually created a feature with a module element.A module element can be used to deploy any files ( Master Pages, CSS Files, Images,…)We manually installed the feature using stsadm command line utility.We manually activated the Web-scoped feature from Site settings page.
Other feature elementsSite ColumnsContent Types (Reusable collection of site columns)List DefinitionsList InstancesContent Type BindingWeb PartsSite TemplatesWorkflow / Workflow AssociationEvent Handlers (Triggers)Others
Defining Data Structures
Field element defines a Site ColumnsContentType element defines a Site Content TypeListInstance defines an instance of a list definitionContentTypeBinding element binds a content type to a list
Defining Data Structures (The easy way!)
Prototype and extract CAML definitions using SharePoint Manager 2010Create a site collection for prototyping and another one for developmenthttp://spm.codeplex.com
Feature and Solution Framework in SP2010
Defining Data Structures Using Features
Demo
Solutions
Package features and other resources into one package for deployment (cabinet file)Can contain assemblies (Receivers, Code Behind for pages or user controls, Web Part code,…)WSPBuilder for SharePoint 2007 (http://wspbuilder.codeplex.com )Easily created with Visual Studio 2010.
Farm SolutionsHow does it work in detail
MySolution.wsp(WSS Solution Cab)
Feature Manifests Config DB
UI, CommandLine, OM“deploy”command
adddelete
Deploy/Upgraderetract
Site definitions
Assemblies
Farm Servers
Pages
Sandboxed SolutionsSolution catalog
Great choice for hosted scenarios.Uploaded to the Solution gallery available at the site collection level and can be monitored and tracked by admins (No more infinite loops).
Feature and Solution Framework in SP2010
Creating solutions by saving a site as a template!
Demo