Sunday, April 12, 2009

ASP.NET MVC 1.0 free book contains broken code

Hey...what a news flash!

MVC 1.0 is a new application framework for ASP.NET. I wanted to figure out what it is because it, like some other "frameworks" I use are designed to make application development closer to Code Free. This specifically is on my list since:

1) It took me a while to get my head around the ASP.NET 2.0 declarative markup programming model. It is so vast and so powerful that you need to understand at least 30-40% to be productive at all. And a higher knowledge level is needed to debug it. I have had some success using 2.0 and pushing it over to Sharepoint with relatively minimal problems.
2) Now I read about MVC like it is something new. The first time I read about it was in a SmallTalk book in the 80's.
3) Even MSoft had a MVC-type framework called MFC, again from the 80's.

Here is the blog that announces the 1.0 version.

So I loaded the Contoso VPC for SharePoint to test another framework [described in another blog entry]. Then I decided to try this MVC thing in that VPC-image. To install it, nothing more than the usual .Net framework hassles to overcome.

The link above also allows you to download the completed code that is [presumably] built up step-by-step in the book.

I have seen many cases where some group gave a tutorial book and the code and they did not agree. Whether I cared about that or not depended on the subject matter. There have been times in the past where if I really wanted/needed to learn the material and I ran in to the book does-not-equal code case, I would just skip the book and go to the documentation for the code.

In this case although I was ready for it, now that we know this is the case again, I am a little more disappointed because:

1) frameworks are big entities to learn
2) the stated goal of this book is to help someone learn
3) I have read this Scott Guthries blog in the past and he seemed like a stand-up guy
4) After reading the chapter before trying the code, almost none of the ASP.NET 2.0 decalrative framework carries over; even more reason for this think to work
5) I guarantee you these guys know the [lack of] pedagogical value of having a how-to book that is incorrect and the final code; of course, it is better than just having the book!
6) MSoft usually treats programmers better; I have seen lots of cases where they give not-quite-ready stuff to users, but they usually understand the developers have a bigger hill to climb
7)the purpose of a framework is to let the developer think big-picture; having to dig into the guts of MVC routing on your first trip to nirvana with this thing is not what the doctor ordered

So again I am naive; again the industry chucks one huge framework to move to a slightly better one that is just as hard for developers to learn.

I guess that this is another one of the benefits of open source. I guess if anybody could do it, they wouldn't need programmers, right?

Finally, there is a tweet out there somewhere found by Google when I type in "errata" about this mess. Wanna guess the fixes will be printed at the back-of-the-newspaper?

Ohh, I got up to page 45...and the code will not breakpoint in DinnerController...must be a user error!?!

Regards..

No comments:

Post a Comment