Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Given your design, I don't see how this can simplified any further. Are you having memory problems or something? Commented Oct 5, 2016 at 15:12
  • No, I don't think I have any memory problems but a class which depends on ~15 factories doesn't seem like a good design. Commented Oct 6, 2016 at 4:10
  • Can you do abstract the composition? Instead of Route depending on different classes, to do Route depends on its own "domain model". Then turn the composition into aggregations. Like if Factories and Controllers would be subscribing to Route. Commented Oct 6, 2016 at 4:50
  • 2
    Looks like one of those horrible "Manager" classes that do too much and everything. The container for global variables. Commented Oct 6, 2016 at 7:24
  • Does this RouterImpl actually have to know the exact type that each factory produces, or could it do it's job if they all returned a UIViewController, or a protocol? Commented Jul 4, 2017 at 0:59