YouTube2Text

Vertical Slice Architecture Myths You Need To Know! — Transcript

by CodeOpinion · 1,645 words · 247 segments · language en · Watch on YouTube

Full transcript

  1. 0:00hey everybody it's Derek Martin from cod
  2. 0:01opinion.com as with anything in our
  3. 0:04industry that gains some traction by the
  4. 0:05waterer Community it develops some
  5. 0:08misconceptions vertical slice
  6. 0:09architecture Falls exactly into this
  7. 0:11trap but don't worry I'm going to
  8. 0:13demystify some of these misconceptions
  9. 0:16why they exist and set the record
  10. 0:18straight easily the number one
  11. 0:19misconception not even close this is a
  12. 0:22question comment or confusion is this
  13. 0:25idea of share nothing or that how do you
  14. 0:27share between slices or between features
  15. 0:30I think the reason why there's this
  16. 0:31misconception or confusion to how this
  17. 0:32works is because people want features to
  18. 0:34be completely independent when that's
  19. 0:36not really the case often times there's
  20. 0:39relation between the two that could be
  21. 0:40workflow or that could be just commands
  22. 0:43or queries and a subset of them that's
  23. 0:45actually what the feature is and this is
  24. 0:46actually pretty common I'll give you
  25. 0:48some examples of this but before I do
  26. 0:50I'd like to thank Avent store for
  27. 0:51sponsoring this video event store DB is
  28. 0:53a new category of operational database
  29. 0:55built for event sourcing cqrs and event
  30. 0:58driven microservices from for more on
  31. 1:00event store DB check out the link in the
  32. 1:02description the most common example of
  33. 1:03this is your underlying domain or data
  34. 1:05model this thing is shared across
  35. 1:08features sure your features are given
  36. 1:10use cases specific use cases but they
  37. 1:12may all be sharing that same underlying
  38. 1:14domain or data model the key aspect of
  39. 1:16this is you don't have that domain model
  40. 1:18or data model that's shared between the
  41. 1:20entire system no it's very specific it's
  42. 1:23vertical and what those features that
  43. 1:25actually needed that should be very
  44. 1:27narrow very focused another way of
  45. 1:29thinking about this is let's say we had
  46. 1:31some validation between features but
  47. 1:33there's specific validation that we need
  48. 1:34to do in two specific features pretty
  49. 1:37much the same way well just create
  50. 1:40something that's shared between the two
  51. 1:41features that's fine how do you do that
  52. 1:44just use the same class whatever it is
  53. 1:46that you're sharing that you're going to
  54. 1:48have within those two features there's
  55. 1:49nothing wrong with this not each new
  56. 1:51feature needs to be completely
  57. 1:53independent in what it's using it's just
  58. 1:55narrowing that focus a different way of
  59. 1:57looking at it is let's say these two
  60. 1:59featur features they're using one
  61. 2:01particular way to validate and then the
  62. 2:03other three features maybe they have
  63. 2:04something completely different that's
  64. 2:05kind of the benefit of having things by
  65. 2:07feature by verticals is that you can
  66. 2:09decide what that implementation looks
  67. 2:11like maybe something shared between a
  68. 2:13couple or a few of them maybe they're
  69. 2:15not and this relates to what I think is
  70. 2:16probably the second most common
  71. 2:18misconception which there's little or no
  72. 2:20abstraction so this misconception I
  73. 2:22think exists because people are
  74. 2:24generally thinking about layers and if
  75. 2:25they're thinking about vertical slices
  76. 2:27what happens to the layers well the it
  77. 2:29can still be there nobody's saying not
  78. 2:31to use layers nobody's not saying to not
  79. 2:33use abstractions so for example if you
  80. 2:36had some type of data access layer or
  81. 2:38whatever that was that's not just saying
  82. 2:40that if you have some type of vertical
  83. 2:41slice or feature that you don't have
  84. 2:43that abstraction of data access you can
  85. 2:46where I think this gets a little bit
  86. 2:48confusing is because now you're deciding
  87. 2:51specifically in a given vertical slice
  88. 2:53or feature how you want to do that data
  89. 2:55access a lot of this now comes down to
  90. 2:57coupling is the question is do you need
  91. 3:00the abstraction maybe you do maybe you
  92. 3:02don't but the idea that you don't have
  93. 3:04to use one or that you shouldn't or that
  94. 3:06there's no layers is a misconception
  95. 3:08here's an example let's say you're using
  96. 3:10an orm for your data access and all
  97. 3:13these vertical slices these features
  98. 3:15let's say there's a dozen of them that
  99. 3:16actually depend on this omm or an
  100. 3:18instance of the orm do you need the
  101. 3:20abstraction maybe you do maybe you don't
  102. 3:23if you needed to change that underlying
  103. 3:25uh database or orm or whatever you want
  104. 3:26it to do how much work is it to actually
  105. 3:29change those dozen places this is very
  106. 3:31different if you have uh some type of
  107. 3:33data access layer that's coupled
  108. 3:36hundreds of times so the the focus
  109. 3:38becomes more narrow and that's what
  110. 3:40people then start thinking about well do
  111. 3:42I need the abstraction or can I just
  112. 3:43change it when I need it if it's
  113. 3:45testable and you don't need to create
  114. 3:47your own type or one abstraction around
  115. 3:49it maybe you don't but that's not to say
  116. 3:51that there's little to no abstraction
  117. 3:53it's really up to you and this leads us
  118. 3:55to another misconception which is
  119. 3:56there's a low barrier to entry meaning
  120. 3:59that if you want to get into vertical
  121. 4:00slice architecture it's a lot easier
  122. 4:02than say clean architecture I disagree
  123. 4:04with this because I think fundamentally
  124. 4:07it's not about clean architecture or
  125. 4:09vertical slice architecture or aventurin
  126. 4:12architecture all these different types
  127. 4:13of architectures you ultimately use that
  128. 4:15make your architecture fundamentally
  129. 4:17it's understanding what the problems are
  130. 4:20why you're applying certain patterns or
  131. 4:21certain Concepts and often times this
  132. 4:24relates to tradeoffs around coupling and
  133. 4:27cohesion that's really what you're
  134. 4:29battling
  135. 4:30most of the time and there's just
  136. 4:31different ways of doing it so I don't
  137. 4:33think there's a lower barrier to entry
  138. 4:34with vertical slice architecture I think
  139. 4:36maybe on the surface it seems that way
  140. 4:39but you can screw up anything that you
  141. 4:40don't really understand now another
  142. 4:42misconception and I kind of alluded to
  143. 4:44this a little bit earlier is that
  144. 4:45features don't impact other features the
  145. 4:48reason why this misconception exists is
  146. 4:49because this idea incorrectly that there
  147. 4:51share nothing that each feature is going
  148. 4:53to be or vertical is going to be
  149. 4:55completely independent it's just not the
  150. 4:57case you're going to have some coupling
  151. 4:59between between features often times
  152. 5:01this could be business processes or
  153. 5:02workflows where one thing kind of kicks
  154. 5:04off a business process and then it hands
  155. 5:06it off to another feature you're going
  156. 5:08to have coupling there how you couple is
  157. 5:10a different story and I'll get to that
  158. 5:12in a second but the idea that you're not
  159. 5:14going to have one feature affect another
  160. 5:16feature is not really the case so why is
  161. 5:20that important because you're less
  162. 5:23likely to have features impact other
  163. 5:25features because you're not going to
  164. 5:26have some massive layer that's coupled
  165. 5:29to every feature that's the whole point
  166. 5:31of vertical slices and focusing on kind
  167. 5:33of the utility of each one and how you
  168. 5:35want to implement that rather than
  169. 5:38having your entire system depend on one
  170. 5:40data access um layer or whatever the
  171. 5:43case may be you're splitting things up
  172. 5:45so again you're controlling coupling so
  173. 5:48that's why kind of this notion of
  174. 5:50features won't affect other features
  175. 5:51it's not that they won't it's that you
  176. 5:53won't have one feature that's specific
  177. 5:55to one specific use case it won't likely
  178. 5:57affect another feature that's completely
  179. 6:00unrelated but you absolutely can have
  180. 6:02one feature affect another feature
  181. 6:04that's directly related and lastly to
  182. 6:06piggyback up the last one is it requires
  183. 6:08messaging to decouple Features so
  184. 6:10something like Pub sub and topics or
  185. 6:13messaging in cues and this misconception
  186. 6:15is often because that's how it's
  187. 6:16actually implemented or given in
  188. 6:18examples or you see videos like me
  189. 6:20explaining event Riven architecture Pub
  190. 6:22sub or using some type of orchestration
  191. 6:25to work on business processes and
  192. 6:26workflows so when you have something in
  193. 6:28one feature happen
  194. 6:30you publish an event and some other
  195. 6:31feature can pick that up and continue on
  196. 6:33the workflow kind of like what I was
  197. 6:35mentioning earlier but that's not
  198. 6:36necessarily how things have to be
  199. 6:38implemented asynchronous messaging is
  200. 6:40just a way to remove the temporal
  201. 6:42coupling you're going to have some form
  202. 6:43of coupling some degree of coupling
  203. 6:45messaging is just one way of handling it
  204. 6:47but by no means is messaging required in
  205. 6:49a vertical slice architecture now the
  206. 6:51last thing to touch on isn't a
  207. 6:52misconception at all I think it's
  208. 6:54actually kind of the reverse which that
  209. 6:56there's not enough emphasis on when you
  210. 6:58might want to consider a vertical slice
  211. 7:00architecture which is really you want to
  212. 7:02focus on use cases it isn't to me very
  213. 7:06applicable or something you should be
  214. 7:07striving for if all you're developing is
  215. 7:10crud and that's because your use cases
  216. 7:12are your features your features are your
  217. 7:14vertical slices the idea that you have
  218. 7:16some type of capabilities your system
  219. 7:18provides some type of behaviors the
  220. 7:21behaviors are what you're focusing on
  221. 7:23that's the idea of organizing your code
  222. 7:25around these use cases around these
  223. 7:27features around these behaviors these
  224. 7:29capabilities what does your system do if
  225. 7:32it's just create read update delete and
  226. 7:35that's how you're going to organize your
  227. 7:36code sure I guess but a lot of the value
  228. 7:39here is that your code is expressive
  229. 7:41about what it actually does so hopefully
  230. 7:44I cleared the air a little bit on some
  231. 7:46of the misconceptions that you might
  232. 7:47have read or watched in videos I hope
  233. 7:49this gives a better illustration about
  234. 7:51what vertical SS architecture is and
  235. 7:53isn't if you enjoyed videos like this
  236. 7:55and topics like this and you want to
  237. 7:57chat with other software developers you
  238. 7:59can you get access to my private Discord
  239. 8:00server by joining my channel the Link's
  240. 8:02in the description on how to join if you
  241. 8:04enjoyed this video please give it a
  242. 8:06thumbs up if you have any other thoughts
  243. 8:08or questions make sure to leave a
  244. 8:09comment and please subscribe for more
  245. 8:11videos on software architecture and
  246. 8:12design
  247. 8:28thanks

About this transcript

This page contains the full transcript of Vertical Slice Architecture Myths You Need To Know! by CodeOpinion, generated from the public captions YouTube serves with the video. The transcript has 1,645 words across 247 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.