Book review - "Pro ASP.NET 4 in C# 2010, by Matthew MacDonald, Adam Freeman and Mario Szpuszta. ISBN-13: 978-1-4302-2529-4 - Published by APRESS
Hi all, this is my book review of the new "Pro ASP.NET 4 in C# 2010 book". Since .NET framework 4.0 went into production in June 2010, I was pleased to see that an ASP.NET book targeting the .net framework 4.0 is out for publication. Also, I was pleased to see that the samples deal with C#. I believe that C# will be the dominant language in the .net framework arena for the foreseeable future. As one who programs in both C# and VB.NET, I would have to lean towards C# as the language of choice. We can see this trend also in the fact that most of the latest programming examples out there related to .NET framework are written in C#.
In general, we don't see a whole lot of new features in ASP.NET 4.0, but there are supposed to be improvements in performance and stability in ASP.NET 4.0.
New features worth mentioning include:
* Session state compression for out of process session state service (such as the venerable adStateServer sql server storage for session state)
* ASP.NET MVC - an alternative way (other than classic webforms way) to separate your website logic into three logical parts (Model, View and Controller). This MVC pattern has been around for awhile now, but it is now officially adopted into ASP.NET 4.0. Some people love the MVC model and believe it simplifies while others believe MVC just adds extra effort.
* ASP.NET Dynamic Data - A way of quickly generating data-centric websites that focus on viewing and editing database records. The pages are populated by inferring the schema of the data model (Entity Framework or LINQ to SQL) It is based upon LINQ (language integrated query). The dynamic data model is supposed to also allow more advanced customizations, than you may have seen with this type of "easy, code-generation of database data for maintaining websites" in the past.
As I read through this book, I realized that ASP.NET 4.0 is still based upon technologies that have been around for years now. ASP.NET 4.0 is a very mature and powerful technology. Much of the content of this book covers topics that would be covered in earlier versions of ASP.NET. This is not a criticism at all because the authors of the book meant to give a "complete description and understanding of ALL of ASP.NET" and not just coverage of the new features in ASP.NET 4.0 (of which there are relatively few new features as I previously stated). This book is almost 1600 pages long and has excellent coverage of the diverse topics that fall under the umbrella of ASP.NET.
This book is a complete treatise on ASP.NET topics such as:
* Web forms
* Server Controls
* User Controls
* An explanation of the ASP.NET processing pipeline and how they work including HTTPMODULES.
* An explanation of ASP.NET state management (remember HTTP is a stateless protocol, so ASP.NET has including things like View State, Session State and Application State as an abstraction of state that helps developers build web applications).
* ADO.NET - how to talk to databases with the .net framework - also explaining the use of dataset objects in disconnected architectures
* Explanation of databinding (especially in terms of the objectdatasource/sqldatasource controls)
* How to use data centric server controls (read up on gridview /formview /listview /detailsview) server controls.
* An examination of LINQ (which is a relatively new topic to the .net framework and has to deal with being able to query and iterate through collections of data in a common way using a language known as LINQ (language integrated query)
* How to use caching to solve issues such as increasing website performance and scalability of your web applications.
* How to deal with XML and the many ways of getting at xml (XPATH/LINQ/XSL etc.)
* How to write and use USER Controls which are a way for developers to easily reuse "nuggets" of programming and presentation layer by encapsulating the content into a user control A user control can then be "dragged" onto a page design surface and be used over and over within your website.
* Themes and Master Pages cover the ways that ASP.NET can enable reuse and standardize the "look and feel" of a website.
* Navigational Controls - (recommended readings are about sitemap /menus /multiviews)
* How to manage and deploy websites, whether it be simple xcopy, or use of web deployment packages).
* A very detailed explanation of ASP.NET security, including forms authentication and ssl. What I particularly appreciate about this book is it has very detailed information about the built-in security features that come with ASP.NET (these security features first came out in ASP.NET 2.0). This includes the ASP.NET membership api/forms authentication /role providers /profile providers and how to check principal permissions. There are more than 40 detailed pages on how to build your own custom membership provider which basically extends upon the provider model provided in ASP.NET. In my opinion, out of the box security concepts as provided in the membership/roles/profile providers are one of the most powerful and time-saving measures in ASP.NET. For example, I am building a custom "membership" portal that builds upon the standard forms authentication/membership provider/role and profile provider. This stuff is powerful and gets you up and running very quickly, much more quickly than if you had to roll your own authentication/authorization/user profile programming code. Believe me, I've been there and done that (wrote my own custom security code), but in today's fast paced software developer world, it's nice to be able to piggy back on ASP.NET security because it's powerful, well designed and easy to implement. I think this area is one of my most favorite topics of this book, because it has so much useful information here.
* The book goes on to deal with nice chapters on creating ASP.NET server controls, ASP.NET server controls are a way for programmers to build their own control that can be placed into the visual studio toolbox and used as a software component. Those of you who are familiar with Infragistics/Telerik and Component One know that server controls are powerful ways of allowing programmers to take advantage of nice web control suites to build very nice web interfaces. The companies mentioned above have written their own server controls that are available for programmers use. Microsoft also supplies ASP.NET server controls out of the box (textbox/gridview) etc. In this book, the chapter shows you the API that Microsoft provides so that any programmer can build their own server controls.
* How to deal with graphics and gdi programming as pertains to the ASP.NET world. Things like using pens/brushes as you would see in any type of graphics programming.
* Web parts are covered also in this book which is a neat technology, CMS systems such as SharePoint, make heavy use of web parts, so this is a must read for serious ASP.NET developers who also may want to leverage SharePoint and build custom web parts.
* MVC/Silverlight and dynamic data round out the rest of the book. Silverlight is an exciting technology that I expect to really get into in the near future, Silverlight 4 just came out and I want to see if we can build real business applications (LOB) with it. Dynamic data I have high hopes for, I haven't had a chance to play around much with it (Deadlines, deadlines), but I hope to see what dynamic data can do for me, this is one of the newest topics out in ASP.NET 4.0.
WHEW! This book has a LOT of useful information for any ASP.NET developer, even though I own at least 4 other ASP.NET programming books, I would definitely rate this book as a "must-have", it is chock-full of information that developers can use and take advantage of. As a full-time programmer, the more productive you can be, the more versatile and valuable you can be (not to mention, the more income you can generate). I highly recommend this book for those of you who use ASP.NET, it is very complete and the authors did a very commendable job detailing the broad and diverse topic of ASP.NET programming! With this book, you can tell a ton of effort was put into it. Note that there is also a "beginning ASP.NET 4 in C# 2010" book also published by Apress, I haven't had a chance to look at it, but the "pro" book that I am reviewing here certainly qualifies as professional level, because of the depth and breadth of its content!
One thing the book DOES lack, however is a sample website or "final project" that I have seen other ASP.NET books provide. I downloaded the source code for the book and it has samples for every chapter in the book. This book rocks though for sure!!!
With ASP.NET technology, it is a proven platform for building web applications and Microsoft has built something very powerful over the years. ASP.NET (and in general the .net framework) along with the excellent Microsoft Visual Studio programmers IDE is, in my humble opinion the best in class web programming environment out there. You can't go wrong by choosing ASP.NET as your web development platform of choice.