top | item 3374992

(no title)

bemaniac | 14 years ago

I didn't go into much detail because I could have gone on and on forever.

We keep our models and collections very bare. They essentially just have methods that communicate with our API and that's it.

We handle subviews by appending them in the render method. For instance, in a post list, we append each post list item in the post list's render method.

I'm sorry if that doesn't answer your question. I guess the essence of it is we append subviews in the render method. Is there anything specific about this you want to know?

discuss

order

eskimoblood|14 years ago

Do you have any mechanism to unbind events on model/collections you've made in views/subviews, or will the bind methodes will live forever. Do you have something like a global eventbus or how your views comunicate with each other?

bemaniac|14 years ago

Ah I see what you mean. No, we generally don't unbind events on models/collections, but this is mostly because we don't remove views/subviews from a page that often. We try to cache as much stuff as possible so subsequent clicks between tabs are really fast.