DEV Community

Leave the kids at home: How to decouple your projects with the Stairway Pattern

Joe Petrakovich on September 11, 2018

When you’re creating a new class, do you know exactly where to put it in your solution or do ya just kinda shove it near something similar and call...
Collapse
 
makingloops profile image
Joe Petrakovich

Yes, exactly! This is a strategy you could use in the context of creating a layered architecture.

It's a tactical way to implement the layered architecture in a way that's truly decoupled.

A lot of folks could think that just because they have three distinct projects for UI, Biz logic, and Data, that they have implemented proper layering, not realizing that the literal dependencies between classes is quite important.

Collapse
 
kuzmenko375 profile image
kuzmenko375

Recently, I have always advocated separating interfaces from implementation, even if someone on the team says "99% of the implementation of these interfaces will never change." Never say never. Splitting libraries saved our refactoring recently when moving a large project from EntityFramework to EntityFrameworkCore. We just changed the implementation in 10 projects with EntityFramework and went to drink coffee.