Five Things the Boss Should Know About Microsoft's LINQ

Do you think that LINQ is just another in a long series of odd Microsoft technologies? This database-meets-software-development technology could easily save your development staff time and avoid complexity!

By John Paul Mueller
Mon, June 16, 2008

CIO — You may not have heard about Microsoft's new brainchild, Language Integrated Query (LINQ). If you did hear about it, you may have yawned and put it down as yet another new technology searching for a requirement.

However, LINQ is different from most new technologies because it really can do everything it says it can. After working with LINQ for nearly a year, I've found that LINQ hasn't disappointed me, as have so many other technologies I've tried. LINQ is incredibly easy to use and quite reliable. The fact that I'm not alone in that sentiment is attested to by the large number of third-party add-ons created by other developers who feel the way I do about LINQ.

If you haven't encountered LINQ before, here's the straight-up definition. LINQ is a kind of query language, sort of the same as SQL, but the syntax is a little different. The basic idea is that you ask a question (or rather, your application does) and LINQ provides the answer from the data source you specify. That data source may not be a straight-up database. For example, if you ask LINQ which employees are in the accounting department and you supply Active Directory as the data source, the LINQ gets the answer for you from Active Directory.

Plenty has been written to explain LINQ to software developers. Here, I explain the important points for IT managers to understand.

1. Developers Can Access New Technologies Without Knowing Much About Them

A primary LINQ benefit is in reusability. A complex query you create to access objects also works with Active Directory, Microsoft SQL Server, MySQL, or a Web service; developers don't have to keep learning new techniques to use LINQ.

The basic LINQ setup comes with access for all of the data sources you might expect: data objects, SQL Server databases, XML and DataSets. However, if you stop there, you're missing LINQ's big picture. You can access a wealth of other data sources by obtaining a third-party provider—that is, LINQ add-ons, written by someone who isn't affiliated with Microsoft (and there are a ton of them). You can find common data sources, such as Active Directory, and uncommon data sources, such as Resource Description Framework (RDF).

To access data sources other than those the programming environment natively supports with most technologies, you have to jump through hoops or work through odd programming scenarios. If you make a change, a whole bunch of code usually has to change. With LINQ, you use the same query all the time. That simplifies the development process considerably, particularly for a programmer who's new to a project and hasn't made friends with the team's DBAs yet. Need a slightly techie example? Let's say, for the sake of simplicity, that you start with a C# string array like this:

String[] QueryString =
    { "One", "Two", "Three", "Four", "Five" };

To find all the strings that are more than three characters in length, you use a query like this:

var ThisQuery =
    from StringValue
    in QueryString
    where StringValue.Length > 3
    select StringValue;

In this case, ThisQuery is the output from the query process. You don't define an actual type because LINQ takes care of that for you; instead, you use var as the data type. The code uses StringValue to hold the individual data values from QueryString that match the where condition StringValue.Length > 3. The select portion of the query merely tells what to choose from the data source. Now, here's the really neat part. You can use that same query to retrieve data from an RDF or from Active Directory. If you have a provider for the data source, you can get to the data, using the same code. How cool is that?

Don't think that LINQ is limited to safe open-source projects or to Microsoft-specific data sources, either. LINQ works just fine with MySQL, as well as with a whole world of additional LINQ data sources.

You might assume that LINQ queries can't handle complex situations. The example in this section gives you a good idea where someone discovering LINQ will begin. However, LINQ queries, just like SQL queries, can become somewhat complex as you add data sources and output requirements. The learning curve to those complex queries is a gentle one, but even so, LINQ can become complex (like any other technology) as you ask it to do more work.

Continue Reading

With 1.5 billion instructions in one second (BIPS), while consuming less energy than ever before, Wintergreen Research says IT departments need to sit up and take notice of this hybrid system that combines the System z with servers.
Learn how your answer to this question compares to your peers by taking this quick poll. See how your peers are dealing with the challenge of ensuring a highly capable server infrastructure as technological shifts impact the application server platform.
With increasing data growth, comes increased need for data security.  The existing DLP model, with a focus on compliance/enforcement is not sufficient as the data discovery and classification capabilities are not granular enough.  Read this paper to find how you can efficiently and accurately manage your risk by rapidly inventorying and classifying your data and then developing remediation workflows that support business needs. 
This paper breaks down attack sources into four categories: external, malicious insiders, accidental insiders, and unknown.
The rapid growth of data and technology is creating challenges for organizations as this digital data is considered to be business communications and must be preserved according the same industry-specific regulations governing the retention and discovery of emails and more traditional forms of electronic communications. This paper examines the role that Data Loss Prevention ("DLP") technology can play in helping organizations address the challenges of locating information in response to electronic discovery.
This research, conducted by the Ponemon Institute, focuses on issues relating to the use of data protection solutions such as endpoint encryption and data loss prevention within the workplace.
As greater numbers of datacenter servers transition from the physical to the virtual world, the components of virtualization success come to the fore. What scores of organizations have discovered is that success is derived from an optimal pairing of the right software platform with the right hardware platform.
Have you been looking to hear about customer's experiences with the new VMware vCenter Site Recovery Manager product? View this webcast to learn about VMware customer, Navicure, and their experiences testing and evaluating the recovery manager, their progress in implementing it in their environment and their advice other customers considering using vCenter.
Many enterprises have discovered that the use of virtualization to support desktop workloads creates a range of significant benefits. These benefits include price efficiencies, improved IT management and greater agility and choice for end users.

This VMware sponsored webcast with IDC will provide both quantitative measurement of the business value -- defined as the expected ROI -- and qualitative analysis associated with the use of VMware View™. IDC will also provide an analysis of the View Composer and ThinApp™ features of VMware View, including the business value of these solutions and an overview of how they work.

Attend this webcast to learn about:
- Challenges and barriers that might impede the adoption of desktop virtualization
- Navigating roadblocks to facilitate a strategic implementation
- Optimizing qualitative and quantitative benefits to IT and your business
VMware recently announced VMware vFabric™ Data Director, a new database deployment and operations platform that enables enterprise IT organizations to offer database as a private cloud service. Built on top of VMware vSphere 5, vFabric Data Director enables IT organizations to ontrol database sprawl through automation and consistent policy enforcement and accelerate application development cycles with self-service database management. Attend this webcast to learn how vFabric Data Director can help you build database-as-a-service in your datacenter.
A simple, cost-effective disaster-recovery solution for virtual environments is high on the agenda for IT organizations as they virtualize more business-critical applications with VMware. VMware vCenter™ Site Recovery Manager-the market-leading disaster-recovery product-ensures the simplest and most reliable disaster protection for all virtualized applications. VMware vCenter Site Recovery Manager provides centralized management of recovery plans, enables nondisruptive testing and automates site-failover processes.
Traditional disaster recovery solutions are often too expensive, complex and unreliable to meet business requirements. As a result, IT departments are hesitant to expand disaster protection beyond their most critical applications, largely because they are uncertain whether the quality of the protection is really worth its cost. VMware vCenter™ Site Recovery Manager 5 is the market-leading disaster recovery product that addresses this situation for organizations of all kinds. It complements VMware vSphere to ensure the simplest and most reliable disaster protection for all virtualized applications.
Newsletter Sign-Up »

Receive the latest news test, reviews and trends on your favorite technology topics

Choose a newsletter
  1. View all Newsletters | Privacy Policy
Resource Center