# Sunday, 06 March 2011

A couple of weeks ago I found a new shiny book in my mailbox: ASP.NET MVC2 Cookbook by Andrew Siemer and Richard Kimber. Due to a very busy schedule at work and the 2011 MVP summit in Seattle it took me a bit of time to go through it completely.



First of all, I like the cookbook approach that Packt’s been using for some time now. These books show off small examples that are reusable in most occasions of day to day development. This book is for sure no exclusion on that part so I liked it. The benefit of having short, spread over several pages, recipes is that you can simply read it when needed or go through them if you don’t have much time in a one by one fashion.

The book itself is clearly written and divided in several chapters which not only covers MVC but also topics like data storage. What I found to be great is that it also introduces tools like Automapper, NBuilder, MvcContrib, MvcSitemap, … and also makes the reader used to things like Dependency injection (by making use of Structuremap) and for example the PRG pattern (Post/Redirect/Get), Hijaxing (also called progressive enhancement or graceful degradation).

Are there downsides on this book? Well, yes. First of all it’s not for people who just want to start with ASP.NET MVC. Some being used to the technology basics will surely help to grasp this book. I would suggest making Nerddinner or MVC Music Store, both free tutorials with guiding eBook, is a must. Second is the fact that it was published a month too soon. Why? Just before this book got released Microsoft unleashed ASP.NET MVC 3 to the world. It would’ve been great if some recipes would’ve included some MVC 3 juice too. Not everyone’s using MVC 3 yet so it is great to have all things working in MVC 2 too but for the future readiness of the book it would’ve been just on spot.

Grz, Kris.

Books | MVC | Review
Sunday, 06 March 2011 14:27:55 (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, 01 December 2009

Recently I got this book for a review. The book itself is ASP.NET 3.5 Content Management System Development by Packt publishing.


The book’s right for the right kind of people: people who started with ASP.NET, played around with it and now want to learn more of some of the concepts of ASP.NET. This is definitely not a book for developers who’ve been doing some hardcore web development with ASP.NET themselves.

What I liked is the order in which the book’s written. All chapters follow nicely one after another and it shows in each chapter steps to either build on the former or how to refactor the previous code and for what reason.

Chapter 1: a quick and dirty file based CMS system with only one page gets created after how it’s shown how to set up and configuring IIS and ASP.NET.

Chapter 2 is a great refrehser, or introduction, of SQL statements and installing SQL Server Express 2005 as a database. What I really liked about this chapter’s something that mostly gets overseen: SQL injection. What its is and what .NET does to prevent it

Chapter 3 takes you through a basic multilayered architecture which will be implemented in the small, now database using, application. What I found a bit of a pity was the usage of typed datasets. In a world where one sees Microsoft moving more and more to Linq and Entity Framework this is a bit of a missed chance. On the other hand typed datasets is still used a lot in the industry. And as told before, this is a book for people having gone through beginner tutorials first. Also a good basis for further chapters is made with the new architecture which goes beyond a simple: here’s a page and some controls which connect directly to the database.

Chapter 4 introduces the reader to an important concept: security. How to configure sqlmembershipprovider, creating the database, making use of the aspnet_regsqltool, roles and making use of the login controls.

The next chapter shows how to create an articles module. An introduction to user controls, and making use of roles.

Chapter 6 leads the reader into the world of themes, master pages, skins and menus. First it’s shown how to add items directly with a wizard to the menu and then a more common approach’s used with sitemaps.

Chapter 7 is all about the fileupload control, working with files (image gallery) and creating RSS for your content management system. 

The fore last chapter’s more about finishing touches and adding reporting to the application, nice little additions. Also a couple of tips about SEO are highlighted (using the title and meta tags).

The last chapter goes into further possibilities: upgrading to a real full blown SQL Server edition, how to use base pages in the application and error handling.


What I liked about the book is the way the authors write, it’s technical content but with humor added on top. It’s a kind of book you’ll like to read when you want to get to know as an aspiring developer. The topic about SQL injection was a big plus for this book just to get people more aware about the problems that can arise with it.

Grz, Kris.

Tuesday, 01 December 2009 20:32:06 (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Monday, 01 June 2009

I recently read the book ASP.NET MVC Quickly from Maarten Balliauw, published by PACKT Publishing. It’s been one of those few books that I read from cover to cover. Not only because the subject interested me but also because it shows in about 190+ pages an introduction to this new technology from Microsoft. It was clear that the person who wrote it knows quite a lot about the subject and that shows in the book. I really appreciated Appendix A and C where Maarten discusses a sample application he created: CarTrackr.



Chapters 1 & 2 provide some quick introductions as to how the architecture looks like and why you would use it over normal ASP.NET webforms. Provided is a “litmus” test to see whether to go for MVC or Webforms and discusses the advantages of both. Chapter 2 explains what’s in the box when you create a new ASP.NET MVC application with Visual Studio. Also a first small application’s being built with ViewData and strong typed ViewData.

Chapter 3 introduces you to a simple application, shows how to deal with fileuploads in MVC, simple validation and the creation of a custom ModelBinder attribute.

Chapter 4 covers the ASP.NET MVC request life cycle. Yes there’s a life cycle but not similar to the ASP.NET Page Life Cycle most people got to know during the last years. After that it proceeds with a more in depth look at the model and validation on such a model. After that an in depth look at controllers, actionresult types and how to handle unknown controller actions. Master pages and Partial views (.ascx) are covered. Those last are only briefly touched and I found that a bit of a pity as these are important concepts. Especially the lack of nester master pages in this story was something I missed.

Chapter 5 is totally dedicated to routing. A very important concept in the whole ASP.NET MVC technology stack (and ASP.NET Dynamic Data and also possible to use with normal webforms). Also a quick explanation on how to integrate both ASP.NET and ASP.NET MVC together in the same project routing wise.

Chapter 6 shows you an overview on how to customize the framework and to even build a small custom viewengine. Also the making of a custom ActionFilter gets discussed.

Chapter 7 shows how to use the standard membership, session state, … that we all know from webforms in ASP.NET MVC. After all, it’s built on top of normal ASP.NET so they can share a great deal of the standard technology. Also is shown how to integrate both technology stacks in the same project. This can be interesting food for thought when people want to gradually upgrade to MVC. Also a nice trick to build views at compile time. Slowing the process down but can safe time in finding out the hard way that you forgot a ) or something and the whole thing explodes in your face.

The next chapter tells us more about AJAX. I had hoped to see this chapter to be longer but it just gives a quick overview. The fact that both ASP.NET AJAX and jQuery (even some of the ui components) are discussed is a plus. I’m a big fan of the latter myself.

Then chapter 9’s all about testing. Also mocking’s discussed. Since ASP.NET MVC is also considered to be way better than webforms to be tested (TDD and such) this is an interesting chapter.

The last chapter is all about deployment; A lot of resources seem to be forgetting about this but I liked the fact that this book covers it. Also on older versions of IIS than 7.

As already stated above, I liked appendix A and C. They cover an application built with the technology which is downloadable on codeplex. Appendix C provides an overview of very interesting resources about the topic.

Conclusion: it’s a nice book that quickly gets a developer into the terms of ASP.NET MVC, covers quite a lot of ground and touches the interesting parts of the technology. Some parts I would’ve loved to see a bit deepened out, especially the parts about the master pages and partial views as well ajax. On the other hand I read it from cover to cover and that certainly means something.

Grz, Kris.

Monday, 01 June 2009 21:06:19 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, 05 August 2008

Some time ago I received this book for reviewing and now I finally got the time to completely finish reading it. The nice thing about the book is that it covers the data presentation controls from all .NET frameworks (1.x, 2.0 and 3.5). The repeater, datalist, datagrid, gridview and listview are covered. The book itself is less than 250 pages so a quick read when you dedicate the time to it.

The thing I didn't like however was the chapter about list controls. This shouldn't be in a book about data presentation controls. I would've loved to see more about the listview control instead. That particular chapter could also use an update since it still talks about Orcas (the codename of Visual Studio 2008). It would be a great thing if this book would get an upgrade on that chapter and even an extra chapter instead of the list item controls chapter which should never have made it to the book in the first place.

Since I started with ASP.NET in 2002 I've been around for some time with the data presentation controls myself so I didn't really learn much from the book but for people that want to learn more about these controls or are just beginning. The controls from that were introduced during the .NET 2.0 era have quite some coverage so that's good material.

Grz, Kris.

Tuesday, 05 August 2008 20:50:50 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |