<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using jQuery, Plugins and UI Controls With Backbone</title>
	<atom:link href="http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/</link>
	<description>Better Than Yesterday</description>
	<lastBuildDate>Thu, 13 Jun 2013 17:35:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Henry</title>
		<link>http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/#comment-3251</link>
		<dc:creator>Henry</dc:creator>
		<pubDate>Thu, 30 May 2013 20:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=825#comment-3251</guid>
		<description>Hi Derick, 

It&#039;s been 3 months since you last replied, is there any update on this? What&#039;s the Github issue #?

Thanks,
Henry</description>
		<content:encoded><![CDATA[<p>Hi Derick, </p>
<p>It&#8217;s been 3 months since you last replied, is there any update on this? What&#8217;s the Github issue #?</p>
<p>Thanks,<br />
Henry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derick Bailey</title>
		<link>http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/#comment-3095</link>
		<dc:creator>Derick Bailey</dc:creator>
		<pubDate>Mon, 04 Mar 2013 14:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=825#comment-3095</guid>
		<description>Hi Mike,

The combination of the &quot;show&quot; event/method and &quot;DOMRefresh&quot; event/method were supposed to be the &quot;silver bullet&quot; for this... I probably broke something when doing some of the code cleanup that I&#039;ve done in the last few releases.

What version of Marionette are you using? I&#039;ll copy all of this text in to an issue on the Github project page and dig in to it as soon as I can. I&#039;m travelling today, so I won&#039;t be able to get to this right away, though. 

Thanks for digging in to this further and for building that fiddle!</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>The combination of the &#8220;show&#8221; event/method and &#8220;DOMRefresh&#8221; event/method were supposed to be the &#8220;silver bullet&#8221; for this&#8230; I probably broke something when doing some of the code cleanup that I&#8217;ve done in the last few releases.</p>
<p>What version of Marionette are you using? I&#8217;ll copy all of this text in to an issue on the Github project page and dig in to it as soon as I can. I&#8217;m travelling today, so I won&#8217;t be able to get to this right away, though. </p>
<p>Thanks for digging in to this further and for building that fiddle!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/#comment-3094</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 04 Mar 2013 06:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=825#comment-3094</guid>
		<description>Ok, I&#039;ve worked out what the issue is.

On first read, this article (and the marionette doco) seems to imply that onShow() is the sliver bullet callback that tells you when your view has been inserted into the DOM.  

Unfortunately this is only true if the parent view is in the DOM at the time it calls region.show(childview).  To be fair, after re-read armed with what I now know, Derick does hint at this in the section &quot;Context Is Still King&quot;.

The problem manifests when the parent isn&#039;t in the dom, as would be the case when rendering multiply nested views, and as this fiddle illustrates:

http://jsfiddle.net/h8436/7/

The only solution I can come up with is to manually have whatever the root view is, trigger a custom &#039;now-in-dom&#039; event on its children, that each in turn propegates to each of their children, eventually reaching the final child view so that it can go do it&#039;s DOM-dependent thing.

However this still doesn&#039;t work for arbitrary levels of nesting. If a re-render occured not on the root node, but at say 2 levels down with the child view at another 3 levels down, a separate and different event would have to be triggered by the re-rendered view, and to which the child view would have to also listen for.  

I can&#039;t (yet) see a way for this to happen with arbitrary nesting levels and views being agnostic to the requirements of others higher up or lower down the chain.  Any ideas?</description>
		<content:encoded><![CDATA[<p>Ok, I&#8217;ve worked out what the issue is.</p>
<p>On first read, this article (and the marionette doco) seems to imply that onShow() is the sliver bullet callback that tells you when your view has been inserted into the DOM.  </p>
<p>Unfortunately this is only true if the parent view is in the DOM at the time it calls region.show(childview).  To be fair, after re-read armed with what I now know, Derick does hint at this in the section &#8220;Context Is Still King&#8221;.</p>
<p>The problem manifests when the parent isn&#8217;t in the dom, as would be the case when rendering multiply nested views, and as this fiddle illustrates:</p>
<p><a href="http://jsfiddle.net/h8436/7/" rel="nofollow">http://jsfiddle.net/h8436/7/</a></p>
<p>The only solution I can come up with is to manually have whatever the root view is, trigger a custom &#8216;now-in-dom&#8217; event on its children, that each in turn propegates to each of their children, eventually reaching the final child view so that it can go do it&#8217;s DOM-dependent thing.</p>
<p>However this still doesn&#8217;t work for arbitrary levels of nesting. If a re-render occured not on the root node, but at say 2 levels down with the child view at another 3 levels down, a separate and different event would have to be triggered by the re-rendered view, and to which the child view would have to also listen for.  </p>
<p>I can&#8217;t (yet) see a way for this to happen with arbitrary nesting levels and views being agnostic to the requirements of others higher up or lower down the chain.  Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/#comment-3093</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 04 Mar 2013 02:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=825#comment-3093</guid>
		<description>Hi Derek, 

Marionette&#039;s onShow() method doesn&#039;t seem to be smart enough to cater for deeply nested views.  I&#039;m dealing with a situation, where the view that needs to do dom-dependent work is contained within a layout, contained within other views (including another layout).

Attempting to do dom-dependent work in the view&#039;s onShow runs into same problem as if I did it in the view&#039;s onRender.

Reviewing the call stack, I can see that the view&#039;s onShow is being called from the parent layout&#039;s onRender.  This suggests that onShow doesn&#039;t necessarily guarantee the view is in the dom if the parent layout is not at the root of the view tree.

Is that right, or am I doing something bonkers?  Is there a way I can acheive what I need within marionette without having to implement my own &quot;really-on-show&quot; mechanism for deep nesting?


Appreciate your work with Marionette - so much better than working with Backbone alone!  Cheers.</description>
		<content:encoded><![CDATA[<p>Hi Derek, </p>
<p>Marionette&#8217;s onShow() method doesn&#8217;t seem to be smart enough to cater for deeply nested views.  I&#8217;m dealing with a situation, where the view that needs to do dom-dependent work is contained within a layout, contained within other views (including another layout).</p>
<p>Attempting to do dom-dependent work in the view&#8217;s onShow runs into same problem as if I did it in the view&#8217;s onRender.</p>
<p>Reviewing the call stack, I can see that the view&#8217;s onShow is being called from the parent layout&#8217;s onRender.  This suggests that onShow doesn&#8217;t necessarily guarantee the view is in the dom if the parent layout is not at the root of the view tree.</p>
<p>Is that right, or am I doing something bonkers?  Is there a way I can acheive what I need within marionette without having to implement my own &#8220;really-on-show&#8221; mechanism for deep nesting?</p>
<p>Appreciate your work with Marionette &#8211; so much better than working with Backbone alone!  Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derick Bailey</title>
		<link>http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/#comment-2272</link>
		<dc:creator>Derick Bailey</dc:creator>
		<pubDate>Fri, 02 Mar 2012 22:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=825#comment-2272</guid>
		<description>Mobile web is something I&#039;ve been wanting to get into, but haven&#039;t had a chance to do, yet. When I do, you can be sure that I&#039;ll be talking about it. It&#039;s just a question of when. :)

This post is the closest thing I have to a Backbone + Kendo post, so far. I&#039;m using the two together pretty regularly at this point, though. The ideas that I talk about in this post apply to Kendo pretty well, which is why I included Kendo in some of the examples here.

I&#039;ve only briefly read a little bit about Kendo&#039;s MVVM... I&#039;m not sure what to think, yet. I have a lot of reservations about things that I don&#039;t know enough about yet. I&#039;m &quot;cautiously optimistic&quot; would be the best answer at this point. :)</description>
		<content:encoded><![CDATA[<p>Mobile web is something I&#8217;ve been wanting to get into, but haven&#8217;t had a chance to do, yet. When I do, you can be sure that I&#8217;ll be talking about it. It&#8217;s just a question of when. :)</p>
<p>This post is the closest thing I have to a Backbone + Kendo post, so far. I&#8217;m using the two together pretty regularly at this point, though. The ideas that I talk about in this post apply to Kendo pretty well, which is why I included Kendo in some of the examples here.</p>
<p>I&#8217;ve only briefly read a little bit about Kendo&#8217;s MVVM&#8230; I&#8217;m not sure what to think, yet. I have a lot of reservations about things that I don&#8217;t know enough about yet. I&#8217;m &#8220;cautiously optimistic&#8221; would be the best answer at this point. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/#comment-2271</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Fri, 02 Mar 2012 19:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=825#comment-2271</guid>
		<description>Derick,

Love your stuff on Backbone. I&#039;m looking at doing a mobile app with Backbone and jQuery Mobile or Kendo UI Mobile. Have you (or will you) posted any samples of Kendo and Backbone together?

Also, any thoughts about Backbone vs Kendo&#039;s MMVM support?

Thanks,
Eric</description>
		<content:encoded><![CDATA[<p>Derick,</p>
<p>Love your stuff on Backbone. I&#8217;m looking at doing a mobile app with Backbone and jQuery Mobile or Kendo UI Mobile. Have you (or will you) posted any samples of Kendo and Backbone together?</p>
<p>Also, any thoughts about Backbone vs Kendo&#8217;s MMVM support?</p>
<p>Thanks,<br />
Eric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derick Bailey</title>
		<link>http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/#comment-2241</link>
		<dc:creator>Derick Bailey</dc:creator>
		<pubDate>Tue, 21 Feb 2012 20:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=825#comment-2241</guid>
		<description>the problem that you and Alex are running in to is usually caused by the way the dialog boxes are handled, at the DOM level. 

nearly every modal dialog system takes the DOM element that you hand it, removes it from the DOM and places it somewhere else - either in memory, or in a special holding area of the DOM that&#039;s been hidden from the user.

when this happens - when the view&#039;s &quot;el&quot; is removed from the DOM, you lose all of your declared events on the view, and things don&#039;t work anymore.

the solution is not to call the dialog directly against the view. use an intermediate object (similar to the RegionManager I talk about) that represents the dialog, and then have it show the view&#039;s content in that.

var Dialog = {
  el: &quot;#dialogDiv&quot;,
  show: function(view){
    view.render();
    var $el = $(el);
    $el.html(view.el);    
    $el.dialog();
  }
}

by doing this, it&#039;s the &quot;#dialogDiv&quot; that gets moved around in the DOM when you call the $.dialog method instead of the view&#039;s &quot;el&quot;, so you don&#039;t lose your view&#039;s declared events.</description>
		<content:encoded><![CDATA[<p>the problem that you and Alex are running in to is usually caused by the way the dialog boxes are handled, at the DOM level. </p>
<p>nearly every modal dialog system takes the DOM element that you hand it, removes it from the DOM and places it somewhere else &#8211; either in memory, or in a special holding area of the DOM that&#8217;s been hidden from the user.</p>
<p>when this happens &#8211; when the view&#8217;s &#8220;el&#8221; is removed from the DOM, you lose all of your declared events on the view, and things don&#8217;t work anymore.</p>
<p>the solution is not to call the dialog directly against the view. use an intermediate object (similar to the RegionManager I talk about) that represents the dialog, and then have it show the view&#8217;s content in that.</p>
<p>var Dialog = {<br />
  el: &#8220;#dialogDiv&#8221;,<br />
  show: function(view){<br />
    view.render();<br />
    var $el = $(el);<br />
    $el.html(view.el);    <br />
    $el.dialog();<br />
  }<br />
}</p>
<p>by doing this, it&#8217;s the &#8220;#dialogDiv&#8221; that gets moved around in the DOM when you call the $.dialog method instead of the view&#8217;s &#8220;el&#8221;, so you don&#8217;t lose your view&#8217;s declared events.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/#comment-2239</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 21 Feb 2012 20:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=825#comment-2239</guid>
		<description>This is a big issue that I&#039;ve hit up against as well.
(and actually in the HackerNews thread I left the same comment because I believe the commenter there had the same type of issue: http://news.ycombinator.com/item?id=3616497)
For example, trying to tie a Backbone View (el, events) to a Twitter Bootstrap &quot;Popover&quot;(http://twitter.github.com/bootstrap/javascript.html#popovers) doesn&#039;t work in the &quot;Backbone way&quot;.
Are talking about the same thing?</description>
		<content:encoded><![CDATA[<p>This is a big issue that I&#8217;ve hit up against as well.<br />
(and actually in the HackerNews thread I left the same comment because I believe the commenter there had the same type of issue: http://news.ycombinator.com/item?id=3616497)<br />
For example, trying to tie a Backbone View (el, events) to a Twitter Bootstrap &#8220;Popover&#8221;(<a href="http://twitter.github.com/bootstrap/javascript.html#popovers" rel="nofollow">http://twitter.github.com/bootstrap/javascript.html#popovers</a>) doesn&#8217;t work in the &#8220;Backbone way&#8221;.<br />
Are talking about the same thing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://lostechies.com/derickbailey/2012/02/20/using-jquery-plugins-and-ui-controls-with-backbone/#comment-2237</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Tue, 21 Feb 2012 17:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=825#comment-2237</guid>
		<description>Thanks for another great post Derick!  Can you tell me how you handle jQuery UI Dialogs with Backbone?  Specifically, what do you bind the view/element to?  I&#039;ve experimented with it a bit, and can never seem to get event binding to work correctly...</description>
		<content:encoded><![CDATA[<p>Thanks for another great post Derick!  Can you tell me how you handle jQuery UI Dialogs with Backbone?  Specifically, what do you bind the view/element to?  I&#8217;ve experimented with it a bit, and can never seem to get event binding to work correctly&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
