LINQ Quickly with Language Integrated Queries

Language Integrated Query (LINQ) is one of the latest additions from Microsoft to the .NET Framework. LINQ was released as part of the .NET Framework 3.5, bringing native data querying capabilities to dot net languages, such as C# and Visual Basic. Today we are going to review the book, titled LINQ Quickly by N. Satheesh Kumar. It's a practical introduction into LINQ that uses the programming language C# on Visual Studio 2008 IDE.

Contributed by
Rating: 5 stars5 stars5 stars5 stars5 stars / 6
April 22, 2008
Rate this Article:
MEH MEH++


SEARCH ASP FREE
TOOLS YOU CAN USE

advertisement
The book’s author, N. Satheesh Kumar, holds a bachelor’s degree in computer science engineering and has around eleven years of experience in software development lifecycle, project, and program management. His professional background includes working for top multinational companies all over the world. He works with the latest Microsoft technologies and has published many articles on LINQ and other .NET related technologies.

“This book introduces the reader to the basic concepts of LINQ, and takes them through using LINQ with an example-driven approach. ” ~ N. Satheesh Kumar

Check out the attached cover shots of the book. The first one is the top-notch, designer’s quality pic, while the second is one I took with my pocket digital camera. The cover looks nice. You can read its subtitle right below the title: “A practical guide to programming Language Integrated Query with C#.”

The list price of the book is US$34.99, UK£21.99, EU€32.99. That’s also the price specified on its back cover. Nevertheless, don’t hesitate to look around and try to find this book at your favorite bookstore; chances are you may find it available with lower price tags via resellers. For example, you can purchase it from Packt Publishing or Amazon and save 10% ($31.49).

Before we proceed with the review, I’d like to advocate breezing through the sample chapter of the book. You can read Chapter 6—LINQ to XSD— from Packt Publishing here. At least do that before coming to a decision on whether or not you want this book.

Throughout this review, I’ll do my best to point out the main qualities of the book. It assumes you have sound knowledge of XML, ADO, .NET data access, and of course C#. It offers an introduction to LINQ, so knowledge of LINQ wasn’t presumed. I have approached this book with a high sense of expectancy.

By the end of this review, you’ll get my subjective opinion of the book accompanied by a rating. Ultimately, I will say whether or not I recommend this book to others.

General Overview

The book has a total of 252 pages, of which around 20 pages are its table of contents and index. Compared to some of its “competitors," it is relatively short. But this definitely does not mean it delivers less. We have all heard the cliché saying that more isn’t always better. Jokes aside, let’s see the table of contents.

Table of Contents:

  • Preface
  • Chapter 1: Overview
  • Chapter 2: LINQ to Objects
  • Chapter 3: LINQ to XML
  • Chapter 4: LINQ to SQL
  •  Chapter 5: LINQ over DataSet
  • Chapter 6: LINQ to XSD
  • Chapter 7: Standard Query Operators
  • Appendix A: Building an ASP.NET Application
  • Appendix B: LINQ with Outlook
  • Index

(Back Cover of the Book—LINQ Quickly)

The preface explains what the reader should expect from the book and introduces the concept of LINQ for the first time. Some conventions are also laid out (such as the style of code snippets). Later on, in the first chapter, we can read a general overview of LINQ and how it’s going to make our programming life easier. This chapter teaches us about the latest .NET 3.5 features along with C# 3.0 functions.

During the next five chapters (2-6) we learn about LINQ implementations: LINQ to Objects, to XML, to SQL, over DataSet, and to XSD. This means that the author shows us how to work with each technology appropriately. We learn what LINQ does, how to do this and that, and what the correct syntax is to accomplish what we want using those five technologies (Objects, XML, SQL, DataSets, XSD).

I was pleasantly surprised by the seventh chapter. It is packed with tons of helpful information regarding standard query operators. Each method is described in detail, just as you would expect from comprehensive documentation. It sort of follows the following scheme: explain what it does, give a code sample, and show the results.

I must admit that this is the chapter I consider the most valuable. I'm not saying that the others are sub-par and/or unnecessary. None of them should be ignored because they are building the required foundation chapter by chapter. The seventh chapter can be used as a reference and I know that I’m going to take it off the shelf as a refresher. It is literally filled with content; it’s the pure gold of LINQ querying.

We cannot disregard the adjective practical from the subtitle. Apparently, the author puts a strong emphasis on practicality. The first appendix (Appendix A) leads the reader through the creation of an ASP.NET web application that makes use of LINQ features to populate a grid based on a drop-down box selection. The step-by-step approach is thoroughly accompanied with comments and explanations.

In the second appendix (Appendix B), the development of another web application is detailed. It’s based on LINQ and it accesses an Outlook object, grabbing the details of its contacts. Each section of the book contains lots of code samples where various functions are exemplified, but these two appendices are particularly worthwhile—they are building on the acquired LINQ foundation.

That covers the general overview of the book’s content. In the upcoming section, we’re going to continue our analysis by pointing out other characteristics and qualities of the book. And we are slowly approaching the stage where we must draw conclusions and rate this title. Read on.

Continued Analysis

Right now we need to focus on the specific attributes of the book, such as style, formatting, language and tone of the author, and whether it was a “quick” and “good” read or not.

First, the code samples are, simply put, fun to read. They usually try to inject some humor as frequently as possible to brighten the overall atmosphere and mood of the reader. Tech books are generally plain and there’s little to nothing that we can do about it. The author’s approach to this is unique because each code sample usually centers around food. Yes, food. Deserts!

Check out the attached code snippet below. It’s from chapter 1, bottom of page 11.

var IcecreamsWithLessPrice =

from ice in icecreamsList

where ice.Price < 10

select new

{

Name = ice.Name,

Price = ice.Price

};

Also, glance over to the following XML-embedded message box. That’s the style…

(Chapter 3, top of page 75)

Please don’t become confused—the book is not multicolor. The reason the above image is colored (blue title bar) is because it’s just a screen shot from an ordinary message box used to exemplify the “language-style” that dominates the samples.

Apparently, the book was printed using some Garamond look-alike font. It is pretty readable and the appropriate line spaces are respected, so you won’t get lost between the lines. Code samples (as well as new terms, methods, functions, syntax, etc.) are formatted in Courier New. I might be wrong in regards to my font picks, though.

Check out the attached photo below—it’s from chapter 3, middle of page 71.

We can also find a few diagrams every now and then. These are helpful and right on the topic of explaining core parts of LINQ, for example. Check out the attached image below, which is a diagram that can be found in chapter 1, on the top of page 6.

Furthermore, I also want to point out that the back cover of the book says that LINQ is part of the dot net Framework 3.0, which isn’t true. LINQ was released with the .NET Framework 3.5 and that’s what the author also clearly points out in the book on chapter 3, page 34. Chances are that this mistake occurred because the book was released prior to the official release (RTM) of Framework 3.5 and it sounded “all right” to mention the latest release (3.0) back then…

Surely, we can still take advantage of the .NET Framework 3.0, but LINQ isn’t part of it. On the back cover, the following is stated: “This book gets you started with LINQ and shows how it will make your programming life easier by making use of the new features from .NET Framework 3.0 .” Well, yes, 3.0 too, but LINQ comes with 3.5 and the book is about LINQ. This is just a minor glitch and it isn’t that much of a letdown.

I think the most in-depth chapters of the book are the third and seventh. In the LINQ to XML chapter, there is a much more dedicated perspective and much more focus than in others, but this is pretty much required because it describes the way we can work with XML using LINQ amazingly well. And, as I already mentioned, the seventh chapter is where the most content is concentrated—it is pure reference and help.

Final Conclusions

Overall, as I’m sure you have noticed by now, I was positively impressed by this book. It promised a quick introduction into the world of LINQ where no previous LINQ expertise is required, just a sound knowledge of XML, ADO, .NET, and C#. And that’s what it delivered.

Surely, the author has done his best to light up the mood with funny example codes, such as Icecream objects, Chocolate strings, Deserts database, and even fetching records from SQL tables that contain the ingredients: cholesterol, proteins, and carbohydrates. Closed-minded “nerds” might frown on this, but trust me, this should be appreciated.

Software development books, by their very nature, are almost always way too technical. This book is no exception, since its theme is related to programming (learning to code LINQ in C#). Due to this, sometimes it is hard to follow the author’s train of thought, because it might require finishing the next two paragraphs and then realizing you need to re-read the first one again in order to grasp their combined meaning.

In short, I recommend the book for those that need a quick introduction to LINQ, are planning to learn its syntax, want a comprehensive reference guide, and perhaps want to expand their horizons (LINQ with C# 3.0). I can promise you are going to learn from it.

On the other hand, if you are looking for a book that focuses predominantly on the in-depth application of LINQ in the real world, giving dozens of practical solutions and ready-to-run codes, then sorry, this isn’t for you. The truth is, despite its subtitle, the book isn’t that much of a “practical guide.” Rather, methinks it's a solid “reference book.”

Summing up, I think that the book definitely deserves 9 out of 10 on a scale from 1 to 10. Apart from the lack of practicality and that minor glitch I mentioned—LINQ was released as part of the .NET Framework version 3.5 and not 3.0—it is a pretty good book jam-packed with useful content and code samples on almost every page. Most importantly, its quality is high and the content is accurate.

Lastly, before we finish, please bear with me as I’d like to thank everyone over at PACKT Publishing for giving me the opportunity to review this book. I’ve had the good fortune to be in touch with Duane Moraes from their team and he has shown a great deal of professionalism and business expertise.

Next, obviously, I offer congratulations to the author, N. Satheesh Kumar, because he has written a book from which I have learned a torrent of new knowledge. In today’s fast-paced world we must always be willing to learn and educate ourselves if we want to remain up-to-date.

The book has earned a solid position on my bookshelf and not because I’m putting it away. On the contrary, it’s an amazing resource vault. I’ll leaf through it whenever a situation requires some sort of review or clarification.

blog comments powered by Disqus
.NET ARTICLES

- .Net 4.5 Brings Changes
- Understanding Events in VB.NET
- Objects, Properties, Events and Methods in V...
- Install Visual Web Developer Express 2010
- Microsoft Gadgeteer an Open Source Alternati...
- Best DotNetNuke Modules
- Facebook Image Viewer in Visual Basic
- Murach`s ADO.NET 4 Database Programming with...
- 5 Must Have Visual Studio 2010 Extensions
- Dynamic Web Applications with ASP.NET Mono u...
- PDFSharp: HTML to PDF in ASP.NET 3.5 using V...
- Using the PDFSharp Library in ASP.NET 3.5 wi...
- Sending Email in ASP.NET 3.5 using VB.NET wi...
- ASP.NET 3.5 Role Based Security and User Aut...
- Creating ASP.NET Login Web Pages and Basic C...

ASP Web Hosting ASP.Net Web Hosting Windows Web Hosting
ASP Free Forums 
 RSS  Tutorials RSS
 RSS  Forums RSS
 RSS  All Feeds
Site Map 
Request Media Kit
Write For Us Get Paid 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Privacy Policy 
Support 


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 2 - Follow our Sitemap
Most Popular Topics
All ASP.Net Tutorials