During the same conversation about how I structure code the topic of “what boiler plate(s) do you recommend?”.
My answer: none!
You may be asking why. This comes back to the idea of vertical, context specific, slices. Any boiler plate code would be covered by the infrastructure MVC/P, data access, logging, etc. And these frameworks are really boiler plate as they are implementing compound design patterns.
And if there is some form of boiler plate code that emerges from the vertical slices encapsulate it into it’s own object and inject the component into the calling code. Favor composition over inheritance. It pays off every time.
No comments:
Post a Comment