javascript - Backbone nested views -
i'm working on backbone application , i'm not sure if way i'm trying correct way.
i have application view , inside application view i'm trying append collection view, , each view in collection collection too.
let me explain graphically.
---------------------------------------------------------------------- | | | application view | | | | ------------------------------------------------------------- | | | windows collection view | | | | | | | | -------------------------- -------------------------- | | | | | tabs collection view | | tabs collection view | | | | | | | | | | | | | | ---------- ---------- | | ---------- ---------- | | | | | | |tab view| |tab view| | | |tab view| |tab view| | | | | | | ---------- ---------- | | ---------- ---------- | | | | | | | | | | | | | | ---------- ---------- | | ---------- ---------- | | | | | | |tab view| |tab view| | | |tab view| |tab view| | | | | | | ---------- ---------- | | ---------- ---------- | | | | | |------------------------| |------------------------| | | | | | | | | -------------------------- -------------------------- | | | | | tabs collection view | | tabs collection view | | | | | | | | | | | | | | ---------- ---------- | | ---------- ---------- | | | | | | |tab view| |tab view| | | |tab view| |tab view| | | | | | | ---------- ---------- | | ---------- ---------- | | | | | | | | | | | | | | ---------- ---------- | | ---------- ---------- | | | | | | |tab view| |tab view| | | |tab view| |tab view| | | | | | | ---------- ---------- | | ---------- ---------- | | | | | |------------------------| |------------------------| | | | | | | | ------------------------------------------------------------- | | | | | ----------------------------------------------------------------------
currently i'm loading application view initialize
method in backbone router. view loads windows collection view
.
the main problem i'm not sure if i'm on right way. second problem i'm not sure how load each tabs collection view
windows collecion view
.
ps: make things clearer, i'm trying replicate firefox's panorama view: http://i.i.com.com/cnwk.1d/i/tim//2010/08/24/firefox-panorama.jpg
i highly recommend using marionette.js structure application.
it has collection views built in makes rendering easy. application seems perfect use case. lot of boilerplate code free.
Comments
Post a Comment