<?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: JSINQ: LINQ style access for JavaScript objects</title>
	<atom:link href="http://ajaxian.com/archives/jsinq-linq-for-javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/jsinq-linq-for-javascript</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: HarryHunt</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271025</link>
		<dc:creator>HarryHunt</dc:creator>
		<pubDate>Tue, 03 Feb 2009 07:49:51 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271025</guid>
		<description>Thanks! I&#039;m glad you found a use for it ;-) 

As for my book: When I started writing it, there were already a bunch of great English books on the subject but only very few if none at all in German. I sometimes wish I had written it in English though...</description>
		<content:encoded><![CDATA[<p>Thanks! I&#8217;m glad you found a use for it ;-) </p>
<p>As for my book: When I started writing it, there were already a bunch of great English books on the subject but only very few if none at all in German. I sometimes wish I had written it in English though&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nataxia</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271019</link>
		<dc:creator>nataxia</dc:creator>
		<pubDate>Tue, 03 Feb 2009 05:04:06 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271019</guid>
		<description>Started playing with it, and I would have to agree it was very natural to use that &quot;SQL mind&quot; that seems to be built into most developers.  I&#039;m considering including this as a module in the framework I&#039;ve built for my company.

Very well done, and I&#039;m sad that your book is in german :)</description>
		<content:encoded><![CDATA[<p>Started playing with it, and I would have to agree it was very natural to use that &#8220;SQL mind&#8221; that seems to be built into most developers.  I&#8217;m considering including this as a module in the framework I&#8217;ve built for my company.</p>
<p>Very well done, and I&#8217;m sad that your book is in german :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HarryHunt</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271015</link>
		<dc:creator>HarryHunt</dc:creator>
		<pubDate>Mon, 02 Feb 2009 19:51:43 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271015</guid>
		<description>I&#039;m sorry to hear that. I have tested it in the three browsers you have mentioned and it works for me (without errors). 

Are you by any chance using Ad-Block software or anything similar that might interfere with how the JavaScript is loaded?

If it continues to not work for you, you might want to go to http://www.codeplex.com/jsinq and download it from there. (The playground is not currently included in the source or binary distribution, but other examples are).

Please let me know if you continue to have problems with JSINQ and I&#039;ll upload the playground so you can run it from your local machine.</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry to hear that. I have tested it in the three browsers you have mentioned and it works for me (without errors). </p>
<p>Are you by any chance using Ad-Block software or anything similar that might interfere with how the JavaScript is loaded?</p>
<p>If it continues to not work for you, you might want to go to <a href="http://www.codeplex.com/jsinq" rel="nofollow">http://www.codeplex.com/jsinq</a> and download it from there. (The playground is not currently included in the source or binary distribution, but other examples are).</p>
<p>Please let me know if you continue to have problems with JSINQ and I&#8217;ll upload the playground so you can run it from your local machine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MichaelSchoeler</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271014</link>
		<dc:creator>MichaelSchoeler</dc:creator>
		<pubDate>Mon, 02 Feb 2009 19:31:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271014</guid>
		<description>Cant get it to work from the provided URL. I see a &quot;welcome dialog&quot; and the page event handlers are halted by some broken JS. Doesn&#039;t work in IE, FF, or Opera.

I only get &quot;An id, string or number was expected&quot; JS error (translated from Danish).</description>
		<content:encoded><![CDATA[<p>Cant get it to work from the provided URL. I see a &#8220;welcome dialog&#8221; and the page event handlers are halted by some broken JS. Doesn&#8217;t work in IE, FF, or Opera.</p>
<p>I only get &#8220;An id, string or number was expected&#8221; JS error (translated from Danish).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nosredna</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271013</link>
		<dc:creator>Nosredna</dc:creator>
		<pubDate>Mon, 02 Feb 2009 19:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271013</guid>
		<description>&gt;&gt;I wonder whether SQL is syntax you want for manipulating js data objects. 
..
A lot more people know SQL than jQuery.</description>
		<content:encoded><![CDATA[<p>&gt;&gt;I wonder whether SQL is syntax you want for manipulating js data objects.<br />
..<br />
A lot more people know SQL than jQuery.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HarryHunt</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271011</link>
		<dc:creator>HarryHunt</dc:creator>
		<pubDate>Mon, 02 Feb 2009 18:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271011</guid>
		<description>Actually you can do that with JSINQ, except it is slightly more verbose since it involves anonymous functions:

people.where(function(p) { return p.lastname == &#039;blah&#039; &amp;&amp; p.firstname == &#039;blah&#039;; }).orderBy(function(p) { return p.lastname; })

You could do without the anonymous functions (see your example), but then you&#039;d have to sacrifice a good amount of expressivenes (you can put anything in an anonymous function, but there&#039;s only so much &quot;logic&quot; you can express with object literals, unless you want to write ASTs by hand). 

With the LINQ query syntax, you can write

from p in people where p.lastname == &#039;blah&#039; &amp;&amp; p.firstname == &#039;blah&#039; select p

which is not only shorter but also more readable (even than your already short and readable example).

I think the reason why LINQ (and XQuery for that matter) picked a SQL-like syntax is because that&#039;s something people already know. It&#039;s incredbly difficult to get developers to learn new things (you&#039;d think otherwise, but unfortunately that&#039;s not how it is) and so building on something people are already familiar with tends to be a good idea.</description>
		<content:encoded><![CDATA[<p>Actually you can do that with JSINQ, except it is slightly more verbose since it involves anonymous functions:</p>
<p>people.where(function(p) { return p.lastname == &#8216;blah&#8217; &amp;&amp; p.firstname == &#8216;blah&#8217;; }).orderBy(function(p) { return p.lastname; })</p>
<p>You could do without the anonymous functions (see your example), but then you&#8217;d have to sacrifice a good amount of expressivenes (you can put anything in an anonymous function, but there&#8217;s only so much &#8220;logic&#8221; you can express with object literals, unless you want to write ASTs by hand). </p>
<p>With the LINQ query syntax, you can write</p>
<p>from p in people where p.lastname == &#8216;blah&#8217; &amp;&amp; p.firstname == &#8216;blah&#8217; select p</p>
<p>which is not only shorter but also more readable (even than your already short and readable example).</p>
<p>I think the reason why LINQ (and XQuery for that matter) picked a SQL-like syntax is because that&#8217;s something people already know. It&#8217;s incredbly difficult to get developers to learn new things (you&#8217;d think otherwise, but unfortunately that&#8217;s not how it is) and so building on something people are already familiar with tends to be a good idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nataxia</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271010</link>
		<dc:creator>nataxia</dc:creator>
		<pubDate>Mon, 02 Feb 2009 18:27:53 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271010</guid>
		<description>I wonder whether SQL is syntax you want for manipulating js data objects.  Seems rather old fashioned.  I&#039;m sure it would be simple to create a jquery-ish syntax like $(dob).filter({lastname:&#039;blah&#039;,firstname:&#039;blah&#039;}).sort(&#039;ascending&#039;)

or something more well thought out.</description>
		<content:encoded><![CDATA[<p>I wonder whether SQL is syntax you want for manipulating js data objects.  Seems rather old fashioned.  I&#8217;m sure it would be simple to create a jquery-ish syntax like $(dob).filter({lastname:&#8217;blah&#8217;,firstname:&#8217;blah&#8217;}).sort(&#8216;ascending&#8217;)</p>
<p>or something more well thought out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HarryHunt</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271009</link>
		<dc:creator>HarryHunt</dc:creator>
		<pubDate>Mon, 02 Feb 2009 17:56:59 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271009</guid>
		<description>Well, array or list comprehensions are essentially a DSL in their own right. Their domain is the creation of arrays or lists. 

I think the boundaries between syntactic sugar and DSLs are extremely blurry with the only real distinction being that one is built into the language and the other is bolted on-top of it. But if you take LINQ for example or generics in Java or lambda expressions in C#, you&#039;ll realize that even that distinction doesn&#039;t work too well (LINQ, Java generics and C# lambdas are dealt with by a preprocessor and not by the language compiler itself).

With LINQ in C# or VB.NET, the benefit of it not being a DSL in the traditional sense is that you get the compile-time type checking. But with JavaScript, that argument becomes almost negligible, because there typically isn&#039;t a &quot;compile-time&quot; with JavaScript.

I&#039;m not saying that JSINQ wouldn&#039;t be more useful if it was built into the language itself, I&#039;m just saying that I don&#039;t see any severe disadvantages with it being a library.</description>
		<content:encoded><![CDATA[<p>Well, array or list comprehensions are essentially a DSL in their own right. Their domain is the creation of arrays or lists. </p>
<p>I think the boundaries between syntactic sugar and DSLs are extremely blurry with the only real distinction being that one is built into the language and the other is bolted on-top of it. But if you take LINQ for example or generics in Java or lambda expressions in C#, you&#8217;ll realize that even that distinction doesn&#8217;t work too well (LINQ, Java generics and C# lambdas are dealt with by a preprocessor and not by the language compiler itself).</p>
<p>With LINQ in C# or VB.NET, the benefit of it not being a DSL in the traditional sense is that you get the compile-time type checking. But with JavaScript, that argument becomes almost negligible, because there typically isn&#8217;t a &#8220;compile-time&#8221; with JavaScript.</p>
<p>I&#8217;m not saying that JSINQ wouldn&#8217;t be more useful if it was built into the language itself, I&#8217;m just saying that I don&#8217;t see any severe disadvantages with it being a library.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TNO</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271008</link>
		<dc:creator>TNO</dc:creator>
		<pubDate>Mon, 02 Feb 2009 17:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271008</guid>
		<description>&lt;b&gt;You might as well ask yourself: Why use XPath and not a bunch of nested loops?&lt;/b&gt;
.
The syntax doesn&#039;t necessarily have to be verbose:
var result = [i for each (i in list) if (i &gt; 3)];</description>
		<content:encoded><![CDATA[<p><b>You might as well ask yourself: Why use XPath and not a bunch of nested loops?</b><br />
.<br />
The syntax doesn&#8217;t necessarily have to be verbose:<br />
var result = [i for each (i in list) if (i &gt; 3)];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HarryHunt</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271005</link>
		<dc:creator>HarryHunt</dc:creator>
		<pubDate>Mon, 02 Feb 2009 15:21:11 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271005</guid>
		<description>Learning how to use JavaScript and using a DSL that allows for a more declarative programming style aren&#039;t mutually exclusive. You might as well ask yourself: Why use XPath and not a bunch of nested loops?

JSINQ is an abstraction (I&#039;ll give you that) and it is very leaky, but it&#039;s not trying to be anything else. It&#039;s not trying to create its own &quot;SQL world&quot;, instead it takes what JavaScript already knows how to do well (Lambdas, function composition, etc.) and exposes it through a slightly more convenient syntax. If you don&#039;t see the need for a specialized DSL, you can get most of the benefits of JSINQ through its library part alone (jsinq-enumerable.js).</description>
		<content:encoded><![CDATA[<p>Learning how to use JavaScript and using a DSL that allows for a more declarative programming style aren&#8217;t mutually exclusive. You might as well ask yourself: Why use XPath and not a bunch of nested loops?</p>
<p>JSINQ is an abstraction (I&#8217;ll give you that) and it is very leaky, but it&#8217;s not trying to be anything else. It&#8217;s not trying to create its own &#8220;SQL world&#8221;, instead it takes what JavaScript already knows how to do well (Lambdas, function composition, etc.) and exposes it through a slightly more convenient syntax. If you don&#8217;t see the need for a specialized DSL, you can get most of the benefits of JSINQ through its library part alone (jsinq-enumerable.js).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nosredna</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271004</link>
		<dc:creator>Nosredna</dc:creator>
		<pubDate>Mon, 02 Feb 2009 15:08:11 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271004</guid>
		<description>&gt;&gt;Why not just learn how to use JavaScript, instead of adding more dependencies for very leaky abstractions?

If you&#039;re doing a lot of this stuff, code can be smaller and easier to read or debug.</description>
		<content:encoded><![CDATA[<p>&gt;&gt;Why not just learn how to use JavaScript, instead of adding more dependencies for very leaky abstractions?</p>
<p>If you&#8217;re doing a lot of this stuff, code can be smaller and easier to read or debug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MorganRoderick</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271003</link>
		<dc:creator>MorganRoderick</dc:creator>
		<pubDate>Mon, 02 Feb 2009 14:45:37 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271003</guid>
		<description>Why not just learn how to use JavaScript, instead of adding more dependencies for very leaky abstractions?</description>
		<content:encoded><![CDATA[<p>Why not just learn how to use JavaScript, instead of adding more dependencies for very leaky abstractions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HarryHunt</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271002</link>
		<dc:creator>HarryHunt</dc:creator>
		<pubDate>Mon, 02 Feb 2009 14:20:43 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271002</guid>
		<description>JSINQ is indeed a client-only solution, although you might be able to use it with mod_v8 or ASP.NET.

It is not a clone of jLINQ for several reasons: 
for one, it is API compatible with System.Linq.Enumerable which jLINQ is not (jLINQ for example lacks the selectMany, join and groupJoin operators which are really useful when writing more complex queries) and it has a query compiler that allows you to write queries using LINQ-style query expressions rather than by chaining together method calls (although that is what the queries are compiled into). 

I&#039;m not trying to belittle jLINQ (which I think is great), it&#039;s just that JSINQ is catering to a different audience (those who already know LINQ).</description>
		<content:encoded><![CDATA[<p>JSINQ is indeed a client-only solution, although you might be able to use it with mod_v8 or ASP.NET.</p>
<p>It is not a clone of jLINQ for several reasons:<br />
for one, it is API compatible with System.Linq.Enumerable which jLINQ is not (jLINQ for example lacks the selectMany, join and groupJoin operators which are really useful when writing more complex queries) and it has a query compiler that allows you to write queries using LINQ-style query expressions rather than by chaining together method calls (although that is what the queries are compiled into). </p>
<p>I&#8217;m not trying to belittle jLINQ (which I think is great), it&#8217;s just that JSINQ is catering to a different audience (those who already know LINQ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rusco</title>
		<link>http://ajaxian.com/archives/jsinq-linq-for-javascript/comment-page-1#comment-271001</link>
		<dc:creator>Rusco</dc:creator>
		<pubDate>Mon, 02 Feb 2009 14:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=5849#comment-271001</guid>
		<description>I don&#039;t understand whether this is supposed to be a client-only solution or what&#039;s the server-side involvement. 
If it&#039;s client-side only than it looks like a copy of: 
http://plugins.jquery.com/project/jLINQ

Rusco.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand whether this is supposed to be a client-only solution or what&#8217;s the server-side involvement.<br />
If it&#8217;s client-side only than it looks like a copy of:<br />
<a href="http://plugins.jquery.com/project/jLINQ" rel="nofollow">http://plugins.jquery.com/project/jLINQ</a></p>
<p>Rusco.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

