<?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: Workflow In Backbone Apps: Triggering View Events From DOM Events</title>
	<atom:link href="http://lostechies.com/derickbailey/2012/05/15/workflow-in-backbone-apps-triggering-view-events-from-dom-events/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/derickbailey/2012/05/15/workflow-in-backbone-apps-triggering-view-events-from-dom-events/</link>
	<description>Better Than Yesterday</description>
	<lastBuildDate>Fri, 17 May 2013 03:30: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: tom</title>
		<link>http://lostechies.com/derickbailey/2012/05/15/workflow-in-backbone-apps-triggering-view-events-from-dom-events/#comment-2851</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Fri, 23 Nov 2012 04:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=930#comment-2851</guid>
		<description>Hi I&#039;m trying to implement a wizard..
I wanted to have a workflow controller which have the steps in some kind of order.. 


I was just wondering when using triggers would you set it up in a pub sub kind of way? i.e. if i have a trigger of next how would i get some kind of workflow controller to subscribe and display the next view in a content region with the model?


how would that look in backbone with marionette.. im very new to it all</description>
		<content:encoded><![CDATA[<p>Hi I&#8217;m trying to implement a wizard..<br />
I wanted to have a workflow controller which have the steps in some kind of order.. </p>
<p>I was just wondering when using triggers would you set it up in a pub sub kind of way? i.e. if i have a trigger of next how would i get some kind of workflow controller to subscribe and display the next view in a content region with the model?</p>
<p>how would that look in backbone with marionette.. im very new to it all</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derick Bailey</title>
		<link>http://lostechies.com/derickbailey/2012/05/15/workflow-in-backbone-apps-triggering-view-events-from-dom-events/#comment-2613</link>
		<dc:creator>Derick Bailey</dc:creator>
		<pubDate>Thu, 12 Jul 2012 13:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=930#comment-2613</guid>
		<description>hi scott - these questions would be better asked on the marionette mailing list, to facilitate easier discussion and searchable answers: 


https://groups.google.com/forum/#!forum/backbone-marionette
thanks :)</description>
		<content:encoded><![CDATA[<p>hi scott &#8211; these questions would be better asked on the marionette mailing list, to facilitate easier discussion and searchable answers: </p>
<p><a href="https://groups.google.com/forum/#!forum/backbone-marionette" rel="nofollow">https://groups.google.com/forum/#!forum/backbone-marionette</a><br />
thanks :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Coates</title>
		<link>http://lostechies.com/derickbailey/2012/05/15/workflow-in-backbone-apps-triggering-view-events-from-dom-events/#comment-2610</link>
		<dc:creator>Scott Coates</dc:creator>
		<pubDate>Thu, 12 Jul 2012 05:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=930#comment-2610</guid>
		<description>I see the configureTriggers function calls event.stopPropagation and preventDefault. I&#039;d actually like to have these events continue on so the url in the address can change (
http://stackoverflow.com/questions/9328513/backbone-js-and-pushstate/9331734#9331734)


Thoughts?</description>
		<content:encoded><![CDATA[<p>I see the configureTriggers function calls event.stopPropagation and preventDefault. I&#8217;d actually like to have these events continue on so the url in the address can change (<br />
<a href="http://stackoverflow.com/questions/9328513/backbone-js-and-pushstate/9331734#9331734" rel="nofollow">http://stackoverflow.com/questions/9328513/backbone-js-and-pushstate/9331734#9331734</a>)</p>
<p>Thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Coates</title>
		<link>http://lostechies.com/derickbailey/2012/05/15/workflow-in-backbone-apps-triggering-view-events-from-dom-events/#comment-2609</link>
		<dc:creator>Scott Coates</dc:creator>
		<pubDate>Thu, 12 Jul 2012 04:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=930#comment-2609</guid>
		<description>Where do you typically attach events to a view? From within an Application object? I&#039;m guessing since Marionette strives for decoupled views, you don&#039;t often have one view tie into another view&#039;s events. Do you typically have CollectionViews tie into its ItemView&#039;s events?</description>
		<content:encoded><![CDATA[<p>Where do you typically attach events to a view? From within an Application object? I&#8217;m guessing since Marionette strives for decoupled views, you don&#8217;t often have one view tie into another view&#8217;s events. Do you typically have CollectionViews tie into its ItemView&#8217;s events?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derick Bailey</title>
		<link>http://lostechies.com/derickbailey/2012/05/15/workflow-in-backbone-apps-triggering-view-events-from-dom-events/#comment-2573</link>
		<dc:creator>Derick Bailey</dc:creator>
		<pubDate>Tue, 26 Jun 2012 13:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=930#comment-2573</guid>
		<description>this is a very bad idea for a number of reasons. most of them come down to context and coupling.


let&#039;s say you have 3 separate worflows... one for adding an employee, one for adding a contractor, and one for adding a vendor. in all three of these situations you might have a cancel button on one of the views in the workflow. if you trigger &quot;cancel&quot; from each of these three views, all three of the workflows will receive the cancel event because you are using a global event aggregator. this will cause really big, horribly problems with your app, long term.  


to fix the &quot;cancel&quot; event problem, you have to hack your events the way you have done, and prefix them with the view&#039;s type name. this is very tightly coupling your events to your views. the purpose of the events is to decouple the parts of the app, not couple them more tightly with magic strings. if you change your view&#039;s name, you have to hope you can find all of the places in your code that use this view&#039;s name in an event, so you can change them all and keep your code up to date.
unit testing: if you are trying to test your view implementation, now you have added another requirement for your test set up: the application object must be instantiated, and must provide it&#039;s vent for use. this is going to turn in to a nightmare when you have to set up the same global objects over and over and over in your unit tests.


you no longer have a modularized system. you are now relying on global objects, which means you have tightly coupled your code to parts of the app that they should not have to know about. this means you can&#039;t take your app&#039;s module and re-use it somewhere else in the same system even, without bringing along everything it&#039;s coupled too.


you seem to be wanting to push all of the responsibility of every part of the system up to the application object. this flies in the face of every object oriented software development principle i can think of. giant &quot;god objects&quot; that handle everything (also known as &quot;big ball of mud&quot;) are one of the worst anti-patterns in software design.


and on top of all that, you&#039;ll have to maintain your hack in your system every time a new version of Marionette is released. that will get tedious, quickly. but that&#039;s a minor problem compared to the other issues.</description>
		<content:encoded><![CDATA[<p>this is a very bad idea for a number of reasons. most of them come down to context and coupling.</p>
<p>let&#8217;s say you have 3 separate worflows&#8230; one for adding an employee, one for adding a contractor, and one for adding a vendor. in all three of these situations you might have a cancel button on one of the views in the workflow. if you trigger &#8220;cancel&#8221; from each of these three views, all three of the workflows will receive the cancel event because you are using a global event aggregator. this will cause really big, horribly problems with your app, long term.  </p>
<p>to fix the &#8220;cancel&#8221; event problem, you have to hack your events the way you have done, and prefix them with the view&#8217;s type name. this is very tightly coupling your events to your views. the purpose of the events is to decouple the parts of the app, not couple them more tightly with magic strings. if you change your view&#8217;s name, you have to hope you can find all of the places in your code that use this view&#8217;s name in an event, so you can change them all and keep your code up to date.<br />
unit testing: if you are trying to test your view implementation, now you have added another requirement for your test set up: the application object must be instantiated, and must provide it&#8217;s vent for use. this is going to turn in to a nightmare when you have to set up the same global objects over and over and over in your unit tests.</p>
<p>you no longer have a modularized system. you are now relying on global objects, which means you have tightly coupled your code to parts of the app that they should not have to know about. this means you can&#8217;t take your app&#8217;s module and re-use it somewhere else in the same system even, without bringing along everything it&#8217;s coupled too.</p>
<p>you seem to be wanting to push all of the responsibility of every part of the system up to the application object. this flies in the face of every object oriented software development principle i can think of. giant &#8220;god objects&#8221; that handle everything (also known as &#8220;big ball of mud&#8221;) are one of the worst anti-patterns in software design.</p>
<p>and on top of all that, you&#8217;ll have to maintain your hack in your system every time a new version of Marionette is released. that will get tedious, quickly. but that&#8217;s a minor problem compared to the other issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernardo</title>
		<link>http://lostechies.com/derickbailey/2012/05/15/workflow-in-backbone-apps-triggering-view-events-from-dom-events/#comment-2572</link>
		<dc:creator>Bernardo</dc:creator>
		<pubDate>Mon, 25 Jun 2012 21:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=930#comment-2572</guid>
		<description>Derick,


I just started working with Marionette and am working specifically with the triggers pattern. I noticed, however, that you&#039;re making the view trigger the event, instead of the App.vent object - any particular reason for that?


The reason I&#039;m asking is that once I start using the App.vent object I don&#039;t plan on having individual views trigger anything, in fact, I don&#039;t even want to keep track of individual views. I &#039;new&#039; a view directly into the region&#039;s show method (since you so graciously clean up after me anyway within the show method):


MyApp.region.show(new MyView(...));



and would like to do this:


MyApp.vent.on(&quot;myview:clickevent&quot;, ...);


I have already written the small BB.Marionette hack to make this work, but would like your input as to why or why not to do this.


Thanks!</description>
		<content:encoded><![CDATA[<p>Derick,</p>
<p>I just started working with Marionette and am working specifically with the triggers pattern. I noticed, however, that you&#8217;re making the view trigger the event, instead of the App.vent object &#8211; any particular reason for that?</p>
<p>The reason I&#8217;m asking is that once I start using the App.vent object I don&#8217;t plan on having individual views trigger anything, in fact, I don&#8217;t even want to keep track of individual views. I &#8216;new&#8217; a view directly into the region&#8217;s show method (since you so graciously clean up after me anyway within the show method):</p>
<p>MyApp.region.show(new MyView(&#8230;));</p>
<p>and would like to do this:</p>
<p>MyApp.vent.on(&#8220;myview:clickevent&#8221;, &#8230;);</p>
<p>I have already written the small BB.Marionette hack to make this work, but would like your input as to why or why not to do this.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dagda1</title>
		<link>http://lostechies.com/derickbailey/2012/05/15/workflow-in-backbone-apps-triggering-view-events-from-dom-events/#comment-2449</link>
		<dc:creator>dagda1</dc:creator>
		<pubDate>Tue, 15 May 2012 13:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/derickbailey/?p=930#comment-2449</guid>
		<description>I&#039;ve used Backbone and Ember in roughly equal amounts and the Ember bindings model is a much leaner, looser coupled and all round better way of dealing with things.


I can have several parts of my app updating from one change using bindings.  For example:

http://bit.ly/KYFmW5

In the above example I have  a queryBinding where I specify the path to the bound object.  Once that object changes, I perform a transform and the change gets published to any subscribers like the queryDidChange handler in the above gist. I can have several other observers throughout my app and observers on these observers etc.  and this is all synchronised beautifully without me having to write any additional code.

BTW, I use Backbone.Marionette on any legacy backbone apps and it has been a real time saver.  It really does take the pain out of backbone.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve used Backbone and Ember in roughly equal amounts and the Ember bindings model is a much leaner, looser coupled and all round better way of dealing with things.</p>
<p>I can have several parts of my app updating from one change using bindings.  For example:</p>
<p><a href="http://bit.ly/KYFmW5" rel="nofollow">http://bit.ly/KYFmW5</a></p>
<p>In the above example I have  a queryBinding where I specify the path to the bound object.  Once that object changes, I perform a transform and the change gets published to any subscribers like the queryDidChange handler in the above gist. I can have several other observers throughout my app and observers on these observers etc.  and this is all synchronised beautifully without me having to write any additional code.</p>
<p>BTW, I use Backbone.Marionette on any legacy backbone apps and it has been a real time saver.  It really does take the pain out of backbone.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
