Patrick Smacchia [MVP C#]

Sponsors

The Lounge

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Book Review: LINQ in Action

 

"LINQ in Action" (by Fabrice Marguerie, Steve Eichert, Jim Wooley, and Matt Warren (Foreword)) from Manning publishing.

 

 

 

Disclamer: I am a friend of Fabrice Marguerie, one of the co-author, and I helped proof-read some chapters dedicated on C#/VB.NET LINQ.

 

So my opinion might be biased. But also it means that I have a bit an insider eyes. And I can tell that the amount of work was huge to make sure to provide and in-depth coverage of the technology. The authors spend a lot of time on LINQ betas and CTP versions to make sure to understand and explain properly every tricky aspects (although the book is fully compliant to LINQ final version). As a result if you are already acquainted with LINQ and C# functional advanced stuff (lambda/closure/anonymous methods/iterators…), you will be delighted to see coverage of in-depth topics such as how and when to implement IQueryable<T>, performance benchmarks or LINQ usage design guidelines.

 

What if you are beginners or just want to learn LINQ from scratch? I think that the authors made a great job at writing a book that can be read from cover to cover. The book begins with some reminders on LINQ history to understand where LINQ is coming from and why it is making life as a .NET developers more easier. Then come the language explanations, the part where you will see how C# and VB.NET have been tweaked to support LINQ syntax (btw, the book covers both C# and VB.NET LINQ and it is great to compare the different choices made). This part is really essential if you are considering using LINQ. Indeed, LINQ is coming from functional languages, something that most of us are not acquainted with, and it is disturbing at the beginning to understand things such as deferred execution. I found that a lot of energy has been put in pedagogy for readers that come with a classical OOP background.

 

Then comes the Part 2 on LINQ to object. This part is also vital because you will quickly realize that LINQ  is about to definitely change the way your C# or VB.NET code looks like. Most of the algorithms we code rely intensively on collections and LINQ to object represents an incredibly powerful syntax to work with collections. Here also the authors worked really hard to explain properly the why/when/how to things and to anticipate just in time the questions you might have.

 

Then comes part 3 and 4, on the 2 major LINQ flavors: LINQ to SQL and LINQ to XML. They represent a great opportunity to see some real-world use of what you’ve learnt in the 2 first parts. What I really liked here is that the authors anticipate the various scenarios (both common and advanced) you will face by using these 2 implementations of LINQ.

 

Then comes the great final, the part 5 that focus on how to extend LINQ to your own needs. LINQ is coming with several different extension points, from the single operator rewriting that will take you 2 minutes to write to the complete query framework that will take months to be written. This part explains and compares all these possibilities and can, alone, motivate you to buy the book if you plan to extend LINQ. LINQ extensibility is followed by another great chapter named LINQ in every layer that put up together all knowledge presented until there to see how real-world applications are impacted by LINQ.

 

Something I would like to underline is that authors kept an objective eyes on LINQ. They warn you about the temptation to use LINQ for everything. What is awesome is that in a wide range of cases LINQ represents both a new powerful syntax and also offers optimal performance. But for some other cases LINQ will execute much more slowly than a good old foreach style programming.

 

I highly recommend learning and using LINQ now because a lot of things is going to happen soon with LINQ, with things such as Parallel LINQ (PLINQ, to write queries that will execute on several threads at a time) , LINQ to Xsd (to write strongly typed XML queries), the ADO.NET Entities Framework (the Microsoft answer to O/R mapping) and more.

 

Finally let’s mention that the book has a dedicated website http://www.LinqInAction.net  where you can speak with authors and where you can keep an eyes about new things happening around LINQ, such as this cool visual LINQ execution facility coded by Jon Skeet.

 


Posted Sat, Mar 1 2008 7:07 PM by Patrick Smacchia

[Advertisement]

Comments

Hardware IT Blog » Blog Archive » Book Review: LINQ in Action wrote Hardware IT Blog &raquo; Blog Archive &raquo; Book Review: LINQ in Action
on Sat, Mar 1 2008 2:43 PM

Pingback from  Hardware IT Blog  &raquo; Blog Archive   &raquo; Book Review: LINQ in Action

Book Reviews wrote Book Reviews
on Sat, Mar 1 2008 3:17 PM

Pingback from  Book Reviews

DotNetKicks.com wrote LINQ in Action book review
on Sat, Mar 1 2008 7:04 PM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Daily Bits - March 2, 2008 | Alvin Ashcraft's Daily Geek Bits wrote Daily Bits - March 2, 2008 | Alvin Ashcraft's Daily Geek Bits
on Sun, Mar 2 2008 10:24 AM

Pingback from  Daily Bits - March 2, 2008 | Alvin Ashcraft's Daily Geek Bits

nks wrote re: Book Review: LINQ in Action
on Sun, Mar 16 2008 1:21 AM

Hi.. Please comment on my BOOK COVER DESIGNS. Visit my blog www.bookcoverdesigns.blogspot.com

Review it and tell me if you like it.. submit your designs also….

LINQ in Action - LINQ Book & News wrote LINQ in Action reviews and quotes
on Sun, Mar 23 2008 7:07 PM

Since our LINQ in Action book was published last month, we are lucky to receive a lot of nice feedback

LINQ in Action - LINQ Book & News wrote LINQ in Action reviews and quotes
on Sun, Mar 23 2008 8:12 PM

Since our LINQ in Action book was published last month, we are lucky to receive a lot of nice feedback

http://rails.codebetter.com/blogs/patricksmacchia/archive/2008/03/01/book-review-linq-in-action.aspx wrote http://rails.codebetter.com/blogs/patricksmacchia/archive/2008/03/01/book-review-linq-in-action.aspx
on Mon, Apr 7 2008 10:54 AM
Patrick Smacchia [MVP C#] wrote Book Review: C# in Depth
on Sun, May 25 2008 2:09 PM

I just finished my copy of C# in depth by Jon Skeet (published by Manning) and I highly recommend this

Book Review: C# in Depth | Developer Home wrote Book Review: C# in Depth | Developer Home
on Thu, May 29 2008 6:01 PM

Pingback from  Book Review: C# in Depth | Developer Home

Patrick Smacchia [MVP C#] wrote My 100th blog post: Top 5 development practices you should care for
on Wed, Mar 25 2009 3:49 AM

This is a modest number but I am happy to have reached it, especially taking account that I spend weekly

Community Blogs wrote My 100th blog post: Top 5 development practices you should care for
on Wed, Mar 25 2009 4:00 AM

This is a modest number but I am happy to have reached it, especially taking account that I spend weekly

Add a Comment

(required)  
(optional)
(required)  
Remember Me?