Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

.NET

An Interview with Amanda Silver on Language Integrated Query (LINQ)


Scott Swigart is a consultant specializing in convergence of current and emerging technologies. Scott can be contacted at [email protected].


Microsoft is currently developing a technology known as Language Integrated Query (LINQ). Simply described, LINQ provides a SQL-like syntax as part of the Visual Basic .NET and C# languages. This query syntax can be used over any combination of objects, XML, and relational data, addressing what is often referred to as the ROX triangle. Dr. Dobb's first talked with people working on LINQ back at the 2005 Professional Developers Conference, and in this interview, Scott Swigart follows up with Amanda Silver, Program Manager for Visual Basic, about the progress that Microsoft is making in this space.

DDJ: Amanda, thanks for taking the time to chat. I think the last time we spoke in-depth about LINQ was back at the PDC. What are some of the big changes since then?

AS: Since the PDC, we've really been listening and trying to respond to customer feedback, and we've made some changes to the language to reflect what we've heard. We changed it so that "From" comes before "Select" when you write LINQ statements, which lets us make the Intellisense experience better. We heard that people like the SQL syntax, but that the highest priority was Intellisense, and that's why we made that change. [Editors note: See Listing One for a simple LINQ query.]

Listing One

Dim q = _
   From c In Customers _
   Where c.City = "London" _
   Select c 


The other thing we've heard is that while parity with SQL is important, the Intellisense experience and discoverability of the syntax should take the highest priority.

DDJ: It seems like there would be tension on that specific issue. If you try to make it very similar to SQL, then you'll get dinged on every spot where there's a difference. This is Language Integrated Query, which I take to mean querying capabilities built into programming languages like Visual Basic and C#. I don't see that you're trying to replicate SQL-92, but that you're using a SQL-like syntax to reduce the learning curve. This also has to work over a lot more than just relational data, so I understand that copying and pasting SQL directly from the database isn't realistic. But, I can understand people who will glance at the syntax and intuitively expect that to work.

AS: Right. The other thing that we've been working on for a while is dramatically improving the editing experience for XML. This latest CTP has outlining capabilities that let you collapse XML nodes [Editors note: The Visual Basic implementation of XLINQ lets you embed literal XML in your code.], we've added support for XML namespaces so that you don't have to have the full namespace everywhere. We've also changed it so that it's easier to access the value of the element.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.