LINQ to Objects Using C# 4.0

Author: Troy Magennis
Publisher: Addison-Wesley, 2010
Pages: 336
ISBN: 978-0321637000
Aimed at:
Rating: 4.5
Pros: Focused on a narrow topic
Cons: Layout that makes it difficult to read
Reviewed by: Ian Elliot

LINQ to Objects is the place that the whole technology starts and it's the place that LINQ is most likely to find a place in your program.


Author: Troy Magennis
Publisher: Addison-Wesley, 2010
Pages: 336
ISBN: 978-0321637000
Aimed at:
Rating: 4.5
Pros: Focused on a narrow topic
Cons: Layout that makes it difficult to read
Reviewed by: Ian Elliot

Banner

This is a book on a very focused topic - LINQ to Objects. Notice that this doesn't cover LINQ to SQL or Entities or any other LINQ technologies. I'm very much in favour of focused books because there is a tendency to create huge volumes that cost a lot, are heavy and next to impossible to read. You can see the logic of the fat book - cover everything and you get a bigger audience. However if that audience is mostly dissatisfied with their purchase it might just backfire.

In this case we have a very reasonable 336 pages devoted to LINQ to Objects. Why pick this particular application of LINQ? It can be argued that LINQ to Objects is the place that the whole technology starts and it's the place that LINQ is most likely to find a place in your program. Not everyone works with SQL or any sort of database but we all tend to use classes that implement IEnumerable and this is what LINQ to Objects deals with. It provides a way of querying and manipulating in memory collections. There are some programmers who claim that it provides a better way to implement iteration. Instead of writing for loops that not only defined what to do but how to do it you should write a query which simply says what is to be done. Not everyone agrees with this idea but you should at least be aware of it.

The book starts off with an overview of LINQ and I have to say that it is at this point the messy layout starts to make the book seem more confusing and complex than it actually is. Then we have an introduction to LINQ which also covers the facilities introduced into C# to make LINQ possible - extension methods, object initializers, implicit and anonymous types and lambda and query expressions. From here we move into the details of writing query expressions and if you already know SQL this is where the book will seem to be laboring the point. Query expressions are modeled on SQL and so if you know one you almost know the other - this was of course the intention if the LINQ designers.

Chapter 4 moves us into territory that should be just as familiar but even experienced SQL and LINQ programmers find the idea of the join and the practice of grouping difficult. The chapter covers the basics and the more advanced ideas such as the one-many join. The next chapter returns to consider the query in the wider context and introduces the query operators that haven't been encountered earlier in the book. Chapter 6 deals with set operations in detail.

The final few chapters are on more advanced and specialized topics such as extending LINQ by writing your own query operators, C# 4.0 features and Parallel LINQ - PLINQ. The extension of LINQ to parallel implementation is an example of the principle that LINQ expressions state what is to be done and not how it is to be done - this is why the query approach to data manipulation is so powerful and idea.

Overal this is a very good book spoiled only a little by a messy layout.

Banner


C# 6.0 Cookbook 4th Ed

Author: Jay Hilyard, Stephen Teilhet
Publisher: O'Reilly
Pages:704 
ISBN: 978-1491921463
Print:1491921463
Kindle:B0043D2E3G
Audience: Intermediate C# programmers
Rating: 3
Reviewer: Mike James 

Cookbooks always have something to interest any reader, but does this one have enough  [ ... ]



Developing Quality Technical Information

Authors: Michelle Carey et al
Publisher: IBM Press
Pages: 624
ISBN: 978-0133118971
Print: 0133118975
Kindle: B00L7ZKJ26
Audience: Those who produce technical documentation
Rating: 3.5
Reviewer: Kay Ewbank

This book gives clear and well written advice on how to write technical documentation, though yo [ ... ]


More Reviews

Last Updated ( Saturday, 05 June 2010 )