Pragmatic ADO.NET: Data Access for the Internet World
by Shawn Wildermuth
Addison-Wesley Pub Co
The world of ADO.NET can be confusing to someone who is used to the
old versions of ADO. I remember the frustration of trying to wrap my
mind around the new concepts of the "disconnected data"
world.
I read a couple of books that had information on ADO.NET and some
decent examples. Even though the examples helped me grasp some of
the "how to do" questions in my mind, none of them really
explained how the new version of ADO.NET worked, why it was designed
the way it is, or gave any best practices. Luckily, I was able to
review this book and a million pieces of the puzzle came flying into
place.
Pragmatic ADO.NET is an excellent teacher of what ADO.NET is, how it
works, and how the everyday developer can use it. This is THE book to
read if you want to understand how ADO.NET works, and learn best
practices of how to use it.
This book has many examples, but is not over laden with them. They
are shared in a very clear and precise manner, which is always
straight to the point. The examples will help you put into play the
best practices that are discussed in the book. One thing I would have
liked to see were more examples in VB.NET. 99% are in C#.
The book is very well written, and flowed very smoothly from one
topic to the next. Shawn has a way of explaining things very clearly,
and in such a way that anyone can understand. That being said, this
is not a beginner's book. But, is a "Must Read" book for
anyone who knows ADO and wants to go to the world of ADO.NET. More
seasoned developers would also greatly benefit from this book. The
best practices that Shawn shares are priceless, and come from his
real world experiences.
Summary:
Chapter 1: Why ADO.NET
This chapter gives a short history of Universal Data Access, and then
gives a primer on ADO.NET. It discusses why the new ADO.NET is better
than the old ADO, and also goes into things like ADO.NET data
structures and managed providers.
Chapter 2: Getting Connected with ADO.NET.
This chapter deals with connections in the ADO.NET world. SQL Server,
OLE DB, Oracle, and ODBC connections are discussed. Connection
pooling for all these connection types are discussed. Returning OLE
DB database schema information and ADO.NET exception handling are
also covered.
Chapter 3: Commanding the Database.
ADO.NET command types are discussed, as well as how to execute them.
Some other topics include, wrapping stored procedures, using
parameters, and parameterized queries. The chapter ends by covering
Transactions and Batch Queries.
Chapter 4: Reading Data.
All about the world of DataReaders. How they are made, how they work,
etc. Dealing with Database locks, multiple result sets, and working
with datareader Meta Data are some of the other topics covered.
Chapter 5: Constructing DataSets.
This is one of my favorite chapters. It helped put a lot of
my "missing puzzle pieces" in place. DataSets are thoroughly
discussed, and topics include TableMappings, multiple DataTables,
DataAdapters, creating DataSets from XML, etc. The chapter also
covers defining the DataSet schema, which includes how to work with
primary keys, relationships, constraints, triggers, and many other
things.
Chapter 6: Typed DataSets.
This chapter discusses Typed DataSets. What they are, how you make
them, and how to use them. The chapter ends with a discussion on
simplifying Business Object Layers with Typed DataSets.
Chapter 7: Working with DataSets.
Now that we know what DataSets are, this chapter begins working with
them. Topics covered include changing, navigating, searching, and
merging Data in DataSets.
Chapter 8: Updating the Database.
Disconnected data is great, but it "comes at a cost" as Shawn
puts it. This chapter teaches the ins and outs of concurrency in the
ADO.NET world. Inserts, updates, deletes, and the different
concurrency types are covered. It is a great chapter and you will
finish with a great understanding of how to get the DataSet changes
back into the actual Database.
Chapter 9: ADO.NET and XML.
This chapter is all about the DataSet and XML. Getting the data into
XML, saving it as XML, and getting XML to fill a DataSet are a few of
the topics discussed.
Chapter 10: Data Binding with ADO.NET.
This chapter discusses the different types of ADO.NET data binding
for Windows forms and ASP.NET.
Chapter 11: Scalability and Performance.
This is another one of my most favorite chapters from the book.
Shawn's real world experience shines light on to the world of
performance and scalability. When to worry, why to worry, and how to
avoid problems are all discussed. The last section of the chapter is
all about best practices, and is a great read.
Appendix: ADO Migration Strategies
Broad overview of migrating to ADO.NET from ADO. How to migrate ADO
recordsets, connections, and a few other related topics are covered.
In conclusion, I give this book a 10 out of 10. It is an excellent
book, and one that is worth your while to read. I would highly
recommend this book to anyone who knows ADO and wants to move to
ADO.NET, or any .Net developer who wants to know more about ADO.NET.
I wouldn't really change much about it, except I would tell Shawn
not to use Atlanta Braves players in his examples... He should use a
better team, like the Arizona Diamondbacks. :-)