Changes between Version 1 and Version 2 of Ticket #8134, comment 4


Ignore:
Timestamp:
Feb 27, 2012, 1:24:35 PM (12 years ago)
Author:
fooblah
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8134, comment 4

    v1 v2  
    77This basically mandates a poor separation of concerns.  If you are doing server side rendering, bad separation of concerns is the norm.  However with client side templating, there is an opportunity to have the widget handle all it's own business but the way defaultElement works, that isn't an option.
    88
    9 About your  concern with _setElement, I'm not sure why rerendering is such a big deal, it is pretty essential for staying synchronized with external events.  render() is one of the key features of Backbone.View for example (although it doesn't allow you to replace the top level element either).
     9About your  concern with _setElement, I'm not sure why rerendering is such a big deal, it is pretty essential for staying synchronized with external events.  render() is one of the key features of Backbone.View for example (although it doesn't allow you to replace the top level element either).  I understand there is some bookkeeping involved with this.element but that bookkeeping can just get updated right?
    1010
    1111In any case, something like _render that is called automatically before _init would at least allow for the widget to manage its own layout concerns.