jamesplease / jamesplease/puppets

How should I store the nested view tree?

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
No language data
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

In Marionette we determine the nested structure dynamically when it is needed. This is done via [this method](https://github.com/marionettejs/backbone.marionette/blob/master/src/view.js#L297-L306).

For no reason in particular I made Puppets work differently. A `_childViews` hash is always available with every view that's nested beneath you.

What are the pros/cons to either approach? At what point would performance be a concern in either situation, if any? Do I _need_ a flat version of the nested tree structure? In what situations would I use it? Or would the dynamically-calculated one be preferable?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the nested-view handling described in src/view.js at lines 297-306, and compare Marionette's dynamic lookup with Puppets' always-available _childViews hash. Document the performance and usage tradeoffs, including whether a flat tree is needed; the issue does not name tests or a specific implementation target.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.