zerkalica
zerkalica

Reputation: 143

Understanding backbone.geppetto

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 ?

Upvotes: 3

Views: 995

Answers (1)

Dave Cadwallader
Dave Cadwallader

Reputation: 1751

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

Upvotes: 4

Related Questions