Skip to content

Commit 53b3046

Browse files
committed
📝 History of VSA
1 parent dbcd80d commit 53b3046

File tree

6 files changed

+50
-7
lines changed

6 files changed

+50
-7
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
_site/
2-
node_modules/
2+
node_modules/
3+
.idea/

index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: "The best place to learn about Vertical Slice Architecture (VSA). T
88

99
Originating in 2018 by Jimmy Bogard, through [this blog post](https://www.jimmybogard.com/vertical-slice-architecture/) & this [NDC presentation](https://www.youtube.com/watch?v=SUiWfhAhgQw) Vertical Slice Architecture (VSA) has been making waves in the .NET community. It's a great way to have a highly cohesive codebase & deliver features quickly in an enterprise environment.
1010

11-
The most dominant (and highly controvesial - at least online) architecture, Clean Architecture is the go-to for many organisations for it's great promises of maintainability and testability. However, it's not without it's drawbacks. But, more accurately, it's not the best choice for every project (i.e. the golden hammer).
11+
The most dominant (and highly controversial - at least online) architecture, Clean Architecture is the go-to for many organisations for its great promises of maintainability and testability. However, it's not without its drawbacks. But, more accurately, it's not the best choice for every project (i.e. the golden hammer).
1212

1313
The most immediate difference between these two, is:
1414

@@ -26,7 +26,7 @@ This is the best place to [learn](~/learn/overview.md) about Vertical Slice Arch
2626

2727
There isn't much online in terms of VSA, so I'm hoping to change that (there are a lot of repetition of the same ideas). Both, by articulating the theory and by providing practical examples.
2828

29-
The site is primarily a knowledge base for VSA, but the code examples are for .NET/C#, typically thinking about a Web API on the ASP.NET Core engine. This is done using a companion [VSA Template]() that I maintain. The template, importantly, should *not* be the starting point. It is a tool to bootstrap the theory learnt here.
29+
The site is primarily a knowledge base for VSA, but the code examples are for .NET/C#, typically thinking about a Web API on the ASP.NET Core engine. This is done using a companion [VSA Template](https://github.com/Hona/VerticalSliceArchitecture) that I maintain. The template, importantly, should *not* be the starting point. It is a tool to bootstrap the theory learnt here.
3030

3131
## I'm lost, help me!
3232

learn/cookbook/history.md

+43-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
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 -->
22

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

learn/cookbook/philosophy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
TODO: This is where the rules of VSA go. This might become a subfolder with its own ToC.
1+
TODO: This is where the rules of VSA go - that are not specific. This might become a subfolder with its own ToC.

learn/cookbook/rules.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO: These are where specifics go

learn/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ This will cover:
1919

2020
## Recipes
2121

22-
> The recipes are strictly practical guides, that are hands on. Beyond trivial examples that exist online, more difficult questions are yet to be documented well. This is the place to go for those.
22+
> The recipes are strictly practical guides, that are hands-on. Beyond trivial examples that exist online, more difficult questions are yet to be documented well. This is the place to go for those.
2323
2424
This is the more hands on side of the site. It goes over common patterns you might encounter while implementing VSA. It will also cover how to implement these patterns at a conceptual & practical level (using the [VSA Template](https://github.com/Hona/VerticalSliceArchitecture) using C# on .NET 8 & ASP.NET Core)

0 commit comments

Comments
 (0)