SharePoint DeveloperApplication Lifecycle ProcessIvan SandersSharePoint ArchitectDimension Solutions inc.ivan@dimension-si.com
AgendaApplication life cycle process with SharePoint 2010Tools and processes to manage life cycle of portalsSetting up team developmentUpdate managementSolution versioningFeature versioning
ALMLife cycle management has been taken into account in the platformThe SharePoint platform provides a rich set of features to deploy custom codeStill process planning has to be done
ALM process
SharePoint Tools ContinuumVisualStudioSharePointDesignerProfessional developerDesigner/IW/Power UserCreate lists & libsDesign Web PagesWeb part hook-upViews & formsDeclarative WorkflowsCustom Web PartsCode WorkflowsEvent ReceiversList DefinitionsApplication PagesWSP PackageBrowserediting
Importing existing site to Visual Studio 2008demo
Source Code ControlSharePoint Designer - No support for “real” source code controlPages are created inside of a versioned SharePoint library by defaultVisual Studio - SharePoint projects have full support for source control
What are my options for team based development?Setting up team development
Setting up team development environmentThere are different options for environment setup depending on project and team sizeSharePoint on client OSBoot to VHDCentralized virtualized environmentSharePoint has to be installed on the development machineAccess to source control solution for efficient code sharing for each option
SharePoint on Windows 2008 R2Install Windows 2008 x 64on a physical partitionInstall:SharePoint 2007
Office 2010 Visual
Studio 2008,
VSeWSS 1.3, Etc..Access Enterprise Resourcessuch as Team System, Build Servers etc...Develop!Boot normally
Win 7 + Boot to VHDInstall Windows 7 x 64on a physical partitionPull VHD from Network VHD ‘Library’ or Create with Windows 7Access Enterprise Resourcessuch as Team System, Build Servers etc...Develop!After creating a VHD, use bcdedit to set bootable, boot, install Windows 2008, SP2007 Office 2010, VS2010, Etc. then copy to shared location for reuseBoot normallyBoot to VHD
Centralized virtualized environmentsInstall Windows 2008 on physical partition / Hyper-V RoleCopy new instance of the VHD for developerStart VHD in Hyper-V and use remote accessAfter creating a VHD, install OS, SP200,7 Office 2010, VS2010, Etc. and copy to shared location for reuseDevelop!Boot normallyAccess Enterprise Resourcessuch as Team System, Build Servers etc...Hyper-V is the simplest way to create and manage VHDs.
Team Foundation Server 2010for easy Application Lifecycle ManagementWorks with Visual Studio 2008Work Item TrackingSource Code ControlManage Test CasesLog bugs and defectsAutomated TestingLoad TestingTeam build for continuous integration
How to manage customization life cycle process in 2010?models for Solution life cycle management
Solution Upgrade ImprovementsBindingRedirect in manifest.xmlRedirect existing code to upgraded assembliesSupport for versioned feature upgradesDeclarative & Programmatic actions on upgradeFeature Upgrade Query Object Model Find out what features are installed and what their versions areSupport to define IIS recycle type during the upgrade (full stop/start or application pool recycle)
Assembly BindingRedirectDefinitions in solution manifest will result updates to web.config, which will update existing instances assembly references
Upgrading FeaturesFeature Version AttributeActivationDependency -MinimumVersion attributeDeclarative feature upgrade elementsFeatureUpgrading eventNew Feature Receiver event Object Model ChangesVersion propertyQueryFeatures methodUpgrade Method
Feature versioning filesFeatureElement filesElement filesFeature v1Element filesElement filesFeature v2XMLFeature ReceiverTo modify existing sitesTo modify creation of new sitesUpgrade Action
Upgrading FeaturesEach FeatureFeaturev1.0 - v2.0Allv2.0 - v3.0Version RangeXMLFeature ReceiverXMLFeature ReceiverXMLFeature ReceiverUpgrade Action
Declarative Feature UpgradeUpgradeActionsDeclaratively specify upgrade actionsVersionRange (Optional)Conditions based on installed version of feature
AddContentTypeFieldAllows adding a field to an existing content type.Child instance update can be also identifiedUpdates content types in sub sites and in lists
MapFileAllows changing of file paths within SharePointhttp://intranet/myexamplepage.aspxV1.0MyExamplePage.aspxV2.0MyExamplePage2.aspx
ApplyFeatureManifestApply new artifacts to SharePoint without reactivating featuresApplies new structures defined in the element xml file as part of the upgrade
Custom upgrade actionCustom actions can be also developedPossibility to bypass parameters to receiverFeature receiver has new FeatureUpgrading method, which is called during upgradeMethod is called for each feature instance that is active on the sitesFeature instances activated in 10 sites = 10 feature upgrade callsFeature upgrade gets the site context from where feature is activated
Declarative Feature UpgradeWhen to run following actionsFirst custom upgrade action named ’example’Second custom upgrade action with own parameters
FeatureUpgrading Event
Custom actions – design guidelinesPlace your upgrade code to centralized utility classProvides easier testability for your custom actionsYou can utilize the same code for upgraded and changesDesign custom actions as generic as possible using parametersProvides flexibility and reusability on your codeXMLFeature ReceiverUpgrade managerXMLFeature Receiver
Upgrading previous customizationsdemo
Feature Upgrade Object ModelQueryFeatures method (4 overloads)(GuidfeatureId)(GuidfeatureId, boolneedsUpgrade)(GuidfeatureId, Version featureVersion)(SPFeatureScope, boolneedsUpgrade)Available from SPWebService, SPWebApplication,SPContentDatabase and SPSite
How to upgrade full trust solution?Deploy updates to farmstsadm-o upgradesolution -name solution.wsp -filename solution.wspUpdate-SPSolution -Identity contoso_solution.wsp -LiteralPath c:\contoso_solution_v2.wsp -GACDeploymentFarm Wide – actual upgradepsconfig -cmd upgrade -inplace b2bMore Granular use the object modelFeature.Upgrade()Provides away to upgrade individual sites one by one
How to upgrade Sandbox solution?Sandbox solutionUpload WSP with upgraded featuresand select “Upgrade” in UI

Developer application lifecycle process and tools - v.5

  • 1.
    SharePoint DeveloperApplication LifecycleProcessIvan SandersSharePoint ArchitectDimension Solutions inc.ivan@dimension-si.com
  • 2.
    AgendaApplication life cycleprocess with SharePoint 2010Tools and processes to manage life cycle of portalsSetting up team developmentUpdate managementSolution versioningFeature versioning
  • 3.
    ALMLife cycle managementhas been taken into account in the platformThe SharePoint platform provides a rich set of features to deploy custom codeStill process planning has to be done
  • 4.
  • 5.
    SharePoint Tools ContinuumVisualStudioSharePointDesignerProfessionaldeveloperDesigner/IW/Power UserCreate lists & libsDesign Web PagesWeb part hook-upViews & formsDeclarative WorkflowsCustom Web PartsCode WorkflowsEvent ReceiversList DefinitionsApplication PagesWSP PackageBrowserediting
  • 6.
    Importing existing siteto Visual Studio 2008demo
  • 7.
    Source Code ControlSharePointDesigner - No support for “real” source code controlPages are created inside of a versioned SharePoint library by defaultVisual Studio - SharePoint projects have full support for source control
  • 8.
    What are myoptions for team based development?Setting up team development
  • 9.
    Setting up teamdevelopment environmentThere are different options for environment setup depending on project and team sizeSharePoint on client OSBoot to VHDCentralized virtualized environmentSharePoint has to be installed on the development machineAccess to source control solution for efficient code sharing for each option
  • 10.
    SharePoint on Windows2008 R2Install Windows 2008 x 64on a physical partitionInstall:SharePoint 2007
  • 11.
  • 12.
  • 13.
    VSeWSS 1.3, Etc..AccessEnterprise Resourcessuch as Team System, Build Servers etc...Develop!Boot normally
  • 14.
    Win 7 +Boot to VHDInstall Windows 7 x 64on a physical partitionPull VHD from Network VHD ‘Library’ or Create with Windows 7Access Enterprise Resourcessuch as Team System, Build Servers etc...Develop!After creating a VHD, use bcdedit to set bootable, boot, install Windows 2008, SP2007 Office 2010, VS2010, Etc. then copy to shared location for reuseBoot normallyBoot to VHD
  • 15.
    Centralized virtualized environmentsInstallWindows 2008 on physical partition / Hyper-V RoleCopy new instance of the VHD for developerStart VHD in Hyper-V and use remote accessAfter creating a VHD, install OS, SP200,7 Office 2010, VS2010, Etc. and copy to shared location for reuseDevelop!Boot normallyAccess Enterprise Resourcessuch as Team System, Build Servers etc...Hyper-V is the simplest way to create and manage VHDs.
  • 16.
    Team Foundation Server2010for easy Application Lifecycle ManagementWorks with Visual Studio 2008Work Item TrackingSource Code ControlManage Test CasesLog bugs and defectsAutomated TestingLoad TestingTeam build for continuous integration
  • 17.
    How to managecustomization life cycle process in 2010?models for Solution life cycle management
  • 18.
    Solution Upgrade ImprovementsBindingRedirectin manifest.xmlRedirect existing code to upgraded assembliesSupport for versioned feature upgradesDeclarative & Programmatic actions on upgradeFeature Upgrade Query Object Model Find out what features are installed and what their versions areSupport to define IIS recycle type during the upgrade (full stop/start or application pool recycle)
  • 19.
    Assembly BindingRedirectDefinitions insolution manifest will result updates to web.config, which will update existing instances assembly references
  • 20.
    Upgrading FeaturesFeature VersionAttributeActivationDependency -MinimumVersion attributeDeclarative feature upgrade elementsFeatureUpgrading eventNew Feature Receiver event Object Model ChangesVersion propertyQueryFeatures methodUpgrade Method
  • 21.
    Feature versioning filesFeatureElementfilesElement filesFeature v1Element filesElement filesFeature v2XMLFeature ReceiverTo modify existing sitesTo modify creation of new sitesUpgrade Action
  • 22.
    Upgrading FeaturesEach FeatureFeaturev1.0- v2.0Allv2.0 - v3.0Version RangeXMLFeature ReceiverXMLFeature ReceiverXMLFeature ReceiverUpgrade Action
  • 23.
    Declarative Feature UpgradeUpgradeActionsDeclarativelyspecify upgrade actionsVersionRange (Optional)Conditions based on installed version of feature
  • 24.
    AddContentTypeFieldAllows adding afield to an existing content type.Child instance update can be also identifiedUpdates content types in sub sites and in lists
  • 25.
    MapFileAllows changing offile paths within SharePointhttp://intranet/myexamplepage.aspxV1.0MyExamplePage.aspxV2.0MyExamplePage2.aspx
  • 26.
    ApplyFeatureManifestApply new artifactsto SharePoint without reactivating featuresApplies new structures defined in the element xml file as part of the upgrade
  • 27.
    Custom upgrade actionCustomactions can be also developedPossibility to bypass parameters to receiverFeature receiver has new FeatureUpgrading method, which is called during upgradeMethod is called for each feature instance that is active on the sitesFeature instances activated in 10 sites = 10 feature upgrade callsFeature upgrade gets the site context from where feature is activated
  • 28.
    Declarative Feature UpgradeWhento run following actionsFirst custom upgrade action named ’example’Second custom upgrade action with own parameters
  • 29.
  • 30.
    Custom actions –design guidelinesPlace your upgrade code to centralized utility classProvides easier testability for your custom actionsYou can utilize the same code for upgraded and changesDesign custom actions as generic as possible using parametersProvides flexibility and reusability on your codeXMLFeature ReceiverUpgrade managerXMLFeature Receiver
  • 31.
  • 32.
    Feature Upgrade ObjectModelQueryFeatures method (4 overloads)(GuidfeatureId)(GuidfeatureId, boolneedsUpgrade)(GuidfeatureId, Version featureVersion)(SPFeatureScope, boolneedsUpgrade)Available from SPWebService, SPWebApplication,SPContentDatabase and SPSite
  • 33.
    How to upgradefull trust solution?Deploy updates to farmstsadm-o upgradesolution -name solution.wsp -filename solution.wspUpdate-SPSolution -Identity contoso_solution.wsp -LiteralPath c:\contoso_solution_v2.wsp -GACDeploymentFarm Wide – actual upgradepsconfig -cmd upgrade -inplace b2bMore Granular use the object modelFeature.Upgrade()Provides away to upgrade individual sites one by one
  • 34.
    How to upgradeSandbox solution?Sandbox solutionUpload WSP with upgraded featuresand select “Upgrade” in UI
  • 35.
  • 36.
    SummaryApplication life cycleprocess with SharePoint 2007Tools and processes to manage life cycle of already deployed portalsSetting up team developmentUpdate managementSolution versioningFeature versioning