ASP.Net MVC Book Review and musings

Written by Welzie

August 14th, 2009 at 1:27 am

Posted in .Net, Books

Tagged with , ,

With 8 comments

ASP.Net MVC musings

Book Review – Pro ASP.Net MVC Framework – Steven Sanderson


Book on Amazon
I am a Java, PHP, and .Net developer which may make my opinion worthless to some Microsoft zealots but I thought I would type up my thoughts on this book anyway. Overall I found this book to be a great way to learn ASP.Net MVC. It has great examples and enough background material to bring people new to the MVC pattern up to speed. Below are my pros and cons along with notes on chapters 1-13.

Note about the cover.

One thing I found interesting is that the cover says “Discover the biggest innovation in Microsoft web development since asp.net 1.0″. I find it amusing that something as old as MVC web frameworks can be called an innovation for asp.net development since MVC frameworks are nothing new to web development. Heck they are not even new to ASP.Net development. See MonoRail .

Pros

Cons

Chapter 1

Chapter 2

Chapter 3

  • Gives in depth definition to each part of MVC
  • Gives good definition of entities vs value objects
  • Lists design and pattern best practices
  • Brief discussion of IoC and IoC containers
  • Brief discussion on automated testing and the TDD movement
  • Gives example of creating mock implementations for testing

Chapter 4

  • Goes into medium depth while building a project with unit testing, domain model, and web layer
  • uses LING to SQL for database interactions
  • Sets up IoC with Castle Windsor
  • Shows how to use Nunit and Moq to create unit tests
  • Good definition of TDD and how the author thinks of it as actually BDD (behaviour driven development)

Chapter 5

  • Examples of how to test every part of ASP.Net MVC
  • Shows example of how to only expose an interface in your controller to avoid tying the controller to your business logic implementation

Chapter 6

  • CRuD actions and views are added to the example project
  • Example of username/password authentication
  • Shows how to upload an image through a form field

Chapter 7

  • Detail of asp.net MVC project folder structure
    • Very well done, explains the what/why for each folder
  • Goes over the naming convention which are crucial since ASP.Net MVC follows CoC

Chapter 8

  • Everything you need to know about how url routing works and also how to create links in your application to your controllers/actions

Chapter 9

  • More details on what code belongs in a controller/action
  • More details on how the views are rendered
  • Example of how to use the [Authorize] filter attribute, which is a great way to easily secure your actions individually

Chapter 10

  • Details on how views work specifically how data is passed between layers and tools available to display that data. Specifically the HTML helpers.

Chapter 11

  • Everything you need to know about how to modify and configure how data is retrieved from forms and urls and then binded to action parameters and model objects
  • Validation
    • Author basically suggest using plain c# in the model layer for validation. doesn’t list the re-usability and “all ready done for YOu” benefits of using a validation utility.

Chapter 12

  • Simple examples of how to use the AJAX HTML helpers which includes JQuery.

Chapter 13

  • Demonstrates basics of HTTP requests to help you understand how vulnerable web sites are. Really good reading for less experienced web developers.
    • Gives example of how to fake an http request
    • Gives examples of using tools like firebug and fiddler
    • Details cross-site scripting and html injection
    • Details how one of the previous chapter examples had a vulnerability and how it can be fixed


Book on Amazon

  • Share/Bookmark

Related Posts

Comments

8 Responses to “ASP.Net MVC Book Review and musings”

  1. Chocolim on August 14th, 2009 9:52 am

    The first 2 Cons arent really Cons. Linq is the way to go. And the book isnt about mono is about MS asp.net mvc

  2. Welzie on August 14th, 2009 10:04 am

    @Chocolim – The book covers a wide range of topics and IMHO not mentioning the mono project is a con. Especially since ASP.Net MVC is likely to attract developers that are used to open platforms such as the mono project. Also the book isn’t a LINQ book, so why only feature LINQ? And IMHO NHibernate is the way to go, but that is a debate for another day.

  3. MikeNereson on August 14th, 2009 12:02 pm

    He wrote this post and said in it that he was writing it from the point of view of a “Java, PHP, and .Net developer” So I can see why as a polyglot programmer he would not be a fan of using LINQ, not that LINQ is not a valid choice.

  4. Paul Batum on August 16th, 2009 8:24 am

    Ahh, so perhaps your con should read “Database examples using LINQ to SQL”. LINQ and LINQ to SQL are different things.

  5. Welzie on August 17th, 2009 11:41 am

    @Paul Batum – Point taken. Updated review accordingly. I have also updated my cons to note the fact that LINQ to SQL was used for brevity. The book really does have in depth examples, so I guess keeping them shorter but still on point was a good choice. I’m just not a big fan of LINQ to SQL.

  6. ASP.Net MVC musings and book review : Code Hangover | Webmaster Tools on August 14th, 2009 2:23 pm

    [...] Here is the original post: ASP.Net MVC musings and book review : Code Hangover [...]

  7. ASP.Net MVC musings and book review : Code Hangover | Review Gallery on August 14th, 2009 4:54 pm

    [...] View post: ASP.Net MVC musings and bo&#11… [...]

  8. ASP.Net MVC Book Review and Musings on August 20th, 2009 2:13 am

    [...] ASP.Net MVC Book Review and Musings http://blog.codehangover.com/asp-net-mvc-musings-and-book-review/ [...]

Leave a Reply