<?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: Poly9&#8242;s Polyvalent Javascript URL Parser</title>
	<atom:link href="http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: ntulip</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-269027</link>
		<dc:creator>ntulip</dc:creator>
		<pubDate>Wed, 12 Nov 2008 19:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-269027</guid>
		<description>it doesn&#039;t seem to support ports IE: http://localhost:8080/haha/ha.ha</description>
		<content:encoded><![CDATA[<p>it doesn&#8217;t seem to support ports IE: <a href="http://localhost:8080/haha/ha.ha" rel="nofollow">http://localhost:8080/haha/ha.ha</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: portrait artist</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-258335</link>
		<dc:creator>portrait artist</dc:creator>
		<pubDate>Tue, 06 Nov 2007 05:21:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-258335</guid>
		<description>I agree with Crescent Fresh.  That was something that stopped me from commenting some time ago.  But now that someone else is confirming my guess, I think itâ€™s high time for us or you to correct such statement.</description>
		<content:encoded><![CDATA[<p>I agree with Crescent Fresh.  That was something that stopped me from commenting some time ago.  But now that someone else is confirming my guess, I think itâ€™s high time for us or you to correct such statement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Crescent Fresh</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-257638</link>
		<dc:creator>Crescent Fresh</dc:creator>
		<pubDate>Wed, 24 Oct 2007 03:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-257638</guid>
		<description>Breton, your statement &quot;Javascript has the great ability to make getters and setters completely invisible, and look just like normal variable assignments&quot; is not entirely correct. This is only possible in Mozilla&#039;s javascript engine.</description>
		<content:encoded><![CDATA[<p>Breton, your statement &#8220;Javascript has the great ability to make getters and setters completely invisible, and look just like normal variable assignments&#8221; is not entirely correct. This is only possible in Mozilla&#8217;s javascript engine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Breton</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-254462</link>
		<dc:creator>Breton</dc:creator>
		<pubDate>Fri, 24 Aug 2007 22:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-254462</guid>
		<description>Not to mention that it makes shifting from a naked variable to an abstracted variable piss easy, contrary to the comments above. In JAVA you have to start out with getters and setters. in javascript you can switch back and fourth between regular variables and getter/setters without any issue.</description>
		<content:encoded><![CDATA[<p>Not to mention that it makes shifting from a naked variable to an abstracted variable piss easy, contrary to the comments above. In JAVA you have to start out with getters and setters. in javascript you can switch back and fourth between regular variables and getter/setters without any issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Breton</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-254461</link>
		<dc:creator>Breton</dc:creator>
		<pubDate>Fri, 24 Aug 2007 22:54:37 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-254461</guid>
		<description>Getters and setters are fine, but why on earth aren&#039;t they using NATIVE javascript getters and setters? I sure as hell like

Myobject.myvar=5;
alert(Myobject.myvar);

MUCH better than

Myobject.setMyVariable(5);
alert(Myobject.getMyVariable());

Javascript has the great ability to make getters and setters completely invisible, and look just like normal variable assignments. Why on earth would you choose to not take advantage of that feature, and save yourself some damn typing?</description>
		<content:encoded><![CDATA[<p>Getters and setters are fine, but why on earth aren&#8217;t they using NATIVE javascript getters and setters? I sure as hell like</p>
<p>Myobject.myvar=5;<br />
alert(Myobject.myvar);</p>
<p>MUCH better than</p>
<p>Myobject.setMyVariable(5);<br />
alert(Myobject.getMyVariable());</p>
<p>Javascript has the great ability to make getters and setters completely invisible, and look just like normal variable assignments. Why on earth would you choose to not take advantage of that feature, and save yourself some damn typing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carmen</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-252463</link>
		<dc:creator>carmen</dc:creator>
		<pubDate>Mon, 09 Jul 2007 10:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-252463</guid>
		<description>ajaxian tho. browsers already have these methods implemented natively on Location objects. but you can&#039;t create a location object without setting window.location (and changing the page). really?</description>
		<content:encoded><![CDATA[<p>ajaxian tho. browsers already have these methods implemented natively on Location objects. but you can&#8217;t create a location object without setting window.location (and changing the page). really?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Garrett</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-250675</link>
		<dc:creator>Garrett</dc:creator>
		<pubDate>Mon, 21 May 2007 20:34:45 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-250675</guid>
		<description>Having getters and setters can be a useful way to protect members. You don&#039;t want to set the property on a URL unless it&#039;s a param, and in that case, calling URL.addParameter or url.setParameter would need a setter and a getter to getParameterValues. Since this is a parser class, it should not (and rightly does not) have getters.

Needless to say, the code needs:
 * named methods. Anonymous functions are a pain in the neck to debug. Start with the anonymous constructor:
 &lt;code&gt;Poly9.URLParser = function(url)&lt;/code&gt;
to:
&lt;code&gt;Poly9.URLParser = function URLParser (url)&lt;/code&gt;
 * don&#039;t do the magic trick with the setters/getters. Makes it very hard to debug/get a stack trace out of dynamically created methods. 
 * throw an Error, not a string. This makes debugging much easier.
 * should use object literal for URLParser.prototype. This makes the code more readable and compact. It&#039;s like having a block that says &quot;here&#039;s the prototype of the object.&quot;
 
Saying that the code not good because it looks like java is even more ignorant. 

I criticize the code and the critics who didn&#039;t do a good job at criticizing the code. 

Props to the people for putting this code out there and letting us all criticize it. 

Wow, I&#039;m a latecomer to this post...</description>
		<content:encoded><![CDATA[<p>Having getters and setters can be a useful way to protect members. You don&#8217;t want to set the property on a URL unless it&#8217;s a param, and in that case, calling URL.addParameter or url.setParameter would need a setter and a getter to getParameterValues. Since this is a parser class, it should not (and rightly does not) have getters.</p>
<p>Needless to say, the code needs:<br />
 * named methods. Anonymous functions are a pain in the neck to debug. Start with the anonymous constructor:<br />
 <code>Poly9.URLParser = function(url)</code><br />
to:<br />
<code>Poly9.URLParser = function URLParser (url)</code><br />
 * don&#8217;t do the magic trick with the setters/getters. Makes it very hard to debug/get a stack trace out of dynamically created methods.<br />
 * throw an Error, not a string. This makes debugging much easier.<br />
 * should use object literal for URLParser.prototype. This makes the code more readable and compact. It&#8217;s like having a block that says &#8220;here&#8217;s the prototype of the object.&#8221;</p>
<p>Saying that the code not good because it looks like java is even more ignorant. </p>
<p>I criticize the code and the critics who didn&#8217;t do a good job at criticizing the code. </p>
<p>Props to the people for putting this code out there and letting us all criticize it. </p>
<p>Wow, I&#8217;m a latecomer to this post&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-246993</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 08 Feb 2007 05:51:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-246993</guid>
		<description>I&#039;ve also written a URL parser, which (IMO) is much leaner and meaner. Check it out:

http://badassery.blogspot.com/2007/02/parseuri-split-urls-in-javascript.html</description>
		<content:encoded><![CDATA[<p>I&#8217;ve also written a URL parser, which (IMO) is much leaner and meaner. Check it out:</p>
<p><a href="http://badassery.blogspot.com/2007/02/parseuri-split-urls-in-javascript.html" rel="nofollow">http://badassery.blogspot.com/2007/02/parseuri-split-urls-in-javascript.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matthew</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-245242</link>
		<dc:creator>matthew</dc:creator>
		<pubDate>Thu, 14 Dec 2006 21:16:04 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-245242</guid>
		<description>I can&#039;t believe that I&#039;m hearing things like &quot;Getters and Setters are useless when the variables that they are accessing are public anyways.&quot;  Getters and setters allow the programmer to completely change the implementation without changing the API.. and abstraction is one of the main benefits of OO programming!</description>
		<content:encoded><![CDATA[<p>I can&#8217;t believe that I&#8217;m hearing things like &#8220;Getters and Setters are useless when the variables that they are accessing are public anyways.&#8221;  Getters and setters allow the programmer to completely change the implementation without changing the API.. and abstraction is one of the main benefits of OO programming!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Nagle</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-245147</link>
		<dc:creator>John Nagle</dc:creator>
		<pubDate>Tue, 12 Dec 2006 18:49:50 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-245147</guid>
		<description>The real problem with this library is not style. It&#039;s that it doesn&#039;t do the whole job of parsing a URL. It just extracts the &quot;arguments&quot; field as one string; it doesn&#039;t break down the arguments into fields.  

Look in the test cases.  There&#039;s

p.setURL(&#039;poly9.com/a/pathname?field=value&amp;field2=value2&#039;);

but no following checks, because they can&#039;t extract the values of &quot;field&quot; and &quot;field2&quot;. This thing is unfinished.</description>
		<content:encoded><![CDATA[<p>The real problem with this library is not style. It&#8217;s that it doesn&#8217;t do the whole job of parsing a URL. It just extracts the &#8220;arguments&#8221; field as one string; it doesn&#8217;t break down the arguments into fields.  </p>
<p>Look in the test cases.  There&#8217;s</p>
<p>p.setURL(&#8216;poly9.com/a/pathname?field=value&amp;field2=value2&#8242;);</p>
<p>but no following checks, because they can&#8217;t extract the values of &#8220;field&#8221; and &#8220;field2&#8243;. This thing is unfinished.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Kant</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-216155</link>
		<dc:creator>Andy Kant</dc:creator>
		<pubDate>Tue, 28 Nov 2006 18:39:06 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-216155</guid>
		<description>I didn&#039;t say that getters and setters are useless; I said that getters and setters are useless in this particular context.</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t say that getters and setters are useless; I said that getters and setters are useless in this particular context.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-215647</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 28 Nov 2006 14:17:28 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-215647</guid>
		<description>My comment that &quot;Javascript is useless&quot; was a direct response to the &quot;getters and setters are useless&quot; comment. Repetition creates a nice effect. I obviously use a web browser, and generally do not disable Javascript. That being said, the shortcomings of Javascript are obvious from the past 10 years of people working to get around it&#039;s limitations and hack it to do things it (1) should have done to begin with, or (2) should never do period. It serves a purpose, but it shouldn&#039;t be considered a complete development language. It is, at best, a work in progress. More people move towards treating it as a fully-featured language should drive its development, but it won&#039;t change any time soon. Any language that lacks synchronization primitives is not going to cut it in the real world.</description>
		<content:encoded><![CDATA[<p>My comment that &#8220;Javascript is useless&#8221; was a direct response to the &#8220;getters and setters are useless&#8221; comment. Repetition creates a nice effect. I obviously use a web browser, and generally do not disable Javascript. That being said, the shortcomings of Javascript are obvious from the past 10 years of people working to get around it&#8217;s limitations and hack it to do things it (1) should have done to begin with, or (2) should never do period. It serves a purpose, but it shouldn&#8217;t be considered a complete development language. It is, at best, a work in progress. More people move towards treating it as a fully-featured language should drive its development, but it won&#8217;t change any time soon. Any language that lacks synchronization primitives is not going to cut it in the real world.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Poly9 blog &#187; Blog Archive &#187; Leave some code, take some code</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-213935</link>
		<dc:creator>Poly9 blog &#187; Blog Archive &#187; Leave some code, take some code</dc:creator>
		<pubDate>Tue, 28 Nov 2006 00:25:27 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-213935</guid>
		<description>[...] Some projets: our Notebook Python API, HQQuery, and URLParser, which has quickly sparked interest and even a bit of controversy! [...]</description>
		<content:encoded><![CDATA[<p>[...] Some projets: our Notebook Python API, HQQuery, and URLParser, which has quickly sparked interest and even a bit of controversy! [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Sadetsky</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-213924</link>
		<dc:creator>Greg Sadetsky</dc:creator>
		<pubDate>Tue, 28 Nov 2006 00:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-213924</guid>
		<description>Hi Dan,

I would be curious to hear why do you consider JavaScript to be useless? Do you mean that the whole language does not serve any purpose, that it does not work well enough to suit some particular needs, that it&#039;s slow, that web browsers are useless, that automating web page elements is useless, etc.?

In your opinion, should websites presently using JavaScript use another, better language, or technology? If so, I&#039;d be interested to hear which one.

Finally, do you surf with JavaScript disabled in your web browser (if you use a web browser)?

Just curious

Thanks

Greg Sadetsky</description>
		<content:encoded><![CDATA[<p>Hi Dan,</p>
<p>I would be curious to hear why do you consider JavaScript to be useless? Do you mean that the whole language does not serve any purpose, that it does not work well enough to suit some particular needs, that it&#8217;s slow, that web browsers are useless, that automating web page elements is useless, etc.?</p>
<p>In your opinion, should websites presently using JavaScript use another, better language, or technology? If so, I&#8217;d be interested to hear which one.</p>
<p>Finally, do you surf with JavaScript disabled in your web browser (if you use a web browser)?</p>
<p>Just curious</p>
<p>Thanks</p>
<p>Greg Sadetsky</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: URLParser, el parseador de url definitivo - aNieto2K</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-213904</link>
		<dc:creator>URLParser, el parseador de url definitivo - aNieto2K</dc:creator>
		<pubDate>Mon, 27 Nov 2006 23:56:23 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-213904</guid>
		<description>[...] Via Ajaxian redescubro URLParser, una librerÃ­a JS que se encarga de ayudarnos a parsear una URL. Realmente potente y cÃ³moda de usar. [...]</description>
		<content:encoded><![CDATA[<p>[...] Via Ajaxian redescubro URLParser, una librerÃ­a JS que se encarga de ayudarnos a parsear una URL. Realmente potente y cÃ³moda de usar. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-213772</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 27 Nov 2006 21:59:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-213772</guid>
		<description>Getters and Setters are not useless. Javascript is useless, but that&#039;s not the point. If you want to hide your logic you can - if someone wants to abuse the fact that JS exposes all its variables it&#039;s their issue when the underlying implementation changes. It&#039;s the old just because you can doesn&#039;t mean you should scenario. This site seems to go there a lot recently.</description>
		<content:encoded><![CDATA[<p>Getters and Setters are not useless. Javascript is useless, but that&#8217;s not the point. If you want to hide your logic you can &#8211; if someone wants to abuse the fact that JS exposes all its variables it&#8217;s their issue when the underlying implementation changes. It&#8217;s the old just because you can doesn&#8217;t mean you should scenario. This site seems to go there a lot recently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Kant</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-213644</link>
		<dc:creator>Andy Kant</dc:creator>
		<pubDate>Mon, 27 Nov 2006 19:44:33 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-213644</guid>
		<description>Getters and Setters are useless when the variables that they are accessing are public anyways. Nice, clean code and documentation though.</description>
		<content:encoded><![CDATA[<p>Getters and Setters are useless when the variables that they are accessing are public anyways. Nice, clean code and documentation though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-213226</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 27 Nov 2006 15:25:23 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-213226</guid>
		<description>Encapsulation of logic is a good thing, and the hiding of unnecessary implementation details is even better. Granted, the behavior of a URL parser is not likely to change a whole lot over time, but if it needed to change public properties would severely limit how easily that could be done. Hide you implementations - not only because they suck -  but because you might need that flexibility later. And to bash Java in favor of Javascript is akin to wearing a flashing neon sign that says &quot;I graduated from my Grade 11 CS class and think I&#039;m a developer&quot;.</description>
		<content:encoded><![CDATA[<p>Encapsulation of logic is a good thing, and the hiding of unnecessary implementation details is even better. Granted, the behavior of a URL parser is not likely to change a whole lot over time, but if it needed to change public properties would severely limit how easily that could be done. Hide you implementations &#8211; not only because they suck &#8211;  but because you might need that flexibility later. And to bash Java in favor of Javascript is akin to wearing a flashing neon sign that says &#8220;I graduated from my Grade 11 CS class and think I&#8217;m a developer&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cheng Guangnan</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-212792</link>
		<dc:creator>Cheng Guangnan</dc:creator>
		<pubDate>Mon, 27 Nov 2006 08:46:08 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-212792</guid>
		<description>All recently post was copied from Dean Edwards&#039; del.icio.us bookmarket?

http://del.icio.us/9jack9</description>
		<content:encoded><![CDATA[<p>All recently post was copied from Dean Edwards&#8217; del.icio.us bookmarket?</p>
<p><a href="http://del.icio.us/9jack9" rel="nofollow">http://del.icio.us/9jack9</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denis Laprise</title>
		<link>http://ajaxian.com/archives/poly9s-polyvalent-javascript-url-parser/comment-page-1#comment-212648</link>
		<dc:creator>Denis Laprise</dc:creator>
		<pubDate>Mon, 27 Nov 2006 05:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1853#comment-212648</guid>
		<description>Actually I find this comparison with Java very funny since I never wrote more than few classes in that language, but thanks for the compliment. My aim was rather to create something like Google Maps, which make extensive use of getters and setters (they use camelcase, too). I thought that using the same conventions as the most widely used Javascript API (now 64% of all mashups on programmableweb.com) was the best way to publish it.
Anyway, feel free to cut &amp; paste the regex and access it with integers, this is very minimalistic.</description>
		<content:encoded><![CDATA[<p>Actually I find this comparison with Java very funny since I never wrote more than few classes in that language, but thanks for the compliment. My aim was rather to create something like Google Maps, which make extensive use of getters and setters (they use camelcase, too). I thought that using the same conventions as the most widely used Javascript API (now 64% of all mashups on programmableweb.com) was the best way to publish it.<br />
Anyway, feel free to cut &amp; paste the regex and access it with integers, this is very minimalistic.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

