<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The Wayward WebLog : Rave</title><link>http://blogs.msdn.com/mattwar/archive/tags/Rave/default.aspx</link><description>Tags: Rave</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Oops, we did it again</title><link>http://blogs.msdn.com/mattwar/archive/2006/05/10/oops-we-did-it-again.aspx</link><pubDate>Thu, 11 May 2006 01:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:594966</guid><dc:creator>mattwar</dc:creator><slash:comments>32</slash:comments><comments>http://blogs.msdn.com/mattwar/comments/594966.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattwar/commentrss.aspx?PostID=594966</wfw:commentRss><description>&lt;P&gt;A new update to &lt;A href="http://msdn.microsoft.com/data/ref/linq/" mce_href="http://msdn.microsoft.com/data/ref/linq/"&gt;LINQ preview &lt;/A&gt;is available at MSDN site.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;What's the coolest new feature?&amp;nbsp; IMHO, its IQueryable&amp;lt;T&amp;gt;.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;DLINQ's query mechanism has been generalized and available for all to use as part of System.Query.&amp;nbsp; It implements the Standard Query Operators for you using expression nodes to represent the query. Your queries can now be truly polymorphic, written over a common abstraction and translated into the target environment only when you need it to.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; CustomersInLondon(&lt;SPAN style="COLOR: teal"&gt;IQueryable&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: teal"&gt;Customer&lt;/SPAN&gt;&amp;gt; customers) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt; count = (&lt;SPAN style="COLOR: blue"&gt;from&lt;/SPAN&gt; c &lt;SPAN style="COLOR: blue"&gt;in&lt;/SPAN&gt; customers&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;where&lt;/SPAN&gt; c.City == &lt;SPAN style="COLOR: maroon"&gt;"&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:City w:st="on"&gt;&lt;st1:place w:st="on"&gt;London&lt;/st1:place&gt;&lt;/st1:City&gt;"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;select&lt;/SPAN&gt; c).Count();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; count;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Now you can define a function like this and it can operate on either an in memory collection or a remote DLINQ collection (or you own IQueryable for that matter.)&amp;nbsp; The query is then either run entirely locally or remotely depending on the target.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;If its a DLINQ query a count query is sent to the database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt;(*) &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt; [value]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt; [Customers] &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt; [t0]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt; [t0].[City] = @p0&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;If its a normal CLR collection, the query is executed locally, using the System.Query.Sequence classes definitions of the standard query operators.&amp;nbsp; All you need to do is turn your IEnumerable&amp;lt;Customer&amp;gt; into IQueryable&amp;lt;Customer&amp;gt;.&amp;nbsp; This is accomplished easily with a built-in ToQueryable() method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;List&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: teal"&gt;Customer&lt;/SPAN&gt;&amp;gt; customers = ...;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;CustomersInLondon(customers.ToQueryable());&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Wow!&amp;nbsp; That was easy.&amp;nbsp; But, how is this done?&amp;nbsp; How can you possible turn my List&amp;lt;T&amp;gt; into some queryable thingamabob?&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;Good question.&amp;nbsp; Glad you asked.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;Check out this little gem:&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Expression&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: teal"&gt;Func&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: teal"&gt;Customer&lt;/SPAN&gt;,&lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt;&amp;gt;&amp;gt; predicate =&amp;nbsp;c =&amp;gt; c.City == &lt;SPAN style="COLOR: maroon"&gt;"&lt;st1:City w:st="on"&gt;&lt;st1:place w:st="on"&gt;London&lt;/st1:place&gt;&lt;/st1:City&gt;"&lt;/SPAN&gt;;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Func&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: teal"&gt;Customer&lt;/SPAN&gt;,&lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt;&amp;gt; d = predicate.Compile();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;Now you can compile lambda expressions directly into IL at runtime!&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;ToQueryable() wraps your IEnumerable&amp;lt;T&amp;gt; in IQueryable&amp;lt;T&amp;gt; clothing, uses the Queryable infrastructure to let you build up your own expression tree queries, and then when you enumerate it, the expression is rebound to refer to your IEnumerable&amp;lt;T&amp;gt; directly, the operators rebound to refer to System.Query.Sequence, and the resulting code is compiled using the built-in expression compiler.&amp;nbsp; That code is then&amp;nbsp;invoked producing your results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;Amazing, but true.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;But wait, there is more!&amp;nbsp; Yes, it is true, not only can you slice, but you can also dice!&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;That's not the end of IQueryable&amp;lt;T&amp;gt;'s little bag of tricks.&amp;nbsp; What else could there be? How about dynamic queries, ones you can build up at runtime? Yes? No?&amp;nbsp; Say it isn't so!&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;It's true.&amp;nbsp; IQueryable&amp;lt;T&amp;gt; is fully dynamic.&amp;nbsp; Sort of.&amp;nbsp; Each IQueryable&amp;lt;T&amp;gt; has a method CreateQuery&amp;lt;S&amp;gt;() that creates a new IQueryable&amp;lt;S&amp;gt; (of the same concrete type) with a single Expression tree&amp;nbsp;argument.&amp;nbsp; That is, if I have an expression tree representing the code that defines a query, I can make an IQueryable&amp;lt;S&amp;gt; out of an old IQueryable&amp;lt;T&amp;gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;That's great you say, but you probably don't statically know what the 'T' and 'S' are in your program if you are building dynamic queries at runtime.&amp;nbsp; True, true, we've thought of that too. You see, IQueryable&amp;lt;T&amp;gt; has a smaller cousin, IQueryable, just like IEnumerable&amp;lt;T&amp;gt; has its little friend IEnumerable.&amp;nbsp; IQueryable is non-generic, but its ever so much a query as IQueryable&amp;lt;T&amp;gt;.&amp;nbsp; In fact, it has its own CreateQuery() method that builds a new IQueryable so you can do all this query building without all that static info getting in your way.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;So how do you build the expression trees that make up a query.&amp;nbsp; Check out the System.Query.QueryExpression class.&amp;nbsp; It is a collection of static methods that correspond to the standard query operator pattern, but are more loosely typed, taking arguments that are Expression's instead of Expression&amp;lt;T&amp;gt;'s.&amp;nbsp; These methods do all the work necessary to build up the call nodes that represent calls to the more fully typed IQueryable&amp;lt;T&amp;gt; query operator methods.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;Here's how you can dynamic build up the query in the prior example.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;IQueryable&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; q = ...;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;ParameterExpression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; p = &lt;SPAN style="COLOR: teal"&gt;Expression&lt;/SPAN&gt;.Parameter(&lt;SPAN style="COLOR: blue"&gt;typeof&lt;/SPAN&gt;(&lt;SPAN style="COLOR: teal"&gt;Customer&lt;/SPAN&gt;), &lt;SPAN style="COLOR: maroon"&gt;"c"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;Expression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; body = &lt;SPAN style="COLOR: teal"&gt;Expression&lt;/SPAN&gt;.EQ(&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Expression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;.Property(p, &lt;SPAN style="COLOR: blue"&gt;typeof&lt;/SPAN&gt;(&lt;SPAN style="COLOR: teal"&gt;Customer&lt;/SPAN&gt;).GetProperty(&lt;SPAN style="COLOR: maroon"&gt;"City"&lt;/SPAN&gt;)),&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Expression&lt;/SPAN&gt;.Constant(&lt;SPAN style="COLOR: maroon"&gt;"&lt;st1:City w:st="on"&gt;&lt;st1:place w:st="on"&gt;London&lt;/st1:place&gt;&lt;/st1:City&gt;"&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;LambdaExpression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; predicate = &lt;SPAN style="COLOR: teal"&gt;QueryExpression&lt;/SPAN&gt;.Lambda(body, p);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;Expression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; where = &lt;SPAN style="COLOR: teal"&gt;QueryExpression&lt;/SPAN&gt;.Where(q.Expression, predicate);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;q = q.CreateQuery(where);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;You can then call GetEnumerator() on 'q' to execute the query.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;Too hard you say?&amp;nbsp; Do I have to write &lt;EM&gt;all&lt;/EM&gt; that code?&amp;nbsp; What if I just want my users to type in a little filter expression.&amp;nbsp; Do I have to turn that into all those nodes?&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;Ah, well, we've thought of that too.&amp;nbsp; Try this out.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;IQueryable&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; q = ...;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;ParameterExpression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; p = &lt;SPAN style="COLOR: teal"&gt;Expression&lt;/SPAN&gt;.Parameter(&lt;SPAN style="COLOR: blue"&gt;typeof&lt;/SPAN&gt;(&lt;SPAN style="COLOR: teal"&gt;Customer&lt;/SPAN&gt;), &lt;SPAN style="COLOR: maroon"&gt;"c"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;LambdaExpression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; predicate = &lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;QueryExpression&lt;/SPAN&gt;.Lambda(&lt;SPAN style="COLOR: maroon"&gt;"c.City = '&lt;st1:City w:st="on"&gt;&lt;st1:place w:st="on"&gt;London&lt;/st1:place&gt;&lt;/st1:City&gt;'"&lt;/SPAN&gt;, p);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;Expression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; where = &lt;SPAN style="COLOR: teal"&gt;QueryExpression&lt;/SPAN&gt;.Where(q.Expression, predicate);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;q = q.CreateQuery(where);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Or if you don't want them to have to type silly dot's, just don't give the parameter a name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;IQueryable&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; q = ...;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;ParameterExpression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; p = &lt;SPAN style="COLOR: teal"&gt;Expression&lt;/SPAN&gt;.Parameter(&lt;SPAN style="COLOR: blue"&gt;typeof&lt;/SPAN&gt;(&lt;SPAN style="COLOR: teal"&gt;Customer&lt;/SPAN&gt;), &lt;SPAN style="COLOR: maroon"&gt;""&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;LambdaExpression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; predicate = &lt;BR&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;QueryExpression&lt;/SPAN&gt;.Lambda(&lt;SPAN style="COLOR: maroon"&gt;"City = '&lt;st1:City w:st="on"&gt;&lt;st1:place w:st="on"&gt;London&lt;/st1:place&gt;&lt;/st1:City&gt;'"&lt;/SPAN&gt;, p);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;Expression&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt; where = &lt;SPAN style="COLOR: teal"&gt;QueryExpression&lt;/SPAN&gt;.Where(q.Expression, predicate);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-no-proof: yes"&gt;q = q.CreateQuery(where);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;Viola!&amp;nbsp; Instant&amp;nbsp;filter.&amp;nbsp;Instant dynamic query. Run it here. Run it there. Why, you can run it everywhere.&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;But that's enough from me.&amp;nbsp;Why are you wasting time reading this when you could be downloading the preview and trying it out for yourself?&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P&gt;Matt&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'; mso-bidi-font-family: 'Lucida Console'"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=594966" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattwar/archive/tags/Object+Relational/default.aspx">Object Relational</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Code/default.aspx">Code</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Rave/default.aspx">Rave</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Data/default.aspx">Data</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/PDC/default.aspx">PDC</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>Xen meets its Omega</title><link>http://blogs.msdn.com/mattwar/archive/2004/07/14/183096.aspx</link><pubDate>Wed, 14 Jul 2004 16:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:183096</guid><dc:creator>mattwar</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/mattwar/comments/183096.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattwar/commentrss.aspx?PostID=183096</wfw:commentRss><description>&lt;P&gt;I got a surprise in my inbox this morning.&amp;nbsp;&amp;nbsp; An email from Erik Meijer read:&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;The impossible has happened: X# became Xen, Xen became Comega, and Comega has shipped.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.research.microsoft.com/research/downloads/default.aspx" target=_blank&gt;http://www.research.microsoft.com/research/downloads/default.aspx&lt;/A&gt;. &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Enjoy&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Matt&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=183096" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattwar/archive/tags/XML/default.aspx">XML</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Language/default.aspx">Language</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Code/default.aspx">Code</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Rave/default.aspx">Rave</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Data/default.aspx">Data</category></item><item><title>Feeling the Love</title><link>http://blogs.msdn.com/mattwar/archive/2004/06/11/153839.aspx</link><pubDate>Fri, 11 Jun 2004 20:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:153839</guid><dc:creator>mattwar</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/mattwar/comments/153839.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattwar/commentrss.aspx?PostID=153839</wfw:commentRss><description>&lt;P&gt;I think I've been spoiled these last so many years. It's gotten to the point where I cannot program without it.&amp;nbsp; I've tried to do it, on my own, for different projects, on the weekend, late at night, but I find that its just not the same.&amp;nbsp; I actually need it now.&amp;nbsp; I hunger for it when I don't have it.&amp;nbsp; It's as if my brain turns off and won't let me proceed unless it is there.&amp;nbsp; I just can't live without my Intellisense.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Try, if you dare.&amp;nbsp; Use Notepad or even your favorite code editor.&amp;nbsp; You don't get the pop ups do you?&amp;nbsp; You don't get reminded after each dot what would logically come next.&amp;nbsp; You don't get the instant reminder of the contents of your code base and the volumes of APIs awaiting out there in the void.&amp;nbsp; You don't get the handy squiggles underlining your errors, long before you even bother to compile.&amp;nbsp; You don't get the instant rewrite, correcting your errors as you type.&amp;nbsp; You don't feel the love of an editor that really, truly wants to be your friend.&lt;/P&gt;
&lt;P&gt;I need it so much that I'm willing to do almost anything to keep it.&amp;nbsp; Since I work on the compiler, in the same immense codebase as the rest of the product, I experiences all the growing pains as the editor and its ilk are torn&amp;nbsp;down and refitted.&amp;nbsp; I experience the bugs as they come, working around those I can, being stalled by those that I cannot.&amp;nbsp; I work in the face of a appallingly slow debug build and the pestering assert dialogs that lurk behind the innocent facade.&amp;nbsp; Yet, still I persist.&amp;nbsp; Why?&amp;nbsp; Because its my editor.&amp;nbsp; Its got the intellisense.&amp;nbsp; I need it to even breathe.&lt;/P&gt;
&lt;P&gt;Matt&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=153839" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattwar/archive/tags/Code/default.aspx">Code</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Rave/default.aspx">Rave</category></item><item><title>Silencing the Audio Angst</title><link>http://blogs.msdn.com/mattwar/archive/2004/03/14/89614.aspx</link><pubDate>Mon, 15 Mar 2004 05:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89614</guid><dc:creator>mattwar</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/mattwar/comments/89614.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattwar/commentrss.aspx?PostID=89614</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;After all my whining about my &lt;A href="http://blogs.msdn.com/mattwar/archive/2004/02/15/73449.aspx"&gt;audio problem &lt;/A&gt;and how all new technology solutions are &lt;A href="http://blogs.msdn.com/mattwar/archive/2004/03/01/82248.aspx"&gt;still wrong&lt;/A&gt;, I went ahead and made the decision to just put together the best thing I could with what was available.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;After all, it will be Betsy&amp;#8217;s birthday soon and she did ask me to set this whole thing up two years ago.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I guess I&amp;#8217;m on top of it now, at least for a procrastinating, indecisive techno-goober like myself.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Some things just take their own sweet time to get right, and as Dirk Gently would have stated, &amp;#8220;I was two years late but moving fast.&amp;#8221;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;I decided to buy the shelf-top mini-stereo that I found at &lt;A href="http://blogs.msdn.com/mattwar/archive/2004/03/07/85611.aspx"&gt;Fry&amp;#8217;s last week&lt;/A&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Maybe it was my tech addiction, yearning, calling me back to the dealer.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I don&amp;#8217;t know.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The thing is, that stereo had oodles of line-inputs and outputs; just what I&amp;nbsp;so desperately needed, and what is so hard to find in a shelf-system. It&amp;#8217;s not like there weren&amp;#8217;t many excellent systems to choose from.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It&amp;#8217;s just that I have this vision for what it will eventually become, so I did not want to get trapped with some single purpose device.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I wanted something I could blend into my digital home when all the pieces started falling into place.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I knew that right now it would only just be a simple stereo, not the fulcrum of my digital music utopia.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;But I was determined to buy it anyway, come hell or high-water. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Yet, when I got to the store, and after I stood in awe of its majesty one more time, I discovered that Fry&amp;#8217;s did have a wireless music solution in the aisle with all the routers and access points.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It was the &lt;A href="http://store.geargroove.net/mp101na.html"&gt;Netgear Wireless Digital Music Player&lt;/A&gt;, one of the models I had been previously researching.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It did not seem too costly, actually cheaper than I had priced it for online, and since I was getting the stereo anyway I decided to throw it in my cart and give it a try. I&amp;#8217;m sure the Fry&amp;#8217;s marketing/research group would love to know that a wireless network product was an impulse buy.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;#8220;Look, we'll just line up these boxes by the check-out stand; Nail clippers, Juicy fruit, and Netgear.&amp;#8221;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;The real shocker, however, was that I was still not done.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That should have been the limit of my shopping, the climax of my high-tech sojourn.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Yet, somehow more pieces kept falling into that same cart.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Excluding a few toys and a glowing crystal necklace for Charlie, I was about to find what I needed to put the final touches on my audio phonic masterpiece.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;The wireless speakers, there they were down the aisle with audio cables and what not.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I was looking for a y-adapter, and instead I got ya-ya-googly eyes.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;These were the newer model &lt;A href="http://www.skyvision.com/store/mi8000066.html"&gt;RCA wireless speakers&lt;/A&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The ones I already had were the older model and they sucked.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The reception was bad, lots of low-level static and popping even at close range, and the lack of bass was infuriating.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In fact, the fact that the older speakers were so bad was my primary motivator to find a better solution through digital wireless.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The newer models promised a greater range and auto-channel synching.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That meant no more praying to the tiny god of wheels and widgets to help position the potentiometer in order to tune in the tunes.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I swear, getting that bit right was like trying to tweak the shower knob to find the right balance between scalding hot and icy cold.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Anyway, because the older ones were so bad, I had simply dismissed the newer ones as most certainly junk to the nth degree.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;But now, with the advent of my new impulsiveness, I was all the more&amp;nbsp;daring.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It was a new, kindler, gentler, more positive version of me that was willing to give it a try.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;So I hefted a few of those into my cart as well.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I figured, if they sucked I&amp;#8217;d just bring them back.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If the didn&amp;#8217;t, then I&amp;#8217;d have my ultimate audio.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;To keep a long story short, they did not suck.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;They sound rather good.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;They&amp;#8217;ve got better bass and they don&amp;#8217;t snap, crackle and pop.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The stereo is now set up, the wireless speakers are tuned in and the Netgear music player is sucking down digital tracks off my PC jukebox.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The music is playing throughout the house.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Best of all, Betsy is smiling.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It was worth the wait.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Matt&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=89614" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattwar/archive/tags/Life/default.aspx">Life</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Rave/default.aspx">Rave</category></item><item><title>ObjectSpaces: What's the big idea?</title><link>http://blogs.msdn.com/mattwar/archive/2004/03/05/84859.aspx</link><pubDate>Fri, 05 Mar 2004 21:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:84859</guid><dc:creator>mattwar</dc:creator><slash:comments>12</slash:comments><comments>http://blogs.msdn.com/mattwar/comments/84859.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattwar/commentrss.aspx?PostID=84859</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Should your data become objects or your objects become data?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That&amp;#8217;s the debate.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you build apps focused around objects and just want those suckers persisted then you want your objects to become data.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you&amp;#8217;ve got a database and you are building apps around that data using an object-oriented language you probably want your data to become objects. Which is more prevalent, I don&amp;#8217;t know, probably the latter. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;What I am certain of, however, is that many people out there are struggling with data some way or another.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You've got your ADO.Net, or just plain ADO, or maybe you're an Einstein and do it all against OLEDB or ODBC or some other API du jour, and if you were still writing quick and dirty apps these API's would suffice.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I know. I've done it too.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;I've recently been working in my 'spare' time on a web app that's gotten me sucked back into the old-school ASP programming.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I found myself writing code against &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;&lt;st1:City w:st="on"&gt;ADO&lt;/st1:City&gt;&lt;/st1:place&gt;, connections, commands and recordsets.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I had to pull out my own book on the subject just to remember what to do.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Luckily, I also spent the last nine years working on this technology, so when it came to crafting up some SQL queries it was not too tough, except they weren't really SQL queries, they were Jet SQL queries meant for an Access database.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Sure, I should have been using a version of SQL Server, but it wasn't my app, I was only volunteering my time to put in new features.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;So I struggled to get the queries just right, trying to figure out what to do using the Access product documentation, which is great if you want to learn how to use a menu or item in the user-interface, but when it comes to documenting the query language it is none too helpful.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It was at this time that I wished the application were more of an honest-to-goodness professional style app with a good data access abstraction layer, then maybe I wouldn't find myself scratching my head at 3 am wondering how to translate a subquery.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Sure, you've all been there at some point in the past.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Most you have moved on to better designs and practices. That's why you build abstraction layers.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I know this is true, because as customers you tell us that you do.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I've visited customer sites.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I've seen some of the apps.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;They are marvelous and huge, testimonies to man's ingenuity, and they can't get that way without abstraction. But a data access layer can be difficult to build, difficult to get right.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It can consume a project team. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;That's why we've built ObjectSpaces, so you don't have to. ObjectSpaces is the ideal data abstraction layer.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It lets you define your application in terms of your objects, and it gives a declarative way to describe how your objects correspond to your storage system.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You do this once and you never have to look back.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Okay you might have to look back and tweak it, but you don&amp;#8217;t have to tweak your code, just the mapping.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;ObjectSpaces is the ultimate abstraction layer because it does not lock you into a fixed set of library methods like GetMyObjectX and GetMyObjectY. You can still write queries.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You just don&amp;#8217;t have to query the storage model in the database. Your queries refer to the objects you use in your code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Best of all, there&amp;#8217;s just one query language that you use, regardless of where the objects are stored.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If the objects are in SQL server, then OPath translates to SQL server&amp;#8217;s dialect.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If the objects are in Jet SQL then that&amp;#8217;s what is used to communicate to your data. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;So are your objects data, or are your data objects?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It does not matter really which way you come at the problem. ObjectSpaces works both ways by taking the middle of the road approach.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You don&amp;#8217;t just get a turn-key system that takes your object structures and dumps them into an uncertain stasis, inaccessible to other apps in your business.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That&amp;#8217;s never worked too well and is one of the primary reasons object databases failed.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;And you don&amp;#8217;t just get a system that gives you straight objects in place of database tables.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You get to design your own objects, and you get to customize how they are stored.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It might sound like a little more work up front, but it is well worth it.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;A working abstraction layer with endless tweaking ability, that&amp;#8217;s the big idea.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Matt&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=84859" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattwar/archive/tags/Object+Relational/default.aspx">Object Relational</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Rave/default.aspx">Rave</category></item><item><title>Drugged out and full of bliss</title><link>http://blogs.msdn.com/mattwar/archive/2004/02/27/81428.aspx</link><pubDate>Sat, 28 Feb 2004 07:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:81428</guid><dc:creator>mattwar</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/mattwar/comments/81428.aspx</comments><wfw:commentRss>http://blogs.msdn.com/mattwar/commentrss.aspx?PostID=81428</wfw:commentRss><description>&lt;P&gt;I've got a new drug.&amp;nbsp; I'm not sure how long its going to last.&amp;nbsp; Thanks to all the feedback from my &lt;A href="http://blogs.msdn.com/mattwar/archive/2004/02/15/73449.aspx"&gt;prior post&lt;/A&gt;.&amp;nbsp; I got a lot of ideas from everyone who replied, and I acted on one of them.&amp;nbsp; I purchase the &lt;A href="http://www.harmonyremote.com"&gt;Harmony&lt;/A&gt; SST-659 universal remote.&amp;nbsp; It is programmed via an online wizard from a large database of known devices, so it was relatively easy to set up.&amp;nbsp; The best part is, now my TV monstrosity has been turned into a one click-on device!&amp;nbsp; Betsy thinks its the best improvement to the TV room since the TiVo was hooked up, and I agree.&amp;nbsp; All the other remote are packed away.&amp;nbsp; Now there's finally room on the ottoman for my feet!&lt;/P&gt;
&lt;P&gt;Matt&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=81428" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/mattwar/archive/tags/Life/default.aspx">Life</category><category domain="http://blogs.msdn.com/mattwar/archive/tags/Rave/default.aspx">Rave</category></item></channel></rss>