Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Lean-Agile SharePoint Development


Published on

  • Be the first to comment

Lean-Agile SharePoint Development

  1. 1. Lean-Agile Development with SharePoint Bill Ayers
  2. 2. 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: E-mail: Twitter: @SPDoctor
  3. 3. Agenda:• Lean – Kanban• Agile – Scrum – XP• Automated Testing and TDD• Continuous Integration
  4. 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
  5. 5. Time for Agile…
  6. 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. 7. Lean Principles• Eliminate waste• Build quality in• Create knowledge• Defer commitment• Deliver fast• Respect people• Optimize the whole• Counter-intuitive
  8. 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. 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.
  10. 10. Extreme Programming - XP• Test-first development• Pair programming• Refactoring• Continuous integration• Frequent releases• Coding standards• Sustainable pace
  11. 11. Scrum Daily ScrumRoles: •What I did yesterdayProduct Owner •What I am going to do todayScrum Master •ImpedimentsThe Team
  12. 12. Scrum ComponentsArtefacts:Product backlogSprint backlogRemaining workWorking softwareDefinition of DonePlanning board/Charts (orsoftware)Time-boxed Events:Sprint Planning (1-4h)Sprint(1-4wk)Sprint Review (1-4h)Sprint Retrospective (1-3h)Daily Scrum (15m)
  13. 13. Shopping List Story
  14. 14. Stories and EstimationShopping ListAs a team site userI want my shopping list visible on the home pageSo that I don’t forgetAcceptance Criteria:•Doesa shopping list panel appear on thehome page?•Doesthe panel show all items in theshopping list?•Are the items sorted alphabetically?
  15. 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. 16. SharePoint is Different• Need up-front architecture decisions• Complex deployment• Difficult to unit test
  17. 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. 18. Code Coverage (and other dubious metrics) Your Custom Code SharePoint.NET SharePoint Unmanaged Code ASP.NET SQL Windows OS
  19. 19. TDDrequirements make test pass write a failing test refactor
  20. 20. Demo: TDD – Shopping List StoryShopping ListAs a team site userI want my shopping list visible on the home pageSo that I don’t forgetAcceptance 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. 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. 22. Path to Production (DTAP Street)Developers Integration UAT Production TestTFS Build Server
  23. 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. 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. 25. Recommended Reading:• “The Scrum Guide”, Schwaber and Sutherland (free download from• “The Art of Unit Testing”, Roy Osherove•• “Clean Code – A Handbook of Agile Software Craftsmanship”, Robert C Martin• Chris O’Brien – series of articles on Continuous Integration• “Automating SharePoint 2010 with Windows PowerShell 2.0”, Gary Lapointe and Shannon Bray•
  26. 26. Bill AyersLean-Agile SharePoint Development Blog: E-mail: Twitter: @SPDoctor Thank you for listening!