Application lifecycle management in SharePoint 2010

42
Application Lifecycle Management in SharePoint 2010 Jeremy Thake

description

Jeremy Thake, Enterprise Architect at AvePoint Inc and SharePoint MVP, will explain the principles of Application Lifecycle Management in SharePoint 2010. The session will suit SharePoint Developers, Team Leaders, Architects and Development Managers to understand how to approach ALM with SharePoint. The pillars of ALM will be discussed in detail and the benefits of each from a Solution perspective. The ALM maturity model will be presented to allow you to evaluate where you are in your own internal processes and how to mature these further. The NothingButSharePoint.com Project ALM approach will be discussed in detail as a case study, which involves global distributed development teams and designers. The pros and cons of this approach will be compared to the others. Common problems with promoting from Dev to Staging to Production will be discussed in detail. From this session you should walk away with: ·         An understanding of what application lifecycle management is ·         An understanding of the approaches to ALM with SharePoint Development ·         An understanding of how to get started with baby steps as a SharePoint Developer, Team Leader or Solution Architect    

Transcript of Application lifecycle management in SharePoint 2010

Page 1: Application lifecycle management in SharePoint 2010

Application Lifecycle Management in SharePoint 2010

Jeremy Thake

Page 2: Application lifecycle management in SharePoint 2010

Jeremy Thake

• Enterprise Architect – AvePoint• SharePoint MVP since July ‘10• Founded SharePointDevWiki.com• Co-founder of NothingButSharePoint.com• Speaker at MS TechEd 2009/10, SPC 11

[email protected]/jthake@jthake

Page 3: Application lifecycle management in SharePoint 2010

Agenda

• What ALM is• Approaches to ALM • ALM Maturity Model• Getting started• Case Study

Page 4: Application lifecycle management in SharePoint 2010

WHAT IS ALM?

Page 5: Application lifecycle management in SharePoint 2010

Application Lifecycle Management (ALM) is a continuous process of managing the life of an application through governance, development and maintenance.

WikiPedia

Page 6: Application lifecycle management in SharePoint 2010

ALM is the marriage of business management to software engineering made possible by tools that facilitate and integrate requirements management, architecture, coding, testing, tracking, and release management.

WikiPedia

Page 7: Application lifecycle management in SharePoint 2010

Three aspects of ALM

David Chappell (2008)

Page 8: Application lifecycle management in SharePoint 2010

Governance

David Chappell (2008)

Page 9: Application lifecycle management in SharePoint 2010

Development

David Chappell (2008)

Page 10: Application lifecycle management in SharePoint 2010

Operations

David Chappell (2008)

Page 11: Application lifecycle management in SharePoint 2010

Focus for today…development

• Requirements management• Architecture• Coding• Testing• Tracking• Release management

Page 12: Application lifecycle management in SharePoint 2010

APPROACHES OF ALM

Page 13: Application lifecycle management in SharePoint 2010

Today’s poll question

• I am developing Visual Studio SharePoint projects

• I am packaging all custom code as a WSP• I am using source control• I am using a build server• I am using SPDisposeCheck• I am doing unit testing

Page 14: Application lifecycle management in SharePoint 2010

Coding

• Source Control– “Copy of” projects– No source code for a build (labeling)– Branching– Shelving

Page 15: Application lifecycle management in SharePoint 2010

Coding

• Code Analysis– Consistent code

• Naming standards• Casing• Formatting

– Disposing correctly– Defensive coding– Readable coding

Page 16: Application lifecycle management in SharePoint 2010

Coding

• Debugging– Breakpoints in code– Inspecting live objects– Prevents

• debug statements throughout code• unnecessary logging whilst in development that stays

Page 17: Application lifecycle management in SharePoint 2010

Testing

• Unit Testing• Integration Testing• Web Testing• Lab Management

Page 18: Application lifecycle management in SharePoint 2010

Tracking

• Tasks• Issues• Bugs• Risks

Page 19: Application lifecycle management in SharePoint 2010

Release management

• Continuous Integration• Automation!

– release packages– unit testing– code analysis– build numbers

• Red/Green– Don’t break the build!

Page 20: Application lifecycle management in SharePoint 2010

Artifact Provisioning

Page 21: Application lifecycle management in SharePoint 2010

Declarative vs. Imperative

• Declaratively– Provision some artifacts– SPI’s built into Visual Studio

• Imperatively– Provision / de-provision all– Run class methods– Easier to debug & test– Defensive coding– Code samples– Wrapper classes

Page 22: Application lifecycle management in SharePoint 2010

SharePoint Designer

• Promotion between environments• Should certain artifacts be packaged as a

WSP?• Manual copying and pasting files• Restricting use by policy• Using third party tools to manage

deployments

Page 23: Application lifecycle management in SharePoint 2010

One farm, many feature versions active

SPDevWikiV1.0.0.0

SPDevWikiV2.0.0.0

SITE A SITE B SITE C

SPDevWikiV3.0.0.0

SPDevWikiV3.0.0.0

SPDevWikiV1.0.0.0

SPDevWikiV2.0.0.0

SPDevWikiV3.0.0.0

SPDevWikiV3.0.0.0

Page 24: Application lifecycle management in SharePoint 2010

Automated Builds

Page 25: Application lifecycle management in SharePoint 2010

Build Process

Page 26: Application lifecycle management in SharePoint 2010

Build Process

Page 27: Application lifecycle management in SharePoint 2010

Dev PC

Development

Smoke Testing

F5

Dep

loy

Team Foundation Server

Check In

Staging

Automated testing

Warm-bloodeduser testing

Build Server

Team Build

SP2010 DLL’s

Build

Unit Testing

Fix Bugs(repeat as necessary)

Nightly build

-OR-

Continuous Integration

Check in WSP

Install and Activate [script]

Bugs

WSP

WSP

Page 28: Application lifecycle management in SharePoint 2010

Unit and Integration Testing

• No interfaces• Integration• Tiered layer development• Design Patterns• TypeMock Isolator and Moles/Pex

Page 29: Application lifecycle management in SharePoint 2010

Load and Performance Testing

• Visual Studio Ultimate• Stress test code

– Simulating users• Highlights overuse of

creating new SPSite objects

• Validates server roles and hardware

Page 30: Application lifecycle management in SharePoint 2010

ALM MATURITY MODEL

Page 31: Application lifecycle management in SharePoint 2010

Where are you?

No Source Control

Source control

Automated Builds

Automated Testing

Automated Deployment

Page 32: Application lifecycle management in SharePoint 2010

GETTING STARTED

Page 33: Application lifecycle management in SharePoint 2010

The Microsoft approach

• Visual Studio 2010 Team System– Visual Studio 2010 – Team Foundation Server 2010– Test Professional 2010– Project Server 2010

• ALL INTEGRATED• TFS in the cloud is coming!

Page 34: Application lifecycle management in SharePoint 2010

Visual Studio 2010

Page 35: Application lifecycle management in SharePoint 2010

Things to know

• It doesn’t work out of the box ;-)– Need to put assemblies on TFS server http://

msdn.microsoft.com/en-us/ff622991.aspx • SharePoint/TFS Continuous Integration Starter

Pack http://sharepointci.codeplex.com/

Page 36: Application lifecycle management in SharePoint 2010

The cheaper

• Source control– TortoiseHg and Mercurial

• Continuous Integration– JetBrains Team City

Page 37: Application lifecycle management in SharePoint 2010

NOTHINGBUTSHAREPOINT.COMCase study

Page 38: Application lifecycle management in SharePoint 2010

Approach

• BitBucket.org– $10 a month for a mercurial solution

• No automated builds– as I do releases...but from Source Code

• Using AvePoint’s DocAve Deployment Manager to deploy from Dev to Test to Production

Page 39: Application lifecycle management in SharePoint 2010

Additional Tools

• Developer Dashboard stsadm -o setproperty -pn developer-dashboard -pv ondemand

• SPDisposeCheck (bit.ly/iiE3D6)• VS2010 SharePoint Power Tools (bit.ly/hmx9hS)• CKS:Dev (bit.ly/4Gpju2)• WSPBuilder 2010 (bit.ly/c5HtIZ)• Fiddler (www.fiddler2.com)• SharePoint Manager 2010 (bit.ly/4dtX5A)

Page 40: Application lifecycle management in SharePoint 2010

Q&A

Page 41: Application lifecycle management in SharePoint 2010

References

• My Links– http://delicious.com/jthake/alm+sharepoint

• Webcast– Introducing SharePoint 2010 (SP2010) Development to ALM (VS2010 and TFS2010)

• SharePoint 2010– http://sharepoint.microsoft.com/

• SharePoint ALM resource center– http://msdn.microsoft.com/en-us/sharepoint/dd552992

• SharePoint Patterns & Practices Group (SPG)– http://msdn.microsoft.com/en-us/library/ff770300.aspx

• FREE conference videos & slides– http://msdn.microsoft.com/en-us/sharepoint/ff405669.aspx– http://www.microsoft.com/downloads/details.aspx?FamilyID=f8cb362c-75ad-4cb9-

9fbc-3abcdf6afeaf• SPDisposeCheckStatic Rules

– http://spdisposecheckstatic.codeplex.com/