Managing the SharePoint Application Lifecycle – beyond version 1.0.0.0PART 1<br />DEV103<br />Chris O’Brien - MVP<br />
Chris O’Brien, MVP, MCSD.Net, MCTS<br />www.sharepointnutsandbolts.com<br />Twitter: @ChrisO_Brien<br />Hands-on developer...
What is ALM?<br />Definition:<br />Considering all aspects of app through lifetime<br />Key aspect: managing upgrades and ...
Part 1 (this session)<br />Initial build<br /><ul><li>Feature development – XML/code
Building Feature XML</li></ul>Upgrading a SharePoint application<br /><ul><li>SP2010 upgradable Features
How to version a Feature
Using code/XML to upgrade</li></li></ul><li>Part 2 (Weds 2pm)<br /><ul><li>How to upgrade different artifacts
Changes to WSP framework
Assembly versioning in SP2010
Versioning recommendations</li></ul>Upgrading a SharePoint application<br />
Considerations in initial build<br />Decision: provisioning with XML or code?<br />Drivers to use code approach:<br />Abil...
Developing Feature XML<br />By hand<br />Some ‘startup’ support with VS item templates<br />Copy/paste from last project ...
Feature framework changes<br />
Receivers<br />New XML<br />Can now add event receiver to specific list declaratively:<br />
PropertyBag<br />New XML<br />Used to set list item values declaratively<br />Also entries on root web, web, list<br />
WorkflowAssociation<br />New XML<br />Used to add workflow to list/ctype<br />
WebTemplate<br />New XML<br />Similar to site def, for web only<br />Also used in sandbox<br />
CustomAction<br />New XML<br />Expanded for ribbon customization<br />Can also add JS to page (SPSite-scoped)<br />
wsp IMPORT<br />Streamlining the initial site build<br />
WSP import gotchas<br />OOTB site def artifacts included<br />NOT full fidelity:<br /> Can’t do BCS entities, code WFs, li...
WSP import recommendations<br />Do not use generated VS project itself<br />Selectively move artifacts into ‘created’ VS p...
Feature versioning/upgrade<br />
Approaches for upgrading<br />Create new feature<br />Staple to existing site def for new sites<br />Script activation on ...
Versioning/upgrading Features<br />Version attribute now has a purpose!<br />Define what should occur in 1.0.0.0-2.0.0.0<b...
Feature upgrade XML<br />ApplyElementManifests<br />Integrate new artifacts into existing Feature<br />Sometimes all you n...
Feature dependencies<br />Can now depend on specific version of Feature (MinimumVersion)<br />Depended-on Features auto-up...
UPGRADING A FEATURE<br />Updating functionality<br />
Triggering upgrade<br />NOT automatic on deployment/ reactivation!<br />Run [Foo].QueryFeatures() to find Features requiri...
Upcoming SlideShare
Loading in …5
×

Managing the SharePoint 2010 Application Lifecycle - Part 1

2,661 views
2,546 views

Published on

The first of two presentations by Chris O'Brien at the SharePoint Evolutions Conference, aimed at SharePoint developers - covers new capabilities of SharePoint 2010 in managing changes and upgrades to exisitng apps.

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,661
On SlideShare
0
From Embeds
0
Number of Embeds
51
Actions
Shares
0
Downloads
69
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Managing the SharePoint 2010 Application Lifecycle - Part 1

  1. 1. Managing the SharePoint Application Lifecycle – beyond version 1.0.0.0PART 1<br />DEV103<br />Chris O’Brien - MVP<br />
  2. 2. Chris O’Brien, MVP, MCSD.Net, MCTS<br />www.sharepointnutsandbolts.com<br />Twitter: @ChrisO_Brien<br />Hands-on developer<br />Author of ALM chapter in MVP book<br />Creator of Content Deployment Wizard tool<br />Regular speaker at UK user group<br />
  3. 3. What is ALM?<br />Definition:<br />Considering all aspects of app through lifetime<br />Key aspect: managing upgrades and change<br />SharePoint presents unique challenges – complex platform!<br />
  4. 4. Part 1 (this session)<br />Initial build<br /><ul><li>Feature development – XML/code
  5. 5. Building Feature XML</li></ul>Upgrading a SharePoint application<br /><ul><li>SP2010 upgradable Features
  6. 6. How to version a Feature
  7. 7. Using code/XML to upgrade</li></li></ul><li>Part 2 (Weds 2pm)<br /><ul><li>How to upgrade different artifacts
  8. 8. Changes to WSP framework
  9. 9. Assembly versioning in SP2010
  10. 10. Versioning recommendations</li></ul>Upgrading a SharePoint application<br />
  11. 11. Considerations in initial build<br />Decision: provisioning with XML or code?<br />Drivers to use code approach:<br />Ability to debug provisioning!<br />More control over sequencing<br />Upgrading artifacts requires code anyway<br />BUT, some XML always required:<br />Site definitions, list templates, delegate controls, custom actions<br />
  12. 12. Developing Feature XML<br />By hand<br />Some ‘startup’ support with VS item templates<br />Copy/paste from last project <br />NEW – reverse-engineer with tools<br />Step 1: Save site as template (WSP)<br />Step 2: Import WSP in VS2010<br />
  13. 13. Feature framework changes<br />
  14. 14. Receivers<br />New XML<br />Can now add event receiver to specific list declaratively:<br />
  15. 15. PropertyBag<br />New XML<br />Used to set list item values declaratively<br />Also entries on root web, web, list<br />
  16. 16. WorkflowAssociation<br />New XML<br />Used to add workflow to list/ctype<br />
  17. 17. WebTemplate<br />New XML<br />Similar to site def, for web only<br />Also used in sandbox<br />
  18. 18. CustomAction<br />New XML<br />Expanded for ribbon customization<br />Can also add JS to page (SPSite-scoped)<br />
  19. 19. wsp IMPORT<br />Streamlining the initial site build<br />
  20. 20. WSP import gotchas<br />OOTB site def artifacts included<br />NOT full fidelity:<br /> Can’t do BCS entities, code WFs, list/site defs and more..<br />NOT supported to import 2007 WSP!<br />Round-trip/customized files issue<br />Web part properties – serialized as binary<br />
  21. 21. WSP import recommendations<br />Do not use generated VS project itself<br />Selectively move artifacts into ‘created’ VS project(s)<br />
  22. 22. Feature versioning/upgrade<br />
  23. 23. Approaches for upgrading<br />Create new feature<br />Staple to existing site def for new sites<br />Script activation on existing sites<br />Upgrade existing feature<br />Old way: reactivate feature<br />ISSUE: Some artifacts get duplicated<br />ISSUE: May be undesirable for activation code to run multiple times<br />New way: upgrade feature<br />
  24. 24. Versioning/upgrading Features<br />Version attribute now has a purpose!<br />Define what should occur in 1.0.0.0-2.0.0.0<br />UpgradeActions element<br />XML – some new XML for common scenarios<br />Code – specify method/parameters in CustomUpgradeActions element<br />New FeatureUpgrading method – add logic here<br />
  25. 25. Feature upgrade XML<br />ApplyElementManifests<br />Integrate new artifacts into existing Feature<br />Sometimes all you need!<br />AddContentTypeField<br />Add columns to content type<br />MapFile<br />Repoint a file to new location on filesystem (uncustomized files only)<br />
  26. 26. Feature dependencies<br />Can now depend on specific version of Feature (MinimumVersion)<br />Depended-on Features auto-upgraded where possible <br />Plus same dependency rules as 2007:<br />Cannot depend on lower scope<br />Hidden features cannot have dependencies<br />
  27. 27. UPGRADING A FEATURE<br />Updating functionality<br />
  28. 28. Triggering upgrade<br />NOT automatic on deployment/ reactivation!<br />Run [Foo].QueryFeatures() to find Features requiring upgrade<br />Run SPFeature.Upgrade() on all/selected<br />No UI, PS cmdlet, STSADM cmd to do this<br />
  29. 29. Upgrade tool on Codeplex<br />http://spfeatureupgrade.codeplex.com(soon!):<br />
  30. 30. Feature upgrade gotchas<br />Messages not logged by default – change ULS settings for :<br />“Feature Infrastructure”, “Fields”, “General”<br />BeginVersion inclusive but EndVersion not<br />Newly-activated Feature instances out of sync = Feature design issue<br />Ensure obey ‘elements by scope’ rules!<br />
  31. 31. Summary <br />WSP import useful in initial build<br />Now have standardized framework for upgrading applications<br />New XML e.g. AddFieldToContentType<br />Implement code in FeatureUpgrading event<br />
  32. 32. Next time..<br /><ul><li>Features
  33. 33. Assemblies</li></li></ul><li>Thank you for attending!<br />Part 2 – Tues 11:45am<br />

×