Pages

Thursday, November 6, 2008

Pro LINQ Object Relational Mapping in C# 2008


Product Description

It is nearly impossible today to write enterprise software without the use of one or more relational databases. Granted, there are cases when the data is transient and not stored in a database, but for the most part, software needs to consume and manipulate data in a database. It sounds easy, but there are hundreds of ways to connect software systems to databases and thousands of people who think they have the skeleton key for data access layers. Pro LINQ Object Relational Mapping in C# 2008 explains an efficient, repeatable way to apply industry design patterns to build scalable object–oriented data access layers.

Object relational mapping (OR/M) has been a gray area in Microsoft development for many years. It’s not that Microsoft language developers don’t understand OR/M; in fact, the opposite is true, as is exemplified by the glut of third–party .NET OR/M tools on the market. The struggle has come more from the lack of native tools with the object–oriented and object persistence capacity to effectively work in this arena. With the inception of .NET, Microsoft overcame the first obstacle by developing an object–oriented environment and framework. The second obstacle, the native object persistence layer, is only now being realized with the introduction of Language Integrated Query (LINQ) and LINQ’s children, the Language Integrated Query for Relational Databases (LINQ to SQL) and the Language Integrated Query for the ADO.NET Entity Framework (LINQ to Entities). The gray area no longer exists, and the .NET developers of the world finally have the native tools required to build modular, reusable data access layers.
What you’ll learn

* The powerful advantages that OR/M can bring to your code
* The native tools that are now available within Visual Studio 2008 for OR/M
* How to build scalable object–oriented data access layers that take advantage of OR/M’s flexibility
* How LINQ fits into this picture, together with the advantages and disadvantages that it can bring
* How the concepts work in the real world by examining a fully worked and detailed case study, created with an architecture than can be easily applied to a wide range of other situations

Who is this book for?

This book is intended for Microsoft .NET developers who are using or evaluating Microsoft Visual Studio 2008 to build data–aware applications, and it will provide patterns and resources that can be used to build enterprise class software.
About the Apress Pro Series

The Apress Pro series books are practical, professional tutorials to keep you on and moving up the professional ladder.

You have gotten the job, now you need to hone your skills in these tough competitive times. The Apress Pro series expands your skills and expertise in exactly the areas you need. Master the content of a Pro book, and you will always be able to get the job done in a professional development project. Written by experts in their field, Pro series books from Apress give you the hard–won solutions to problems you will face in your professional programming career.

Product Details

* Amazon Sales Rank: #165714 in Books
* Published on: 2008-07-03
* Original language: English
* Number of items: 1
* Binding: Paperback
* 408 pages

Editorial Reviews

About the Author
Vijay P. Mehta has been working as a software engineer and architect for the last 12 years. Starting off in the VC++/ATL, MFC, Win32, and VB6 worlds, Vijay later moved on to Java and .Net development. With his current focus on C# and .Net, Vijay holds a number of Microsoft certifications and has written a number of articles on .Net and Microsoft–focused development. Currently working as an Architect for a financial services software company in Indianapolis, Vijay spends the bulk of his time designing and implementing large, cutting-edge software systems.
Customer Reviews

Excellent, easy-to-follow, and complete guide to ORM with Visual Studio5
Object relational mapping (ORM) and LINQ are new, important topics that every enterprise .NET developer should take note of, and Mr. Mehta delivers with this very informative, thorough, and approachable book on the subject. Written for the intermediate-to-advanced C# developer, the author begins with a discussion on the general aspects of ORM and how it can simply the programmer's life by consolidating _all_ business logic into the tier it belongs, the business logic tier, making your overall codebase more organized and easy to maintain.

Two Microsoft ORM technologies are presented: the simple LINQ to SQL system, and the more advanced "enterprise" level Entity Framework. As an experienced C# developer, I found the introductory material on LINQ to SQL especially helpful and easy to follow, and the material timely and directly applicable to a CRUD application i'm currently working on (a school library system). Although Visual Studio wizards are simple enough to figure out, I appreciated Mr. Mehta's step-by-step walk-through of the VS wizard generated code, giving me a complete understanding of the underpinnings of the LINQ to SQL ORM technology. After reading chapters 3 and 4, i had all the information I needed for developing my school library application. I was pleasantly surprised how much development time i saved, now that i don't have to write my own data access layer and decipher the MSDN LINQ to SQL documentation on my own.

Mr. Mehta approaches the Entity Framework with a complete sample application, "The Bank of Pluto". This is a favorite approach of mine to learning, as i get a good idea of what to expect when developing an enterprise application and how it relates to the Entity Framework.

A couple of very minor improvements i would make to this already excellent text: a quick introduction to LINQ (which the author assumes the reader already knows) and an up-front comparison of LINQ to SQL and the Entity Framework (why choose one over the other, etc.) Although the comparison of the two technologies appears in the book, it isn't encountered until the end in chapter 12. If you read the book from beginning to end as i have, I would have gotten a better sense of what technology to use for my project at the start. This is just some minor nit-picking; these gaps can be filled with the existing MSDN documentation or other texts.

Overall, Vijay Mehta has delivered a very successful book and has become my first "go-to" source for information on this important subject. I will recommended it to any C# developer!

Awesome Book5
I am not sure what the 2 and 3 star reviews are about, because I thought this book was excellent, and considering the book says "intermediate"
I'm not sure why people were expecting a "deep technical ORM, LINQ to SQL, or EF" book.

The book is broken into 5 different parts:
Part 1 - ORM Concepts - This is really good background for people who don't understand ORM patterns, and DDD, but it is a bit dry. If you are familiar with pattern based development and ORM you can probably skip over this section. I give this section 4 stars

Part 2 - LINQ to SQL Examined - This is a solid overview of LINQ to SQL. The author goes through all of the basics of LINQ to SQL and gives you just enough to move into more complex LINQ to SQL development. My biggest complaint is that there are a few left-over Beta2 errors but I contacted the author and he told me that an errata had been submitted. Overall I give this section 5 stars.

Part 3 - Entity Framework Examined - Again, this section is a good overview of EF. I like this section because the author really explores all of the meta-data behind the Entity Framework. I would have to say my biggest complaint is that there isn't enough content here on EF, but what is available in the book is a good starting point for EF developers. I think this section deserves 4 stars because I longed for more

Part 4/Part 5 - The Bank of Pluto Case Study/Building on the Bank of Pluto Foundation - I combined these sections because in my opinion they should be a single section. This is the heart of the book where the other goes through in detail a real world case study using POCO and DAO with LINQ to SQL and EF. I think this section really make the book a winner and a must read for all. 5 stars on these sections.

Overall Pro's - Great, easy to read book that covers ORM patterns, the basics of LINQ to SQL and EF, and the inner-workings of building a real world ORM data access framework.

Overall Con's - Needed a little more information in sections, and is heavily DDD focused.

I'm giving this book 5 stars because I think it brings something to MS development that other books haven't.

Strong inspiring start but continues as a boring and incomplete ref manual3
Very strong start giving a DDD recap but
LINQ to SQL and LINQ to entities chapters are boring and incomplete.
I have the impression that these chapters are not written by the same person ...