<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Fight id Proliferation and Update Any Element You Want</title>
	<atom:link href="http://memerocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/feed/" rel="self" type="application/rss+xml" />
	<link>http://memerocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/</link>
	<description>Bill Burcham's Launch Platform</description>
	<lastBuildDate>Fri, 17 Feb 2012 23:21:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Brad Wilson</title>
		<link>http://memerocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-153</link>
		<dc:creator><![CDATA[Brad Wilson]]></dc:creator>
		<pubDate>Mon, 05 Nov 2007 01:26:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-153</guid>
		<description><![CDATA[Bill,

I&#039;ve had some luck achieving the same result using the ActiveSupport::JSON::Variable class.
Details are available at the link below.

http://sentia.com.au/2007/11/5/using-javascript-code-for-rjs-instead-of-ids]]></description>
		<content:encoded><![CDATA[<p>Bill,</p>
<p>I&#8217;ve had some luck achieving the same result using the ActiveSupport::JSON::Variable class.<br />
Details are available at the link below.</p>
<p><a href="http://sentia.com.au/2007/11/5/using-javascript-code-for-rjs-instead-of-ids" rel="nofollow">http://sentia.com.au/2007/11/5/using-javascript-code-for-rjs-instead-of-ids</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://memerocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-152</link>
		<dc:creator><![CDATA[Bill]]></dc:creator>
		<pubDate>Thu, 19 Apr 2007 17:04:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-152</guid>
		<description><![CDATA[I just tried topfunky&#039;s suggestion and it turns out it does not work. Rails generates JavaScript with the select expression quoted like this:

new Insertion.Bottom(&quot;$$(â€™p.welcome bâ€™).first()&quot;, &quot;Some item&quot;);

And then of course, prototype&#039;s Insertion object calls $() with that string and does not find any element with a matching id.]]></description>
		<content:encoded><![CDATA[<p>I just tried topfunky&#8217;s suggestion and it turns out it does not work. Rails generates JavaScript with the select expression quoted like this:</p>
<p>new Insertion.Bottom(&#8220;$$(â€™p.welcome bâ€™).first()&#8221;, &#8220;Some item&#8221;);</p>
<p>And then of course, prototype&#8217;s Insertion object calls $() with that string and does not find any element with a matching id.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://memerocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-151</link>
		<dc:creator><![CDATA[Bill]]></dc:creator>
		<pubDate>Sat, 14 Apr 2007 22:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-151</guid>
		<description><![CDATA[I love that presentation Adam - partly because fiveruns is so dang cool and partly because I love orange and blue. One thing I notice both in the RJS language and in the Selenium tests is that everything works pretty well so long as you have id&#039;s on all the elements of interest.

So the original post here is at a surface-level about getting beyond the &quot;element of interest must have an id element&quot; limitation of the RJS DSL. There is a parallel problem in Selenium&#039;s Ruby API, to wit, it works pretty well so long as you&#039;ve got id&#039;s on your elements -- but if you try to use the (much touted) CSS or XPath selectors you&#039;ll find they simply don&#039;t work. It isn&#039;t that Selenium doesn&#039;t support &#039;em -- it does if you use the JavaScript lib. It&#039;s just that the Ruby lib doesn&#039;t.

So maybe this issue is smaller than my comment above (http://www.meme-rocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-6227) might indicate. Maybe we just need a couple tweaks here and there to bring the culture more fully in line w/ CSS selectors.]]></description>
		<content:encoded><![CDATA[<p>I love that presentation Adam &#8211; partly because fiveruns is so dang cool and partly because I love orange and blue. One thing I notice both in the RJS language and in the Selenium tests is that everything works pretty well so long as you have id&#8217;s on all the elements of interest.</p>
<p>So the original post here is at a surface-level about getting beyond the &#8220;element of interest must have an id element&#8221; limitation of the RJS DSL. There is a parallel problem in Selenium&#8217;s Ruby API, to wit, it works pretty well so long as you&#8217;ve got id&#8217;s on your elements &#8212; but if you try to use the (much touted) CSS or XPath selectors you&#8217;ll find they simply don&#8217;t work. It isn&#8217;t that Selenium doesn&#8217;t support &#8216;em &#8212; it does if you use the JavaScript lib. It&#8217;s just that the Ruby lib doesn&#8217;t.</p>
<p>So maybe this issue is smaller than my comment above (<a href="http://www.meme-rocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-6227" rel="nofollow">http://www.meme-rocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-6227</a>) might indicate. Maybe we just need a couple tweaks here and there to bring the culture more fully in line w/ CSS selectors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Keys</title>
		<link>http://memerocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-150</link>
		<dc:creator><![CDATA[Adam Keys]]></dc:creator>
		<pubDate>Sat, 14 Apr 2007 22:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-150</guid>
		<description><![CDATA[Marcel Molina&#039;s presentation at SXSW really illuminated this for me:

http://fiveruns.com/downloads/sxswi_rails_and_ajax.pdf

Besides clueing me into all sorts of hidden trickery, it reminded me that RJS is all about DRYing up verbose and frequently used idioms.  Rather than passing all sorts of :complete and :loading parameters to form or link helpers, RJS extracts that intent and gives it a little language of its own.]]></description>
		<content:encoded><![CDATA[<p>Marcel Molina&#8217;s presentation at SXSW really illuminated this for me:</p>
<p><a href="http://fiveruns.com/downloads/sxswi_rails_and_ajax.pdf" rel="nofollow">http://fiveruns.com/downloads/sxswi_rails_and_ajax.pdf</a></p>
<p>Besides clueing me into all sorts of hidden trickery, it reminded me that RJS is all about DRYing up verbose and frequently used idioms.  Rather than passing all sorts of :complete and :loading parameters to form or link helpers, RJS extracts that intent and gives it a little language of its own.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://memerocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-149</link>
		<dc:creator><![CDATA[Bill]]></dc:creator>
		<pubDate>Tue, 10 Apr 2007 20:33:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-149</guid>
		<description><![CDATA[It seems like that ought to work topfunky. As you point out though it does break the whole point of RJS.

While we&#039;re talking about &quot;the whole point of RJS&quot;, the more I (try to) use RJS, the more I end up just writing JavaScript. If &quot;the whole point of RJS&quot; is to enable newbies to ape sample code quickly then it is on point. If &quot;the whole point of RJS&quot; is to provide a more capable, more understandable dev environment, or to speed learning (versus JS) then I don&#039;t think it&#039;s on point. RJS is insufficiently documented, insufficiently understood, and just well... insufficient. Any but the most casual user is inevitably sucked into debugging JS and reading Prototype and Scriptaculous doc and source code. To what beneficial end? By the time you do all that, the Ruby wrapper is just getting in your way isn&#039;t it?

I think that RJS, like Google&#039;s GWT, is predicated on the asumption that JavaScript is a &quot;bad&quot; language that needs to be hidden - a necessary evil, but evil nonetheless. Even if you accept the premise, RJS hasn&#039;t hidden any of the evil. Rather than hide evil, RJS replicates the JS language elements one-for-one. Except when it doesn&#039;t (as in the case outlined above of the failure to support exprs in certain positions).

If JS really was evil and we wanted to address that we&#039;d almost certainly not replicate the language as a Ruby DSL. But as I said, I don&#039;t think JS is evil anyway. It seems what&#039;s actually needed is an _integration_ between Ruby and JS. I haven&#039;t tried Dan Webb&#039;s MinusMOR yet (.ejs templates) but I think that may be a better approach.]]></description>
		<content:encoded><![CDATA[<p>It seems like that ought to work topfunky. As you point out though it does break the whole point of RJS.</p>
<p>While we&#8217;re talking about &#8220;the whole point of RJS&#8221;, the more I (try to) use RJS, the more I end up just writing JavaScript. If &#8220;the whole point of RJS&#8221; is to enable newbies to ape sample code quickly then it is on point. If &#8220;the whole point of RJS&#8221; is to provide a more capable, more understandable dev environment, or to speed learning (versus JS) then I don&#8217;t think it&#8217;s on point. RJS is insufficiently documented, insufficiently understood, and just well&#8230; insufficient. Any but the most casual user is inevitably sucked into debugging JS and reading Prototype and Scriptaculous doc and source code. To what beneficial end? By the time you do all that, the Ruby wrapper is just getting in your way isn&#8217;t it?</p>
<p>I think that RJS, like Google&#8217;s GWT, is predicated on the asumption that JavaScript is a &#8220;bad&#8221; language that needs to be hidden &#8211; a necessary evil, but evil nonetheless. Even if you accept the premise, RJS hasn&#8217;t hidden any of the evil. Rather than hide evil, RJS replicates the JS language elements one-for-one. Except when it doesn&#8217;t (as in the case outlined above of the failure to support exprs in certain positions).</p>
<p>If JS really was evil and we wanted to address that we&#8217;d almost certainly not replicate the language as a Ruby DSL. But as I said, I don&#8217;t think JS is evil anyway. It seems what&#8217;s actually needed is an _integration_ between Ruby and JS. I haven&#8217;t tried Dan Webb&#8217;s MinusMOR yet (.ejs templates) but I think that may be a better approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: topfunky</title>
		<link>http://memerocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-148</link>
		<dc:creator><![CDATA[topfunky]]></dc:creator>
		<pubDate>Tue, 10 Apr 2007 18:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.meme-rocket.com/2007/04/10/fight-id-proliferation-and-update-any-element-you-want/#comment-148</guid>
		<description><![CDATA[What about just passing a string with Javascript in it? Does that work? Maybe that breaks the point of RJS...staying in Ruby-land instead of Javascript-land.


page.insert_html :bottom, &quot;$$(&#039;p.welcome b&#039;).first()&quot;, &quot;Some item&quot;]]></description>
		<content:encoded><![CDATA[<p>What about just passing a string with Javascript in it? Does that work? Maybe that breaks the point of RJS&#8230;staying in Ruby-land instead of Javascript-land.</p>
<p>page.insert_html :bottom, &#8220;$$(&#8216;p.welcome b&#8217;).first()&#8221;, &#8220;Some item&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

