Managing the SharePoint 2010 Application Lifecycle - Part 2
-
Upload
chris-obrien -
Category
Documents
-
view
1.544 -
download
0
description
Transcript of Managing the SharePoint 2010 Application Lifecycle - Part 2
![Page 1: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/1.jpg)
Managing the SharePoint Application Lifecycle – beyond
version 1.0.0.0PART 2
DEV108
Chris O’Brien - MVP
![Page 2: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/2.jpg)
Chris O’Brien, MVP, MCSD.Net, MCTS www.sharepointnutsandbolts.com Twitter: @ChrisO_Brien
Hands-on developer Author of ALM chapter in MVP book Creator of Content Deployment Wizard tool Regular speaker at UK user group
![Page 3: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/3.jpg)
Last time..
Upgrading a SharePoint application
• SP2010 upgradable Features• How to version a Feature• Using code/XML to upgrade
Initial build • Feature framework changes• Leveraging WSP import
![Page 4: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/4.jpg)
Today’s focus
Upgrading a SharePoint application
• How to upgrade different artifacts
• Changes to WSP framework
• Assembly versioning in SP2010
• Versioning recommendations
![Page 5: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/5.jpg)
Recap – Feature upgrade
![Page 6: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/6.jpg)
Versioning/upgrading Features
Version attribute now has a purpose! Define what should occur in 1.0.0.0-2.0.0.0
UpgradeActions element XML – some new XML for common
scenarios Code – specify method/parameters in
CustomUpgradeActions element– New FeatureUpgrading method – add logic here
![Page 7: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/7.jpg)
Feature upgrade XML
ApplyElementManifests Integrate new artifacts into existing Feature Sometimes all you need!
AddContentTypeField Add columns to content type
MapFile Repoint a file to new location on filesystem
(uncustomized files only)
![Page 8: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/8.jpg)
Demo
UPGRADING A FEATUREUpdating functionality
![Page 9: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/9.jpg)
Artifact upgrade
![Page 10: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/10.jpg)
Upgrade - ‘provisioned’ artifacts
Typically must use API:
Artifact Upgrade
Field, list instance, view, content type binding, document convertor
• Use API
‘Standard’ cases
Content type • Use AddContentTypeField• Use API
Module (file) • Uncustomized: • Overwrite file on
filesystem• Use MapFile
• Customized: • Overwrite file in
library
![Page 11: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/11.jpg)
Upgrade - ‘declarative’ artifacts
Artifact Upgrade
Control (delegate control), CustomAction, Feature staple, workflow template
• Update XML
Typically update file on filesystem:
‘Standard’ cases
List definition • Update schema.xml (carefully!)• Deploy new list definition, mark
old as hidden
Site definition • New sites - staple new Feature• Existing sites – activate Feature
(script?)• OR upgrade existing Feature
![Page 12: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/12.jpg)
‘Upgrading workflows
Special considerations Deserialization errors after upgrade
Typically ensure new instances use new SPWorkflowAssociation to new assembly– Allow running instances to complete using old
assembly
![Page 13: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/13.jpg)
WSP framework
![Page 14: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/14.jpg)
Solution framework changes
Resource files Resx files can now target
App_GlobalResources folder
Solution dependencies But not solution receivers
Assembly binding redirects
![Page 15: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/15.jpg)
Dealing with shared assemblies
Solution dependencies: Does not deploy dependent solution Only checks at deployment time – possible
to retract a depended on solution Redirects help for versioning assemblies:
Version numbers stored everywhere! Redirect = one place to update
![Page 16: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/16.jpg)
Demo
ASSEMBLY VERSIONINGUpdating functionality
![Page 17: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/17.jpg)
Versioning strategies - ?.?.?.?
Assembly versioning – tracing back: Main thing is to increment in some way Common plans - Major.Minor.Build.Revision:
– Change severity (breaking/major/minor) – Shipping/non-shipping (product-oriented)– Incorporate sprint/iteration– Incorporate changeset number– Other custom
Consider ‘File version’ for internal versioning
![Page 18: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/18.jpg)
Versioning strategies - ?.?.?.?
Feature versioning: Main purpose - identify which version is
where across farm Use similar principles as assemblies:
– Increment major for large/new release changes
Assembly/Feature versions will diverge Keep release notes to track
![Page 19: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/19.jpg)
Summary
Now have standardized framework for upgrading applications New XML e.g. AddFieldToContentType Implement code in FeatureUpgrading event
Use the new capabilities! WSP import Solution dependencies for shared
assemblies
![Page 20: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/20.jpg)
Closing thoughts
If you didn’t before, now is the time to do versioning! Assemblies -> AssembyBindingRedirect Features -> Feature upgrade code/XML
Some extra considerations, but big benefits for non-trivial apps
![Page 21: Managing the SharePoint 2010 Application Lifecycle - Part 2](https://reader036.fdocuments.net/reader036/viewer/2022062418/554bebf7b4c9055a368b4ecb/html5/thumbnails/21.jpg)
Thank you for attending!