+ All Categories
Home > Technology > SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Date post: 16-Jul-2015
Category:
Upload: edin-kapic
View: 324 times
Download: 3 times
Share this document with a friend
Popular Tags:
47
How to Build Maintainable and Testable Custom SharePoint Components Edin Kapić #SPSSTHLM07 February 14 th , 2015
Transcript
Page 1: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

How to Build Maintainable and Testable Custom SharePoint

Components

Edin Kapić#SPSSTHLM07

February 14th, 2015

Page 2: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Platinum

Gold

Lunch SharePint

Silver

Web

Page 3: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Beezy

Catalonian SharePoint User Group

sug.cat

Jag frågar mig

är denna öl

SharePint-

kompatibel

@ekapic

www.edinkapic.com

Page 4: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 5: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 6: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 7: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Deployment structure

Solution structure

Source code management

Code structure

Unit testing SharePoint

Maintainable

Testable

Page 8: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 9: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 10: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Simpler Retraction of one WSP removes shared libraries from BIN/GAC

Only one version path for components

Not granular enough

MySolution.wsp

Page 11: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Functionality can be separately versioned and managed

Retracting one functionality doesn’t break shared libraries

More complex

Limited reusability

Page 12: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

MySolution.Specific1.wsp

MySolution.Common.wsp

MySolution.Specific2.wsp

Shared WSP + Feature WSPs

Page 13: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Common SharePoint code can be versioned separately

More control over code reuse and management over multiple solutions

Even more complex

Page 14: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

MySolution1.Specific1.wsp

MySolution1.Common.wsp

MySolution1.Specific2.wsp

MyFramework.wsp

MySolution2.Specific1.wsp

MySolution2.Common.wsp

MySolution2.Specific2.wsp

Framework + Shared + Feature WSPs

Page 15: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 16: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

But

Page 17: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 18: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 19: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 20: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 21: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 22: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 23: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 24: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 25: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 26: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Run away!!!

Page 27: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 28: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 29: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 30: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 31: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 32: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Page 33: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

“The Truth”

Developer 1

Developer 2

Developer 3Developer 1

Developer 2

Build Server

Corporate

Repository

Page 34: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 35: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 36: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 37: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 38: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 39: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Unit tests

Page 40: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 41: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

Depends on abstractions

Separates concerns

Inversion of Control (IoC)

Dependency Injection (DI)

Repository pattern

Service Locator pattern

MVP/MVC

Page 42: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

coordinating code

concrete repositories (the ones that hit SharePoint or a database)

CUT

Page 43: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 44: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 45: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 46: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components
Page 47: SharePoint Saturday Stockholm 2015 - Building Maintainable and Testable SharePoint Components

07


Recommended