I am developing an app with multiple views. Each view is composed of other discrete reusable view components.
Using MVP, how are the subviews created? The parent presenter is easy enough to create using something like this:
var ParentPresenter = new ParentPresenter(model, parentView);
But within the parent presenter, how are the child or sub views created?
Would I instantiate the sub-view presenters within the parent presenter? To do that would require access to concrete sub-view implementations which goes against MVP right? And wouldn't that make it awkward to unit test my presenters?
I've read through many articles, posts, and examples (mostly in .NET) but I'm still not 'getting it'.
Also, I'm doing this in JavaScript (using Backbone), so any specific examples in JS would be helpful.
Thanks