lean-agile sharepoint development

26
Lean-Agile Development with SharePoint Bill Ayers

Upload: spdoctor

Post on 15-Jan-2015

2.884 views

Category:

Documents


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Lean-Agile SharePoint Development

Lean-Agile Development with SharePoint

Bill Ayers

Page 2: Lean-Agile SharePoint Development

Bill Ayers

MCM SharePoint Server 2010MCTS, MCITP, MCSD, MCAD, MCSA, MCDBA

etc.

Professional Scrum Master (PSM I)Consultant currently specialising in SharePoint

Development and Architecture for Web Content Management

Blog: www.SPDoctor.netE-mail: [email protected]

Twitter: @SPDoctor

Page 3: Lean-Agile SharePoint Development

• Lean– Kanban

• Agile– Scrum– XP

• Automated Testing and TDD

• Continuous Integration

Agenda:

Page 4: Lean-Agile SharePoint Development

• Big design up-front

• Write-only documentation

• Analysis paralysis

• Wrong product

• Over budget/time

• Project failure

What’s wrong with this picture?Requirements

Design/Arch

Coding

QA

Deployment

Maintenance

Page 5: Lean-Agile SharePoint Development

Time for Agile…

Page 6: Lean-Agile SharePoint Development

• Manufacturing in 1940s Japan• Reduce inventory (work in

progress - WIP)• Just-in-time• Counter-intuitive• Applies just as well to

software development

Lean

Page 7: Lean-Agile SharePoint Development

• Eliminate waste• Build quality in• Create knowledge• Defer commitment• Deliver fast• Respect people• Optimize the whole• Counter-intuitive

Lean Principles

Page 8: Lean-Agile SharePoint Development

• Visualizing work• Making policies explicit

(like DoD)• WIP limits• Focus on flow (rather

than goals)• Commitment to

continuous improvement• Well suited to reactive

processes

Kanban

Jeff Lasovski Used under Creative Commons

39

Page 9: Lean-Agile SharePoint Development

• Individuals and interactions over processes and tools

• Working software over comprehensive documentation

• Customer collaboration over contract negotiation

• Responding to change over following a plan

The Agile Manifesto

We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value:

That is, while there is value in the items on the right, we value the items on the left more.

http://agilemanifesto.org/

Page 10: Lean-Agile SharePoint Development

• Test-first development

• Pair programming

• Refactoring

• Continuous integration

• Frequent releases

• Coding standards

• Sustainable pace

Extreme Programming - XP

Page 11: Lean-Agile SharePoint Development

Roles:Product OwnerScrum MasterThe Team

ScrumDaily Scrum•What I did yesterday•What I am going to do today•Impediments

Page 12: Lean-Agile SharePoint Development

Artefacts:Product backlogSprint backlogRemaining workWorking softwareDefinition of DonePlanning board/Charts (or software)

Scrum Components

Time-boxed Events:

Sprint Planning (1-4h)

Sprint(1-4wk)

Sprint Review (1-4h)

Sprint Retrospective (1-3h)

Daily Scrum (15m)

Page 13: Lean-Agile SharePoint Development

Shopping List Story

Page 14: Lean-Agile SharePoint Development

As a team site user I want my shopping list visible on the home page So that I don’t forget

Stories and Estimation

Acceptance Criteria:

•Does a shopping list panel appear on the home page?•Does the panel show all items in the shopping list?•Are the items sorted alphabetically?

Shopping List

Page 15: Lean-Agile SharePoint Development

• To support changing requirements we require flexible emergent design and architecture

• To support changing design we need to be able to refactor and this requires automated test coverage, ideally TDD.

• To support demonstration and potential deployment at the end of each increment we require Continuous Integration.

Technical Implications

Page 16: Lean-Agile SharePoint Development

• Need up-front architecture decisions

• Complex deployment

• Difficult to unit test

SharePoint is Different

Page 17: Lean-Agile SharePoint Development

• Isolate SharePoint calls within a Repository class

• Composite design patterns e.g. MVC/MVP, with conventional mocks and stubs

• Proprietary Mocking frameworks (Typemock Isolator, JustMock, Microsoft Fakes f/w)

• Home-grown Fake SharePoint framework (!)

• SharePoint Emulators (add-on to VS2012 Ult.)

• Accept shallow integration tests (“unigration tests” or “dirty unit tests”)

Unit tests with SharePoint – the options

Page 18: Lean-Agile SharePoint Development

Code Coverage (and other dubious metrics)

Your Custom Code

SharePoint.NET

SharePoint Unmanaged Code

ASP.NET

Windows OS

SQL

Page 19: Lean-Agile SharePoint Development

TDD

write a failing test

make test pass

refactor

requirements

Page 20: Lean-Agile SharePoint Development

Demo: TDD – Shopping List Story

As a team site user I want my shopping list visible on the home page So that I don’t forget

Acceptance Criteria:

•Does a shopping list panel appear on the home page?•Does the panel show all items in the shopping list?•Are the items sorted alphabetically?

Shopping List

Page 21: Lean-Agile SharePoint Development

• Automated building and testing of merged developer code (at least daily)

• PowerShell script everything!

• New site collection on initial deployment

• Restore a base-lined content database (per release)

• Once live, maintain two environments – one for test data and one using live content database

Continuous Integration

Page 22: Lean-Agile SharePoint Development

Path to Production (DTAP Street)Developers Integration

TestUAT Production

TFS Build Server

Page 23: Lean-Agile SharePoint Development

• Build a library of PowerShell functions

• Design your functions so that they can be re-run – detect if data already exists or delete it

• Use XML file to define configuration properties for each environment

• Make sure everything is in source control!

CI Hints and Tips

Page 24: Lean-Agile SharePoint Development

• Agile is mainstream• Kanban and Scrum are popular frameworks

that can be applied to SharePoint projects• SharePoint challenges us to find new ways of

testing and deploying • Easy to explain, difficult to implement – get a

coach, if you can• Lean and Agile approach is replacing

Waterfall for most software projects for good reason – it works! (and it’s more fun)

Summary: It’s Time for Agile…

Page 25: Lean-Agile SharePoint Development

• “The Scrum Guide”, Schwaber and Sutherland (free download from scrum.org)

• “The Art of Unit Testing”, Roy Osherove• http://www.extremeprogramming.org/• “Clean Code – A Handbook of Agile Software

Craftsmanship”, Robert C Martin• Chris O’Brien http://sharepointnutsandbolts.com – series of articles

on Continuous Integration

• “Automating SharePoint 2010 with Windows PowerShell 2.0”, Gary Lapointe and Shannon Bray

• http://blogs.msdn.com/b/visualstudioalm/archive/2012/11/26/introducing-sharepoint-emulators.aspx

Recommended Reading:

Page 26: Lean-Agile SharePoint Development

Blog: www.SPDoctor.netE-mail: [email protected]

Twitter: @SPDoctor

Thank you for listening!

Bill Ayers

Lean-Agile SharePoint Development