<?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: How to write a simple undo system for your app</title>
	<atom:link href="http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-write-an-simple-undo-system-for-your-app</link>
	<description>helping you with javascript since 2007</description>
	<lastBuildDate>Tue, 31 Jan 2012 11:22:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: dYcbbgcx</title>
		<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/comment-page-1/#comment-1408</link>
		<dc:creator>dYcbbgcx</dc:creator>
		<pubDate>Thu, 13 Oct 2011 14:12:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.javascriptkata.com/?p=188#comment-1408</guid>
		<description>&lt;strong&gt;2011...&lt;/strong&gt;

Hello, you used to write excellent, but the last several posts have been kinda boring… I miss your tremendous writings. Past several posts are just a little out of track! come on!...</description>
		<content:encoded><![CDATA[<p><strong>2011&#8230;</strong></p>
<p>Hello, you used to write excellent, but the last several posts have been kinda boring… I miss your tremendous writings. Past several posts are just a little out of track! come on!&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Announcing the jsKata libraries &#187; Javascript Kata</title>
		<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/comment-page-1/#comment-920</link>
		<dc:creator>Announcing the jsKata libraries &#187; Javascript Kata</dc:creator>
		<pubDate>Tue, 15 Jun 2010 12:02:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.javascriptkata.com/?p=188#comment-920</guid>
		<description>[...] &amp; redo I wrote about undo and undo &amp; redo before. I took the code and put it in jsKata. You can look at the code or try [...]</description>
		<content:encoded><![CDATA[<p>[...] &amp; redo I wrote about undo and undo &amp; redo before. I took the code and put it in jsKata. You can look at the code or try [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: An undo/redo library for your app &#187; Javascript Kata</title>
		<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/comment-page-1/#comment-896</link>
		<dc:creator>An undo/redo library for your app &#187; Javascript Kata</dc:creator>
		<pubDate>Mon, 26 Apr 2010 20:26:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.javascriptkata.com/?p=188#comment-896</guid>
		<description>[...] wrote about undo before and I pushed it farther. What about an undo/redo system? I extended the v.01 of the undo and [...]</description>
		<content:encoded><![CDATA[<p>[...] wrote about undo before and I pushed it farther. What about an undo/redo system? I extended the v.01 of the undo and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/comment-page-1/#comment-883</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 05 Apr 2010 22:27:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.javascriptkata.com/?p=188#comment-883</guid>
		<description>@Joao
You&#039;re right, the undo history is lost if you close navigate out of the page. In this case, this is not a problem but more a feature. I didn&#039;t talk about I consider it strong enough for an undo system because you probably don&#039;t want to navigate out of the page and then come back and have an undo history that is still filled. It would be confusing. But I agree that in certain cases, you might want one. Then, there must be plugins that exist to do that kind of thing.

@Ryan
Thanks a lot, improvements are coming in a new version.</description>
		<content:encoded><![CDATA[<p>@Joao<br />
You&#8217;re right, the undo history is lost if you close navigate out of the page. In this case, this is not a problem but more a feature. I didn&#8217;t talk about I consider it strong enough for an undo system because you probably don&#8217;t want to navigate out of the page and then come back and have an undo history that is still filled. It would be confusing. But I agree that in certain cases, you might want one. Then, there must be plugins that exist to do that kind of thing.</p>
<p>@Ryan<br />
Thanks a lot, improvements are coming in a new version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/comment-page-1/#comment-882</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Mon, 05 Apr 2010 21:05:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.javascriptkata.com/?p=188#comment-882</guid>
		<description>Good methodology for handling this feature addition.  Thanks for sharing!</description>
		<content:encoded><![CDATA[<p>Good methodology for handling this feature addition.  Thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: João Pedro Pereira</title>
		<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/comment-page-1/#comment-881</link>
		<dc:creator>João Pedro Pereira</dc:creator>
		<pubDate>Mon, 05 Apr 2010 21:05:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.javascriptkata.com/?p=188#comment-881</guid>
		<description>I think that it may have a problem...
Because it&#039;s client side you&#039;ve a problem, if the user click on delete p.e. and then close the site the information won&#039;t be deleted. Right?</description>
		<content:encoded><![CDATA[<p>I think that it may have a problem&#8230;<br />
Because it&#8217;s client side you&#8217;ve a problem, if the user click on delete p.e. and then close the site the information won&#8217;t be deleted. Right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/comment-page-1/#comment-876</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Wed, 31 Mar 2010 14:42:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.javascriptkata.com/?p=188#comment-876</guid>
		<description>@Andrea
I was already working with that idea and I talked about it on Reddit.

@Charles
Frank is right. You still have to write secure server code. And if someone is fool enough to do it, he will delete his own data.</description>
		<content:encoded><![CDATA[<p>@Andrea<br />
I was already working with that idea and I talked about it on Reddit.</p>
<p>@Charles<br />
Frank is right. You still have to write secure server code. And if someone is fool enough to do it, he will delete his own data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/comment-page-1/#comment-875</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Wed, 31 Mar 2010 13:35:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.javascriptkata.com/?p=188#comment-875</guid>
		<description>Charles,

This undo code is client-side only. You still have to write some secure code on the server :)</description>
		<content:encoded><![CDATA[<p>Charles,</p>
<p>This undo code is client-side only. You still have to write some secure code on the server <img src='http://www.javascriptkata.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles</title>
		<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/comment-page-1/#comment-874</link>
		<dc:creator>Charles</dc:creator>
		<pubDate>Wed, 31 Mar 2010 11:21:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.javascriptkata.com/?p=188#comment-874</guid>
		<description>So what happens when client X looks at the code, and then decides to use some script to curl http://yoursite.com/users/delete?id=$n where $n goes from 0 to 10000?</description>
		<content:encoded><![CDATA[<p>So what happens when client X looks at the code, and then decides to use some script to curl <a href="http://yoursite.com/users/delete?id=$n" rel="nofollow">http://yoursite.com/users/delete?id=$n</a> where $n goes from 0 to 10000?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea</title>
		<link>http://www.javascriptkata.com/2010/03/29/how-to-write-an-simple-undo-system-for-your-app/comment-page-1/#comment-873</link>
		<dc:creator>Andrea</dc:creator>
		<pubDate>Wed, 31 Mar 2010 10:12:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.javascriptkata.com/?p=188#comment-873</guid>
		<description>What you are trying to reproduce is the Command pattern. But you obtained only half of it.
Instead of saving the &quot;undo&quot; function in an array, encapsulate both the &quot;do&quot; and &quot;undo&quot; functions in an object and pass this object to a function that 
- call the &quot;do&quot;
- save the object in an array
When you want to undo pick the object from the array (but leave it there) and call the &quot;undo&quot;
If you want to redo pick the object from the array and call the &quot;do&quot;</description>
		<content:encoded><![CDATA[<p>What you are trying to reproduce is the Command pattern. But you obtained only half of it.<br />
Instead of saving the &#8220;undo&#8221; function in an array, encapsulate both the &#8220;do&#8221; and &#8220;undo&#8221; functions in an object and pass this object to a function that<br />
- call the &#8220;do&#8221;<br />
- save the object in an array<br />
When you want to undo pick the object from the array (but leave it there) and call the &#8220;undo&#8221;<br />
If you want to redo pick the object from the array and call the &#8220;do&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

