I\'am unclear as to what the roles and responsibility of the factory class is. I know enough that the factory class should be resposible for the creation of domain objects (agg
Should the factory be calling directly into the repository to get its data or the service library?
I'd say neither, it should be passed the information it needs directly if at all possible.
Where does the factory fit into the following framework: UI > App > Domain > Service > Data
Not sure where this layering is coming from, layers are not fixed in DDD but I'd say you'd be best focussing on this style
UI > App > Domain
Within the Domain you then have multiple types of objects and I'd set rules about the relationships between them:
If the role of the factory class is for object creation then what benefits does the service layer have?
Eric explains this quite well in the book so I'd refer to it, but ultimately its great if you have cross aggregate behavior or behavior that doesn't fit well into one aggregate (e.g. the account example in the book).