2. Bill Ayers
MCM SharePoint Server 2010
MCTS, 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.net
E-mail: BillA@flosim.com
Twitter: @SPDoctor
3. Agenda:
• Lean
– Kanban
• Agile
– Scrum
– XP
• Automated Testing and TDD
• Continuous Integration
4. What’s wrong with this picture?
Requirements
• Big design up-front Design/Arch
• Write-only Coding
documentation
• Analysis paralysis QA
• Wrong product
• Over budget/time Deployment
• Project failure
Maintenance
6. Lean
• Manufacturing in 1940s
Japan
• Reduce inventory (work
in progress - WIP)
• Just-in-time
• Counter-intuitive
• Applies just as well to
software development
7. Lean Principles
• Eliminate waste
• Build quality in
• Create knowledge
• Defer commitment
• Deliver fast
• Respect people
• Optimize the whole
• Counter-intuitive
8. Kanban 9 3
• Visualizing work
• Making policies explicit
(like DoD) Jeff Lasovski
Used under Creative Commons
• WIP limits
• Focus on flow (rather
than goals)
• Commitment to
continuous improvement
• Well suited to reactive
processes
9. 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:
• Individuals and interactions over processes and tools
• Working software over comprehensive documentation
• Customer collaboration over contract negotiation
• Responding to change over following a plan
That is, while there is value in the items
on the right, we value the items on the left
more.
http://agilemanifesto.org/
10. Extreme Programming - XP
• Test-first development
• Pair programming
• Refactoring
• Continuous integration
• Frequent releases
• Coding standards
• Sustainable pace
11. Scrum
Daily Scrum
Roles: •What I did yesterday
Product Owner •What I am going to do today
Scrum Master •Impediments
The Team
14. Stories and Estimation
Shopping List
As a team site user
I want my shopping list visible on the home page
So that I don’t forget
Acceptance Criteria:
•Doesa shopping list panel appear on the
home page?
•Doesthe panel show all items in the
shopping list?
•Are the items sorted alphabetically?
15. Technical Implications
• 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.
16. SharePoint is Different
• Need up-front architecture decisions
• Complex deployment
• Difficult to unit test
17. Unit tests with SharePoint – the options
• 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”)
18. Code Coverage (and other dubious metrics)
Your Custom
Code
SharePoint.NET
SharePoint
Unmanaged Code
ASP.NET
SQL
Windows OS
20. Demo: TDD – Shopping List Story
Shopping List
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?
21. Continuous Integration
• 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
22. Path to Production (DTAP Street)
Developers Integration UAT Production
Test
TFS Build Server
23. CI Hints and Tips
• 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!
24. Summary: It’s Time for Agile…
• 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)
25. Recommended Reading:
• “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/intr
26. Bill Ayers
Lean-Agile SharePoint Development
Blog: www.SPDoctor.net
E-mail: BillA@flosim.com
Twitter: @SPDoctor
Thank you for listening!