Design Accelerator: Ports and Adapters Architecture Part 3

  Рет қаралды 708

Vaughn Vernon

Vaughn Vernon

Күн бұрын

Пікірлер: 10
@niclash
@niclash 2 күн бұрын
I would also separate the adapters to separate Gradle projects (Maven modules), to ensure that people later on don't introduce the popular Spaghetti-pattern and introduce dependencies in the wrong directions. That would then necessitate an "Application" project that binds the internals and adapters together.
@VaughnVernon
@VaughnVernon Күн бұрын
Right. You brought that up in Part 2 as well. I could do a brief follow up in the next video. I've done that before with Java but I'm not up to speed for how to do the same using a .NET build. I could just state that whatever build process you use could enforce the direction of dependencies.
@z0nx
@z0nx 5 сағат бұрын
Isn't that the whole point of P&A, direction of dependencies? In C# we also use projects to prevent dependencies going the wrong way since it doesn't allow circular references. However I much prefer the way F# deals with this by enforcing strict dependency ordering, even down to the function declarations in a file. Even though it may be a little annoying, it allows for code to become structured like P&A without even knowing about P&A.
@christopherpetersen342
@christopherpetersen342 Күн бұрын
Very interesting stuff! A few follow-up questions... The .io TLD may be changing (or going away!) because of geopolitical issues. How would you deal with that in your naming? And, which of these components would you choose to participate in a zero trust architecture? Would that be in the adapters, the ports, both, or would there be additional components doing that around what's shown?
@VaughnVernon
@VaughnVernon Күн бұрын
Thanks! All of your questions are good, yet out of scope for this tutorial. Whatever happens to .io will affect millions of companies and it won't just be dropped on the floor. Zero trust is a very large topic that I won't attempt to cover here, but possibly in a later video. Good ideas 😊
@BlindVirtuoso
@BlindVirtuoso Күн бұрын
Hi Vaughn. Nice one, appreciate it. Though I have a couple of questions: 1. What if we need to persist our Catalog using third-party API? Would there be just another implementation of CatalogRepository interface? 2. What if we also need to generate a PDF view of the Catalog while persisting it? Where would that application logic for generating PDF live? Thanks.
@VaughnVernon
@VaughnVernon Күн бұрын
Thanks! 1. Yes, sure. There are tradeoffs vs. temporary (or permanent) local storage followed by an API call. The details might get into the weeds so I'll stop there. 2. That introduces similar tradeoffs as with 1. Assuming you want the PDF generation to always happen, persisting the catalog data should occur first. Again, how you follow up with the PDF generation step is an implementation detail that I could cover in a later video.
@BlindVirtuoso
@BlindVirtuoso Күн бұрын
@@VaughnVernon Thanks a lot. Would be great to cover the details in your upcoming videos.
@z0nx
@z0nx 5 сағат бұрын
@8:22 now I'm curious why wouldn't you use application services? Anybody guess?
@marco.garofalo
@marco.garofalo 6 сағат бұрын
I'd keep it simpler when it comes to packaging: - keep the app in the root of the package that hosts the bounded context, so in this case it would just have io.kalele.ecommerce and io.kalele.ecommerce.infra - avoid subpackaging the app, so I want to clearly see Catalog, CatalogRepository and CatalogService altogether, it makes it clear if the bounded context is growing too big I also have one question, I prefer not to use the word repository because it helps me think more about the language and the concept I am dealing with. For instance if I had a Product domain entity, I would probably call my repository ProductCatalog, rather than ProductRepository. In your example is there something in the domain that might actually be a better name candidate instead of CatalogRepository?
Design Accelerator: Ports and Adapters Architecture Part 1
14:56
Vaughn Vernon
Рет қаралды 1,7 М.
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 661 М.
Car Bubble vs Lamborghini
00:33
Stokes Twins
Рет қаралды 42 МЛН
PIZZA or CHICKEN // Left or Right Challenge
00:18
Hungry FAM
Рет қаралды 15 МЛН
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 15 МЛН
Design Accelerator: Ports and Adapters Architecture Part 2
27:07
Vaughn Vernon
Рет қаралды 1,2 М.
The M4 Mac Mini is Incredible!
11:45
Marques Brownlee
Рет қаралды 5 МЛН
FASTEST Way To Learn Coding and ACTUALLY Get A Job
10:44
Brian Cache
Рет қаралды 1,2 МЛН
20 System Design Concepts Explained in 10 Minutes
11:41
NeetCode
Рет қаралды 1 МЛН
Humanity and AI
55:11
Vaughn Vernon
Рет қаралды 32
Journey to Explore DDD: Denver, USA and Beyond
45:06
Vaughn Vernon
Рет қаралды 135
M4 Mac mini ($599) - Too Good to Be True?
12:38
GregsGadgets
Рет қаралды 251 М.
VMWare is now Free?
4:36
Sam Bent
Рет қаралды 8 М.
Car Bubble vs Lamborghini
00:33
Stokes Twins
Рет қаралды 42 МЛН