Thursday 2 April 2009

Language Integrated Query (LINQ)

LINQ represents a paradigm shift in the evolution of software development technologies. It was introduced into .Net Framework 3.5. It would be wrong to think of LINQ as only a tool for accessing and manipulating relational data, as it can also be used with non-relational data such as XML and objects amongst others.

Up until now, a software developer wishing to access and manipulate XML data, relational data or a collection of objects would need to understand a different methodology for each: recursing over an XML document tree, SQL syntax or a foreach loop respectively.

Rather than add XML or relational specific features to the language and runtime, LINQ takes a more general approach by adding general purpose query facilities to the .Net Framework that apply to all sources of information. It is these facilities that are collectively referred to as LINQ.

The term language-integrated query refers to the fact the the query is integrated into the developer's primary programming language e.g. C# and Visual Basic.Net. Because of this, LINQ therefore gains all the benefits of other native language features such as static type checking, Intellisense and compile time syntax checking.

LINQ defines a set of general purpose query operators that allow the traversal, filter and projection operators to be expressed in a declarative way in any .Net compatible language.

Over the years, Microsoft has devised many technologies for accessing and manipulating data, but they have never managed to bring these together so that they can be used to access them all in a standard and consistent way. Until now.

In my opinion, LINQ is the most important technology that Microsoft have released since COM in terms of enabling inter-operability.

No comments:

Post a Comment