Home > Microsoft .Net Development Tips > .NET Developer > Beginning LINQ development, Part 3
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

.NET DEVELOPER

Beginning LINQ development, Part 3


Brian Eastwood, Site Editor
10.17.2007
Rating: --- (out of 5)


.NET Essentials Channel
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Previous iterations of our Beginning LINQ development tips offered links to tutorials, videos and other resources for getting started with the Language Integrated Query in Visual Studio 2008.

Here we actually do our own work and report on what two .NET development experts had to say about LINQ in recent Boston area appearances. Taken together, the two talks suggest that the Language Integrated Query provides a powerful syntax for managed code but that, at the same time, the language enhancements it brings to the .NET Framework 3.5 should not be used without hesitation.
More on LINQ development
Beginning LINQ development, Part 1

Beginning LINQ development, Part 2

"LINQ will change how you write managed code"

For Richard Hale Shaw, president of the Richard Hale Shaw Group, LINQ represents the latest progression in the .NET Framework's mission to bring together the client, business logic and data tiers. This, though, is no mere step -- it's a leap.

"You can apply the mechanisms of LINQ to almost any aspect of day-to-day programming using managed code," Shaw said in a session on data-driven Web application development at ReMIX07 Boston. "I think it'll change the code you write to almost a revolutionary perspective."

LINQ's strength comes from a number of complementary features. Its queries work with all managed code languages in the .NET Framework. These queries are structured like TSQL, but, since the From statement comes first, the query sets off IntelliSense. Moreover, by leveraging IEnumerable, LINQ works with any data with origins in the iterator.

Overall, Shaw said, LINQ statements are "lightweight and simpler to use than typed datasets, and they are better suited for data updates." The overhead, he added, is no moreso than if a programmer wrote his own For or ForEach loops at runtime.

"All these things I urge you to use with caution"

Shawn Wildermuth, president of Wildermuth Consulting Services, LLC, agrees that LINQ offers an healthy alternative to ForEach statements and that its support for numerous data types, from the well-advertised SQL and XML to Flickr and Amazon, provides a level of homogeneity previously unseen.

However, Wildermuth told the New England Visual Basic Professionals User Group, LINQ is just another tool in the toolbox. "This isn't going to change the way people develop. It's not going to force people to rearchitect solutions," he said. "A lot of this is performance characteristics versus labor and ease of use."

Expanding on the latter point, Wildermuth noted that, while LINQ works well for RAD projects and does make code cleaner, it may not be ideal for large deployments. "With LINQ, a lot of code runs at compile time," he said. "Just because it's LINQ doesn't mean it's going to go faster."

Wildermuth also preached caution regarding use of some of the language features Microsoft introduced to Visual Basic 2008 and C# 3.0 in order to accommodate LINQ.
More on extension methods in the .NET Framework 3.5
Extension methods in VB 2008

Extension methods in C# 3.0

Variable inferences, for example, let programmers define a type without known the type, while extension methods let programmers define classes on methods they do not own, which could be very confusing, particularly during debugging, he said.

Two other .NET Framework 3.5 features -- anonymous types, which are ad hoc definitions of types and properties, and lambda functions, which are shortcuts for anonymous delegates -- are more useful, but it will take developers some time to get used to them, Wildermuth said.

Back to basics

We end with the latest article to provide a concise introduction to LINQ. It's called Learn the Basics of LINQ, and is provides some thoughts on using extension methods and lambda expressions for those who opt to take the plunge.

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Visual Studio 2008 and Language Integrated Query (LINQ)
LINQ in Visual Studio 2008 addresses object data modeling
LINQ Learning Guide: Third-party LINQ Implementations
LINQ Learning Guide: LINQ to Entities
LINQ Learning Guide: LINQ to SQL
LINQ Learning Guide: LINQ to DataSet
LINQ Learning Guide: LINQ to Objects
LINQ Learning Guide: LINQ Providers
LINQ Learning Guide
LINQ Learning Guide: LINQ and Visual Studio 2008's new language features
LINQ Learning Guide: LINQ and Web applications

.NET Developer
How to speed up Visual Studio 2008's slow WPF designer
How to list fonts in WPF using markup extensions and data templates
How to convince management to buy Microsoft Visual Studio 2008
Microsoft webcast series previews new Visual Studio 2010 features
New features in Windows 7 bring new UI considerations for developers
User Account Control (UAC): How to develop code for standard users
Introduction to Vista's user account control (UAC) for developers
Visual Studio 2008 code metrics tools will help keep code clean
Downloadable MSDN library released for VS 2008 SP 1
Widgetbox provides good example of how to use Facebook Developer Toolkit

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
LINQ  (SearchWinDevelopment.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts