|
1 |
| -TODO: Introduce the history of VSA, as well as the history of architectures in general. |
| 1 | +<!-- 2018 is in the home page. But, there is stuff as early as 2015 called 'SOLID Architecture' which is basically his VSA stuff --> |
2 | 2 |
|
3 |
| -<!-- 2018 is in the home page. But, there is stuff as early as 2015 called 'SOLID Architecture' which is basically his VSA stuff --> |
| 3 | +# History |
| 4 | + |
| 5 | +Architecture is a certainty in software development. There have been many architectures over the years, and you can find a plethora of information on Google. |
| 6 | + |
| 7 | +The history of just Vertical Slice Architecture is a bit more recent. The term was coined by Jimmy Bogard in 2018. However, the ideas behind it have been around for a while. |
| 8 | + |
| 9 | +## 2015 |
| 10 | + |
| 11 | +In fact, [as early as 2015](https://vimeo.com/131633177), Jimmy was talking about SOLID Architecture which is essentially the same thing. It had a few key points (from his slides): |
| 12 | + |
| 13 | +> - SRP - One class per feature/concept |
| 14 | +> - OCP - Extend through cross-cutting concerns |
| 15 | +> - LSP - Just don't do inheritance |
| 16 | +> - ISP - Separating queries from commands |
| 17 | +> - DIP - Save for true external dependencies. |
| 18 | +
|
| 19 | +The key points of the SOLID architecture were really applying the principals to achieve a highly cohesive codebase in regard to the Domain specific code (SRP, ISP). The Domain specific code was then extended (OCP) via cross-cutting concerns - like authentication, authorization & generic logging. |
| 20 | + |
| 21 | +A lot of the outcomes from this talk to me, was allowing a simpler architecture for what matters most - the Domain. The most important thing in software, is that it works. The architecture that allows you to deliver features quickly, is the best architecture for you. |
| 22 | + |
| 23 | +## 2018 |
| 24 | + |
| 25 | +Moving along a few years, in 2018, Jimmy wrote a blog post called [Vertical Slice Architecture](https://www.jimmybogard.com/vertical-slice-architecture/). This was the first time the term was used. It was then shortly followed up with [a presentation at NDC Sydney](https://www.youtube.com/watch?v=SUiWfhAhgQw) later that year. |
| 26 | + |
| 27 | +The key points of this evolution of the architecture were (from the presentation): |
| 28 | + |
| 29 | +- CQRS - e.g. HTTP GET is safe & idempotent, POST is Unsafe & not idempotent. Represent this two different concerns in different models/classes where this was just one. |
| 30 | +- Vertical Slicing makes it easy to modify code |
| 31 | +- Do not skip the refactor step in Red-Green-Refactor. (Common complaints about 'simple' architectures is due to this) |
| 32 | +- Push behaviour down (i.e. Focus on a rich domain & allow handlers to do the 'ugly' work, like data access) |
| 33 | +- Integration test handlers & unit test Domain |
| 34 | + |
| 35 | +## Where it was left |
| 36 | + |
| 37 | +At that point, Jimmy has set the world up with some pretty nice foundations. |
| 38 | + |
| 39 | +1. Logically split application reads & writes using CQRS. |
| 40 | +1. CQRS models are use cases. Application use cases should be sliced & tightly coupled within |
| 41 | +1. Refactor repeated logic into a rich Domain |
| 42 | +1. Refactor repeated domain-agnostic code into services, repositories |
| 43 | +1. Integration test use cases |
| 44 | +1. Unit test the Domain |
0 commit comments