application life cycle in sharepoint 2010
TRANSCRIPT
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Advanced Developer Training
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Application Lifecycle Management in SharePoint 2010
NameTitleCompany
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Agenda
Application life cycle process with SharePoint 2010
Tools and processes to manage life cycle of portals
Setting up team development
Update managementSolution versioningFeature versioning
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
SHAREPOINT ALMApplication life cycle in SharePoint 2010
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
ALM challenges in 2007
Feature managementHow to version features correctly?How to upgrade already existing content types?How to know which feature receivers have been updated?
Site managementInconsistent packaging story with site templatesPreserving customizations on upgradeHow to update already provisioned sites?How to update site provisioning engine?
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
ALM in 2010
Life cycle management has been taken into account in the platform2010 platform provides much better story to manage the life cycle of deployed functionalitiesStill process planning has to be done
1.0 1.1 1.2 2.0 3.0 3.1
Release Minor bug release
Bug Release Larger new version
Production Release
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
ALM process
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
SharePoint Tools Continuum
Professional developer
Custom Web Parts
Code Workflows
Event Receivers
List Definitions
Application Pages
WSP Package
Designer/IW/Power UserCreate lists &
libs
Design Web Pages
Web part hook-up
Views & forms
Declarative Workflows
Browserediting
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
SharePoint Designer 2010
SharePoint Designer 2010’s focus has changed from page-oriented to feature/functionality orientedSPD 2010 is THE tool for building complete, rich, reusable, process-centric applications SPD can utilize modular components developed with VS2010 Target Users
Primary: Business Unit IT, Power IWSecondary: Developers (Rapid Development, Prototyping)
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Giving IT Control over SharePoint Designer 2010
Many organizations blocked SPD 2007 rather than address specific challenges introduced by the productNew control features added to SharePoint 2010 and SharePoint Designer
Server and site collection administrators can enable/disable on a Web app/site collection
Allow site to be opened in SPDAllow customization of filesAllow customization of master pages and layout pagesAllow site collection admins to see the site URL structure
These options be set at the Web app/site collection levelWeb app can allow customization of files, but site collection owner can block it
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Save Site as Template – part of ALM
Creates a WSPStores the template to solution catalog
Improvements to WSP to enable thisWebFeatures, SiteFeatures SourceVersionWebTemplate feature elementPropertyBag feature element$ListId:Lists/Announcements;WorkflowAssociation Feature ElementCustomSchema attribute on ListInstanceSolution Dependencies
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Tools – Import WSP to VS2010
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Importing existing site to Visual Studio 2010
demo
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Source Code Control
SharePoint Designer - No support for “real” source code control
Pages are now created inside of a versioned SharePoint library by default
Visual Studio - SharePoint projects have full support for source control
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Automated builds with 2010
Since VS2010 natively understands SharePoint development, not that complex anymore
No need for modified msbuild scriptsWsp packages are output to the same location as the assemblies (dll’s)More comprehensive scripting support with PowerShell to automate deploymentsPossibility still to modify different xml files to customize the build process
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
SETTING UP TEAM DEVELOPMENT
What are my options for team based development?
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Setting up team development environment
There are different options for environment setup depending on project and team size1. SharePoint on client OS2. Boot to VHD3. Centralized virtualized environmentSharePoint has to be installed on the development machineAccess to source control solution for efficient code sharing for each option
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
SharePoint on Windows 7
Install Windows 7 x 64on a physical partition
Access Enterprise Resourcessuch as Team System, Build Servers etc...
Develop!
Boot normally
Install:-SharePoint 2010-Office 2010 Visual-Studio 2010Etc..
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Win 7 + Boot to VHDInstall Windows 7 x 64on a physical partition
Develop!
Boot normally
Pull VHD from Network VHD ‘Library’ or Create with Windows 7 Boot to VHD
After creating a VHD, use bcdedit to set
bootable, boot, install Windows 7, SP2010, Office 2010, VS2010,
Etc. then copy to shared location for reuse
Access Enterprise Resourcessuch as Team System, Build Servers etc...
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Centralized virtualized environments
Install Windows 2008 on physical partition / Hyper-V Role
Develop!
Start VHD in Hyper-V and use remote
access
After creating a VHD, install OS, SP2010,
Office 2010, VS2010, Etc. and copy to
shared location for reuse
Copy new instance of the VHD for developer
Access Enterprise Resourcessuch as Team System, Build Servers etc...
Hyper-V is the simplest way to
create and manage VHDs.
Boot normally
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Team Foundation Serverfor easy Application Lifecycle Management
Work Item TrackingSource Code ControlManage Test CasesLog bugs and defectsAutomated TestingLoad TestingTeam build for continuous integration
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
MODELS FOR SOLUTION LIFE CYCLE MANAGEMENT
How to manage customization life cycle process in 2010?
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Solution Upgrade Improvements
BindingRedirect in manifest.xmlRedirect existing code to upgraded assemblies
Support for versioned feature upgradesDeclarative & Programmatic actions on upgrade
Feature Upgrade Query Object Model Find out what features are installed and what their versions are
Support to define IIS recycle type during the upgrade (full stop/start or application pool recycle)
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published April 2010
Assembly BindingRedirect
Definitions in solution manifest will result updates
to web.config, which will update existing instances
assembly references
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Upgrading Features
Feature Version AttributeActivationDependency -MinimumVersion attributeDeclarative feature upgrade elementsFeatureUpgrading event
New Feature Receiver event Object Model Changes
Version propertyQueryFeatures methodUpgrade Method
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Feature versioning files
Feature v2
Upgrade ActionXMLFeature Receive
r
FeatureFeature v1Element
filesElement
files
Element files
To modify existing
sites
To modify creation of new sites
Element files
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Upgrading Features
Version Range v1.0 - v2.0
Upgrade Action
All
XMLFeature Receive
r
v2.0 - v3.0
XMLFeature Receive
r
Each FeatureFeature
XMLFeature Receive
r
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Declarative Feature Upgrade
UpgradeActionsDeclaratively specify upgrade actions
VersionRange (Optional)Conditions based on installed version of feature
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
AddContentTypeField
Allows adding a field to an existing content type.Child instance update can be also identified
Updates content types in sub sites and in lists
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
MapFile
Allows changing of file paths within SharePoint
V1.0MyExampleP
age.aspx
V2.0MyExamplePage2.aspx
http://intranet/myexamplepage.aspx
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
ApplyFeatureManifest
Apply new artifacts to SharePoint without reactivating featuresApplies new structures defined in the element xml file as part of the upgrade
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Custom upgrade action
Custom actions can be also developedPossibility to bypass parameters to receiverFeature receiver has new FeatureUpgrading method, which is called during upgrade
Method is called for each feature instance that is active on the sitesFeature instances activated in 10 sites = 10 feature upgrade calls
Feature upgrade gets the site context from where feature is activated
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published April 2010
Declarative Feature Upgrade
When to run following actions
First custom upgrade action named ’example’
Second custom upgrade action with own parameters
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published April 2010
FeatureUpgrading Event
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Custom actions – design guidelines
Place your upgrade code to centralized utility class
Provides easier testability for your custom actionsYou can utilize the same code for upgraded and changes
Design custom actions as generic as possible using parameters
Provides flexibility and reusability on your codeUpgrade manager
XMLFeature Receive
r
XMLFeature Receive
r
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Upgrading previous customizations
demo
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Feature Upgrade Object Model
QueryFeatures method (4 overloads)(Guid featureId)(Guid featureId, bool needsUpgrade)(Guid featureId, Version featureVersion)(SPFeatureScope, bool needsUpgrade)
Available from SPWebService, SPWebApplication,SPContentDatabase and SPSite
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
How to upgrade full trust solution?
Deploy updates to farmstsadm -o upgradesolution -name solution.wsp -filename solution.wsp Update-SPSolution -Identity contoso_solution.wsp -LiteralPath c:\contoso_solution_v2.wsp -GACDeployment
Farm Wide – actual upgradepsconfig -cmd upgrade -inplace b2b
More Granular use the object modelFeature.Upgrade()Provides away to upgrade individual sites one by one
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
How to upgrade Sandbox solution?
Sandbox solutionUpload WSP with upgraded featuresand select “Upgrade” in UI
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Granular Solution Upgrade
demo
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
Summary
Application life cycle process with SharePoint 2010
Tools and processes to manage life cycle of already deployed portals
Setting up team development
Update managementSolution versioningFeature versioning
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
©2010 Microsoft Corporation. All rights reserved. RTM Content - Published May 2010
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.