M
M
Max2013-12-27 19:59:04
JavaScript
Max, 2013-12-27 19:59:04

Question on architecture with nested Collection, View?

Good afternoon,
I need advice about the organization of entities in the following task.
The page is divided into days, like a calendar, every day you can write a note. Each note is represented by a Backbone Model.
The question is what should be a collection:
1. a collection containing only one day's notes. In this case, there will be N
2 collections. a collection containing all notes in general
3. collections containing notes of only one day, and a general collection containing these collections.
How will it work with View? Below is a picture for a better understanding of the problem.
Another important thing is that the calendar can be "moved" back and forth, 1 day is loaded for each step, therefore, models must be loaded for this day. I'm leaning towards the first point, but I may be wrong.
42cde1fb1b212f951e25cc6f90fb8022.png
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aen, 2013-12-27
@borNfree

Better break it into three collections. You will have one model, one collection, view on the model, view on the collection, and some kind of external markup with collection scrolling logic (some kind of carousel).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question