Question

Some questions about backbone.gepetto plugin

  1. 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) ?

  2. 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?

  3. When to use dispatch, dispatchToParent, dispatchGlobally ?

  4. 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 ?

  5. How to determine what logic should be in the context and what in the view item ?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top