0:00 Now, one more thing I want to discuss before we 0:02 dive in is how we 0:04 actually are going to be achieving this clean architecture in this 0:08 course, a very common pattern we're going to 0:11 apply. 0:12 Now, the reason why we're gonna apply this 0:13 particular pattern is to actually 0:15 achieve the dependency rule here. 0:17 Remember, we always want our application dependency 0:22 chain pointing inwards, where the core domain model, the least 0:26 volatile part of our application, depends on nothing, 0:30 so that when more volatile dependencies change, like the 0:34 infrastructure, 0:35 we do not have to update this code, 0:39 which of course we know reduces risk, makes our application more 0:42 flexible, easier to test, and we can ship changes faster. 0:47 And so the question is: how do we actually accomplish this? 0:49 How do we point our dependencies inward? 0:53 This can be very difficult at times. 0:54 For example, in the application layer, we of course know we're gonna be 0:58 actually assembling the domain entity, but how are we actually gonna do that? 1:02 We need to still interact with the infrastructure, right? 1:05 We do have at the end of the day, a database ORM or 1:09 a networking SDK, or in our case, we're gonna have a 1:13 Stripe SDK that we're gonna use to actually facilitate payments. 1:17 The application layer here needs to be able to actually use these 1:21 infrastructure dependencies. And so the question is: 1:24 how can our application 1:25 layers here use the outer layers without relying on 1:29 them? And for this, we are going to use the port and adapter 1:33 pattern, which helps us achieve exactly this. 1:36 Now, ports and adapters are nothing more than an interface and an 1:40 implementation for that interface. 1:43 And so what we actually have here is what's known as a 1:47 port, and this is nothing more than a JavaScript
The rest of the transcript is for members.
Sign in