<?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: javascript:void(0) must die</title>
	<atom:link href="http://www.dominykas.com/2009/12/javascript-void-must-die.rss2.xml" rel="self" type="application/rss+xml" />
	<link>http://www.dominykas.com/2009/12/javascript-void-must-die.html</link>
	<description>I&#039;d like to someday write a book about asking the right questions</description>
	<lastBuildDate>Thu, 03 Dec 2009 20:19:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dominykas</title>
		<link>http://www.dominykas.com/2009/12/javascript-void-must-die.html/comment-page-1#comment-6</link>
		<dc:creator>Dominykas</dc:creator>
		<pubDate>Thu, 03 Dec 2009 20:19:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.dominykas.com/?p=8#comment-6</guid>
		<description>Mark, even if you hadn&#039;t provided real URLs from the start, you can always link to named anchors, i.e. #something - as long as #something exists (even a div with an id will do) - it&#039;s better than void. Forgot to include that in the post :)

I did, indeed, not elaborate on the whole GET/POST topic - but hey - it&#039;s for future use :) Especially if I get a chance to publish the security slides.

As for redirecting to a new form - the same URL can handle both AJAX, and non-AJAX (/myResource?delete=yes&amp;confirmed=yes). Assuming you&#039;re already doing a POST, you just need to check for AJAX header and return appropriate view - be it MVC or not - if (AJAX) { echo JSON() } else { echo HTML() } - not that much code required!

The only real thing to build is the &quot;interstitial form&quot; - but that can easily be frameworkified. In reality, supporting this is not even 10% overhead on individual feature, compared to the hoops that you have to implement for it to work (access checking, validation, escaping, connections, etc etc). And it&#039;s even more negligible in the big picture of the overall project (whatever the case may be) - you need frameworks developed, etc etc.

There&#039;s no reason to be lazy, whether client pays for it or not. If one starts doing that now, and charging their customers 5% more, without even negotiating the &quot;accessibility&quot; aspect - the &quot;just do it&quot; way - it&#039;s still just just more than inflation in Ireland in 2008. And you get the bragging rights as well, even if the customer doesn&#039;t realize that :)</description>
		<content:encoded><![CDATA[<p>Mark, even if you hadn&#8217;t provided real URLs from the start, you can always link to named anchors, i.e. #something &#8211; as long as #something exists (even a div with an id will do) &#8211; it&#8217;s better than void. Forgot to include that in the post :)</p>
<p>I did, indeed, not elaborate on the whole GET/POST topic &#8211; but hey &#8211; it&#8217;s for future use :) Especially if I get a chance to publish the security slides.</p>
<p>As for redirecting to a new form &#8211; the same URL can handle both AJAX, and non-AJAX (/myResource?delete=yes&#038;confirmed=yes). Assuming you&#8217;re already doing a POST, you just need to check for AJAX header and return appropriate view &#8211; be it MVC or not &#8211; if (AJAX) { echo JSON() } else { echo HTML() } &#8211; not that much code required!</p>
<p>The only real thing to build is the &#8220;interstitial form&#8221; &#8211; but that can easily be frameworkified. In reality, supporting this is not even 10% overhead on individual feature, compared to the hoops that you have to implement for it to work (access checking, validation, escaping, connections, etc etc). And it&#8217;s even more negligible in the big picture of the overall project (whatever the case may be) &#8211; you need frameworks developed, etc etc.</p>
<p>There&#8217;s no reason to be lazy, whether client pays for it or not. If one starts doing that now, and charging their customers 5% more, without even negotiating the &#8220;accessibility&#8221; aspect &#8211; the &#8220;just do it&#8221; way &#8211; it&#8217;s still just just more than inflation in Ireland in 2008. And you get the bragging rights as well, even if the customer doesn&#8217;t realize that :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Lennox</title>
		<link>http://www.dominykas.com/2009/12/javascript-void-must-die.html/comment-page-1#comment-5</link>
		<dc:creator>Mark Lennox</dc:creator>
		<pubDate>Thu, 03 Dec 2009 13:39:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.dominykas.com/?p=8#comment-5</guid>
		<description>Using real URL&#039;s is great as long as you have built that into your design from the start. You should probably mention that using GET&#039;s to update/delete is probably not a good thing - which people might implement while taking a short-cut.

Redirecting to a new form from the link to support regressive dehancement ;) is my favourite choice, also links are crawlable, URL&#039;s don&#039;t need to be maintained in server-side AND javascript etc. - but it means more coding, and the client won&#039;t pay for that (time, not necessarily money). But that opens up the whole question of selling basic functionality to the business, which is always a hard sell - &quot;gimme what I want, not what I need&quot;</description>
		<content:encoded><![CDATA[<p>Using real URL&#8217;s is great as long as you have built that into your design from the start. You should probably mention that using GET&#8217;s to update/delete is probably not a good thing &#8211; which people might implement while taking a short-cut.</p>
<p>Redirecting to a new form from the link to support regressive dehancement ;) is my favourite choice, also links are crawlable, URL&#8217;s don&#8217;t need to be maintained in server-side AND javascript etc. &#8211; but it means more coding, and the client won&#8217;t pay for that (time, not necessarily money). But that opens up the whole question of selling basic functionality to the business, which is always a hard sell &#8211; &#8220;gimme what I want, not what I need&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
