Jan 6, 2023
I believe an App should be split into several "feature" Apps. For example a financial App has a savings and investments module. Each module should be a separate project and buildable.
I don't think you'd have separate instances of the factory. You'd think about what dependencies would be applicable to each and every module, and inject accordingly.
I hope this is what the interviewer was getting at, but sometimes they come up with simplistic questions like that and haven't considered the solution themselves. It's not an anti-pattern, having an App which isn't modularized causes many problems not just this!