This video covers the final two artifacts of DDD, which are factory and modules.
- [Instructor] Now, we'll learn the factory…which is the sixth artifact of Domain Driven Design.…The factory is required when simple constructor…is not enough to create the object, or we can say…a factory allows us to create the complex object.…So basically it is used for creating the objects.…It helps to create complex object or an aggregate.…That involves the creation of other related objects.…A factory is also part of life cycle of domain objects…as it is responsible for creating them.…
Factories and repository are in some way related…to each other as both refer to domain objects.…Factory refers to the newly created objects…whereas the repository returns the already existing objects…either from the memory or from external storages.…So let's start with this diagram.…So here we can see like how control flows…using a user creation process app.…So let's say that user signs up with a username user one;…then, how does user one is created and persist in storage.…
So, requester calls the factory which is responsible…
Note: To get the best results from this course, you should be familiar with the Spring Framework.
This course was created and produced by Packt Publishing. We are honored to host this training in our library.
- Writing sample tests
- Domain-driven design
- Strategic design
- Wrapping controls and pages
- Complex cases for pages and elements
- Testing microservices