As the man credited with creating .Net, Anders Hejlsberg has been in charge of making it easier for developers to build increasingly complex applications for many years.
With a new technology called .Net Language Integrated Query, or LINQ, introduced by Microsoft at its Professional Developers Conference (PDC) last week, he said the software giant has taken another step forward towards solving a common problem for developers: how to integrate various sources of data into applications built with object-oriented programming models.
“With a lot of programs today, you’re not only saying what you want the program to do, you are saying in painful detail how you want it done,” says Hejlsberg, a Microsoft technical fellow. “The way we get to take advantage of all of the progress in CPUs and memory is offloading some of that ‘how to’ to the infrastructure.”
One way to do this is to simplify how developers bring relational data that is stored in databases more seamlessly into .Net applications, he says. LINQ is Microsoft’s early attempt at bridging the gap between data and object-oriented programming, Hejlsberg says.
The framework, which was available to developers at the PDC as a community technical preview, adds data-query capability to .Net.
This capability applies to all forms of data, so developers can query data from various sources, such as databases or XML documents, right within their Visual Basic and C# code, Hejlsberg says.
Currently, the most common way to bring data from databases into an application developed in .Net is through SQL. However, SQL uses a completely different vocabulary from languages such as C# and VB that .Net developers use to build applications, so it takes a lot of coding to bring the two languages together in one development framework, Hejlsberg says.
“Programmers writing enterprise applications [say] that sometimes, when it comes to data, they feel more like plumbers than programmers” because they have to create ways to link the two languages to access data, he says. “There is no native understanding of the query language in C# or Visual Basic.”
Another problem with SQL is it can only be used to query data in relational databases. If developers want to access data from an XML document or from a source other than a database, where much of enterprise data now lives, they have to do it another way, Hejlsberg says. “There is a lack of coverage when it comes to query,” he says.
Eventually, as LINQ becomes more fully developed, it will support all languages used for writing applications on .Net, Hejlsberg says. “The dream is to create a single programming model for objects, relational data and XML.”
This will improve the productivity of .Net developers because they will no longer have to use two programming models to bring data into enterprise applications, he says. Additionally, it will allow them to leverage what they already know to accomplish a new task, thus evolving the development process without requiring developers to learn a lot of new skills.
“The way we truly move forward in development is to take the stuff you already know and add things that are missing,” Hejlsberg says. “The body of stuff that is captured in the .Net framework or in the .Net languages ... today is vastly huger than the capabilities in query. So, if you’re faced with adding the .Net framework to query, or query to the .Net framework, it’s a lot easier to do the latter. That’s effectively what we’re doing.”
Microsoft is not disclosing how LINQ will become a formal part of its product portfolio. However, Hejlsberg says it’s likely the framework will be integrated in to future versions of Microsoft’s SQL Server database and the Visual Studio tools platform.