<?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: Handling DOM Events With EmberJS Views And Controllers</title>
	<atom:link href="http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/</link>
	<description>Better Than Yesterday</description>
	<lastBuildDate>Mon, 20 May 2013 17:13: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: sabithpocker</title>
		<link>http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/#comment-2649</link>
		<dc:creator>sabithpocker</dc:creator>
		<pubDate>Thu, 26 Jul 2012 23:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=837#comment-2649</guid>
		<description>http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf</description>
		<content:encoded><![CDATA[<p><a href="http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf" rel="nofollow">http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Statecharts.pdf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dagda1</title>
		<link>http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/#comment-2265</link>
		<dc:creator>dagda1</dc:creator>
		<pubDate>Thu, 01 Mar 2012 08:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=837#comment-2265</guid>
		<description>I just blogged about the state chart here http://www.thesoftwaresimpleton.com/blog/2012/02/28/statemachine/</description>
		<content:encoded><![CDATA[<p>I just blogged about the state chart here http://www.thesoftwaresimpleton.com/blog/2012/02/28/statemachine/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeroen van Wissen</title>
		<link>http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/#comment-2258</link>
		<dc:creator>Jeroen van Wissen</dc:creator>
		<pubDate>Tue, 28 Feb 2012 06:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=837#comment-2258</guid>
		<description>And what about non-rails Ember apps? How do we put the handlebar templates in seperate files?</description>
		<content:encoded><![CDATA[<p>And what about non-rails Ember apps? How do we put the handlebar templates in seperate files?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dagda1</title>
		<link>http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/#comment-2250</link>
		<dc:creator>dagda1</dc:creator>
		<pubDate>Wed, 22 Feb 2012 16:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=837#comment-2250</guid>
		<description>I think the main difference between backbone  and Ember is that backbone uses Dom events while Ember uses bindings. 

A binding in Ember is anything with the binding suffix.  For example, here is an example of one of my controllers:

https://gist.github.com/1885960

You can see that I am specifying a urlSearchBinding on line 11 which I can then reference in my template.

Here is the show template at the templateName path:

https://gist.github.com/1885979

I am referencing the urlSearchBinding on line 2 and on line 3, I am speciying the targetBinding as the view but I could very easily point to a controller or any object.  For example in another template, I have the following Ember button:

{{#view Ember.Button targetBinding=&quot;leads&quot; action=&quot;showMore&quot; isVisibleBinding=&quot;leads.showMoreIsVisible&quot;}}Show More{{/view}}.

Bindings are the key difference between Ember and Backbone IMO.

The Ember runloop is also something to be aware of and caught me out at the start.</description>
		<content:encoded><![CDATA[<p>I think the main difference between backbone  and Ember is that backbone uses Dom events while Ember uses bindings. </p>
<p>A binding in Ember is anything with the binding suffix.  For example, here is an example of one of my controllers:</p>
<p><a href="https://gist.github.com/1885960" rel="nofollow">https://gist.github.com/1885960</a></p>
<p>You can see that I am specifying a urlSearchBinding on line 11 which I can then reference in my template.</p>
<p>Here is the show template at the templateName path:</p>
<p><a href="https://gist.github.com/1885979" rel="nofollow">https://gist.github.com/1885979</a></p>
<p>I am referencing the urlSearchBinding on line 2 and on line 3, I am speciying the targetBinding as the view but I could very easily point to a controller or any object.  For example in another template, I have the following Ember button:</p>
<p>{{#view Ember.Button targetBinding=&#8221;leads&#8221; action=&#8221;showMore&#8221; isVisibleBinding=&#8221;leads.showMoreIsVisible&#8221;}}Show More{{/view}}.</p>
<p>Bindings are the key difference between Ember and Backbone IMO.</p>
<p>The Ember runloop is also something to be aware of and caught me out at the start.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derick Bailey</title>
		<link>http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/#comment-2249</link>
		<dc:creator>Derick Bailey</dc:creator>
		<pubDate>Wed, 22 Feb 2012 14:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=837#comment-2249</guid>
		<description>If rumor and speculation serve me right, I think &quot;StateChart&quot; is a leftover name from the original SproutCore. 

This definitely looks like something I need to dig into. I&#039;ve been trying to find good ways to handle workflow / state changes.

Thanks again! :)</description>
		<content:encoded><![CDATA[<p>If rumor and speculation serve me right, I think &#8220;StateChart&#8221; is a leftover name from the original SproutCore. </p>
<p>This definitely looks like something I need to dig into. I&#8217;ve been trying to find good ways to handle workflow / state changes.</p>
<p>Thanks again! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dagda1</title>
		<link>http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/#comment-2248</link>
		<dc:creator>dagda1</dc:creator>
		<pubDate>Wed, 22 Feb 2012 14:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=837#comment-2248</guid>
		<description>Another interesting plugin I have found for Ember is the Ember.StateChart 
https://github.com/emberjs-addons/sproutcore-statechart,  Whenever you switch states, you get some nice handlers for entering states (enterState) and exiting states (exitState).  


Examples of switching states might be something simple like switching a tab control or another use case I found was to go from a non-streaming state to a streaming state via a websocket connection.

It is an interesting add on to the usual MVC paradigm.  Still not sure why they called in StateChart instead of StateMachine.</description>
		<content:encoded><![CDATA[<p>Another interesting plugin I have found for Ember is the Ember.StateChart <br />
<a href="https://github.com/emberjs-addons/sproutcore-statechart" rel="nofollow">https://github.com/emberjs-addons/sproutcore-statechart</a>,  Whenever you switch states, you get some nice handlers for entering states (enterState) and exiting states (exitState).  </p>
<p>Examples of switching states might be something simple like switching a tab control or another use case I found was to go from a non-streaming state to a streaming state via a websocket connection.</p>
<p>It is an interesting add on to the usual MVC paradigm.  Still not sure why they called in StateChart instead of StateMachine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dagda1</title>
		<link>http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/#comment-2247</link>
		<dc:creator>dagda1</dc:creator>
		<pubDate>Wed, 22 Feb 2012 14:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=837#comment-2247</guid>
		<description>Yes, it is loaded via Ajax when you create the Enber app.  I think when the Ember application object is created or maybe when the view is first referenced.  They are loaded into the Ember.TEMPLATES collection.


You also need the following lines in a rails initializer:

require &#039;sprockets/ember_handlebars&#039;

Rails.application.assets.register_engine &#039;hjs&#039;, EmberHandlebars</description>
		<content:encoded><![CDATA[<p>Yes, it is loaded via Ajax when you create the Enber app.  I think when the Ember application object is created or maybe when the view is first referenced.  They are loaded into the Ember.TEMPLATES collection.</p>
<p>You also need the following lines in a rails initializer:</p>
<p>require &#8216;sprockets/ember_handlebars&#8217;</p>
<p>Rails.application.assets.register_engine &#8216;hjs&#8217;, EmberHandlebars</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derick Bailey</title>
		<link>http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/#comment-2246</link>
		<dc:creator>Derick Bailey</dc:creator>
		<pubDate>Wed, 22 Feb 2012 14:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=837#comment-2246</guid>
		<description>Nice! I was going to look into separating the templates in to external files soon. Glad to know it&#039;s that easy. :) 

Am I correct in seeing that this gives you server side compilation of the template, which is going to improve the performance of the JS at runtime?</description>
		<content:encoded><![CDATA[<p>Nice! I was going to look into separating the templates in to external files soon. Glad to know it&#8217;s that easy. :) </p>
<p>Am I correct in seeing that this gives you server side compilation of the template, which is going to improve the performance of the JS at runtime?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dagda1</title>
		<link>http://lostechies.com/derickbailey/2012/02/22/handling-dom-events-with-emberjs-views-and-controllers/#comment-2245</link>
		<dc:creator>dagda1</dc:creator>
		<pubDate>Wed, 22 Feb 2012 14:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=837#comment-2245</guid>
		<description>A better way of defining templates is in separate files and then using the templateName attribute to point to that file, e.g:


templateName: &#039;app/templates/url_search/show&#039; 

You can load the templates into the Ember templates collection by subclassing a Tilt::Template subclass like this:

https://gist.github.com/1780841 

</description>
		<content:encoded><![CDATA[<p>A better way of defining templates is in separate files and then using the templateName attribute to point to that file, e.g:</p>
<p>templateName: &#8216;app/templates/url_search/show&#8217; </p>
<p>You can load the templates into the Ember templates collection by subclassing a Tilt::Template subclass like this:</p>
<p><a href="https://gist.github.com/1780841 " rel="nofollow">https://gist.github.com/1780841 </a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
