The GWT ClientFactory seems to be a budding new design pattern for GWT apps, and although is not officially a part of the GWT API, is encouraged by GWT and is found in countless GWT/MVP examples.
I want to like the ClientFactory
concept. But here's my concern: for really large apps, that have many screens, display regions and complex architectures, a single ClientFactory
is going to become this massive monolith of a datastructure, with potentially hundreds of getter methods on it.
So I ask: is this ok? Why is such a monolith design encouraged and acceptable for GWT but not in other (general) applications. More importantly, is there a way to decompose the broad-spanning ClientFactory
into a hierarchy of factory objects, to help with code maintainability, dependencies/references, etc?
If so, does one decompose a ClientFactory
into smaller factories, each responsible for injecting a different part of the app with the necessary views, presenters, etc?