Language Integrated Query (LINQ) is quite possibly the greatest technological language advancement since the advent of object-oriented (OO) programming languages. In this post I am going to provide some background and context for what will be a series of posts on many of the underlying features of Language Integrated Query in the .NET framework. By the end of the series you should be aware of, and have a better understanding of, all the different bits and pieces that come together to bring LINQ to the .NET framework.

What is Language Integrated Query (LINQ)?

The evolution of software languages from low level languages like assembly and C up to higher level, more friendly languages like Visual Basic and Java, has shown that the OO paradigm has become a time proven, mature and now taken for granted language paradigm.

Object oriented programming, once considered radical and different with its shift in thinking from functional oriented programming to state and behaviour, is a shift in the way we think about building software; abstracting and encapsulating details into more modular, re-useable bits of code.

Along comes LINQ. In terms of evolutionary programming language advancements, LINQ promises to ease and enhance the way we now, and in the future, produce, consume and integrate with heterogeneous data sources. It achieves this by providing a general purpose declarative querying language (similar to SQL) that can be used on any data source that is made LINQ aware.

Shipping with Visual Studio 2008 Microsoft have provided support for LINQ to SQL, LINQ to XML and LINQ to Entity Classes out of the box. Microsoft are also working on another project (still in its incubation stage at the moment) known as LINQ to XSD; the ability to bind an XSD to an XML file such that entity classes can be generated from typing information found in the XSD file with the intent of providing the developer with a strongly typed XML experience.

So if there is one thing to remember about LINQ it is that LINQ is a general purpose querying language that can work across any information source when it knows what it is and how it can query it (This might be a future post on LINQ providers). No longer do you need specific parsing to read or write that CSV file, XML file, Excel file etc. The productivity increases and potential for LINQ usage is ever increasing as more and more people begin writing LINQ providers to LINQ-enable their data sources.

LINQ Required Features

In future posts I will explore many of the features brought to the .NET framework that have made LINQ possible;

  • Implicitly typed local variables (read: anonymous variables)
  • Lambda expressions and expression trees
  • Extension methods
  • Collection and Object Initializers
  • IEnumerable usage
  • Deferred query evaluation

.NET Language Integrated Query might just change the way you inter-operate with and between heterogeneous data sources by providing a higher level, abstracted querying language that is data source independent. Much like the OO paradigm raised our thinking from functions to objects and state, LINQ will elevate and facilitate fast and efficient interoperability between heterogeneous data sources.

Have you had any experiences with LINQ? What were they and where do you think Microsoft is heading with this brave new technology.

Technorati Tags: ,