--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dddcqrs/d1ed90f6-f9c7-41f7-8fed-16ebd75cfb6an%40googlegroups.com.
whenever you need to build an Entity or Aggregate (AR) with complexity...or avoiding repetitive parameters/tasks...
Look,Player entity (or full AR) for instance, it took a Name, Number, Team, Position, Flags, Nickname/Alias, Height, Weight, etc...So we can have a Factory to build an Entity with those details for ease.BTW it isn't a layer itself
--Em qua., 26 de ago. de 2020 às 16:58, BruceDdd <robert...@gmail.com> escreveu:I studying with major attention the factory "layer"
so my doubt it'sa factory (a class factory) can be use as dependency ?
or not ?When use a factory in which cases ?--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dddcqrs/d1ed90f6-f9c7-41f7-8fed-16ebd75cfb6an%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dddcqrs/CAP9Q47sDC3K7Qpvh52W%2BRmzMC8wp6-baQeTTicZfoR%3DSc7LSrA%40mail.gmail.com.
- if I need to avoid coupling with concrete class, factory it's OK
- if I need to avoid coupling with concrete class, factory it's OKIt is not, because you still use concrete classes and cannot swap implementations; if you want to avoid coupling completly, you should have an interface for the factory, so that you don't depend on its implementation.