Maintainable Testable SharePoint Components SPSBE 2014

1,556 views

Published on

My slides from the session on SharePoint Saturday Belgium 2014

Published in: Technology
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
1,556
On SlideShare
0
From Embeds
0
Number of Embeds
21
Actions
Shares
0
Downloads
9
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide
  • Template may not be modified Twitter hashtag: #spsbe for all sessions
  • How Beezybranchesaredone
  • Maintainable Testable SharePoint Components SPSBE 2014

    1. 1. How to Build Maintainable and Testable Custom SharePoint Components #SPSBE24 Edin Kapić April 26th, 2014
    2. 2. Thanks to our sponsors! Gold Silver
    3. 3. Beezy Catalonian SharePoint User Group sug.cat Ik vraag me af of dit bier compatibel is met SharePint @ekapic www.edinkapic.com Edin Kapić
    4. 4. SharePoint code should be...
    5. 5. Deployment structure Code structure Source code management Unit testing SharePoint Agenda for today Maintainable Testable
    6. 6. Deployment structure
    7. 7. Monolithic WSP Simpler Retraction of one WSP removes shared libraries from BIN/GAC Only one version path for components Not granular enough MySolution.wsp
    8. 8. Shared WSP + Feature WSPs Functionality can be separately versioned and managed Retracting one functionality doesn’t break shared libraries More complex Limited reusability
    9. 9. MySolution.Specific1.wsp MySolution.Common.wsp MySolution.Specific2.wsp Shared WSP + Feature WSPs
    10. 10. Framework + Shared + Feature WSPsCommon SharePoint code can be versioned separately More control over code reuse and management over multiple solutions Even more complex
    11. 11. MySolution1.Specific1.wsp MySolution1.Common.wsp MySolution1.Specific2.wsp MyFramework.wsp MySolution2.Specific1.wsp MySolution2.Common.wsp MySolution2.Specific2.wsp Framework + Shared + Feature WSPs
    12. 12. Custom services
    13. 13. Code structure
    14. 14. SharePoint project only
    15. 15. SharePoint + Library project
    16. 16. SharePoint + Multiple library projects
    17. 17. Multiple solutions
    18. 18. Demo: Simple to Complex
    19. 19. Source code management  •
    20. 20. Source code management  • “The Truth” Developer 1 Developer 2 Developer 3 Developer 1 Developer 2 Build Server Corporate Repository
    21. 21. Branching
    22. 22. Single release branch
    23. 23. Two branches (dev + release)
    24. 24. Feature branches
    25. 25. Unit tests
    26. 26. Testing levels
    27. 27. Depends on abstractions Separates concerns Inversion of Control (IoC) Dependency Injection (DI) Repository pattern Service Locator pattern MVP/MVC Testing-friendly code
    28. 28. Demo: Adding unit testing
    29. 29. Testing strategies coordinating code concrete repositories (the ones that hit SharePoint or a database) CUT
    30. 30. SharePoint “quirks” with unit testing
    31. 31. Maintainable, testable SharePoint
    32. 32. Dank jullie wel! Merci beaucoup! @ekapic www.edinkapic.com

    ×