Some questions about backbone.gepetto plugin
I have a layout and some view inside. How to pass view generated event to layout ? Instance view in layout:onRender, pass parentContext to view, and use this.context.dispatchToParent to send message to layout or listen view.context events in layout ? What strategy is better: parent listens child or child sends event to parent (says, render me) ?
In geppetto examples I saw only one context per one view, but not a one context to many views, how to share code and data between widgets?
When to use dispatch, dispatchToParent, dispatchGlobally ?
What is main idea of context ? Without context, widget can listen events, can send them to parent or parent can listen them like context, what difference ?
How to determine what logic should be in the context and what in the view item ?
Geppetto author, here. I've responded to this question in the GitHub repo issues list. See here: https://github.com/ModelN/backbone.geppetto/issues/5#issuecomment-11155226