What's the appropriate granularity for Backbone.js Views?

前端 未结 2 1146
南笙
南笙 2021-02-02 01:41

I\'m adopting Backbone.js to render a small corner of an existing large web app. If this goes well, I can see Backbone.js growing to encompass the whole of the app, lending some

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-02 02:17

    There is no definitive answer to your question. You can have a look at the granularity of sproutcore for exemples.

    You can also watch http://vimeo.com/17186379 where Yehuda Katz illustrate the difficulties of updating different pieces of the page.

    One way of looking at it would be to check which part should be refreshed with different model change/events and try to minimize the re rendering.

    Sorry no good answers as you pointed out ;)

提交回复
热议问题