Scott Guthrie Throws Some Water on the Web Forms/MVC Debate

26 Jan

Scott Guthrie wrote a very good article on about how to have a reasoned technical debate in response to the recent Web Forms / MVC flamewars that have been happening across the internet. Although I fall into the MVC camp it was good to see the Microsoft VP of the Developer Division try to calm people down. I believe Scott was trying to explain that both technologies are valid approaches to web development and that choosing one over the other for a project is not a reason to engage flamewars.

I have seen a lot of trashing of MVC by Web Forms adherents lately.  Web Forms advocates arguments break down into two categories reasoned opinions and FUD.  Here are some of the reasoned arguments I have seen.

  • they are already comfortable with the Web Forms page lifecycle
  • they don’t want to lose their investments in server controls that they have purchased or developed

Here are some of the arguments that just seem like FUD to me.

  • Web Forms are better for larger projects
  • Web Forms are more productive

Developers that have a lot of experience with Web Forms and a large investment in doing development using the Web Forms model and aren’t interested in MVC should stick with Web Forms. These are valid reasons for sticking with mature technology that isn’t going away anytime soon.

The other arguments however fall into the FUD category. Having just deployed a good size site built on ASP.NET MVC it works just fine for large projects. My team was definitely more productive using MVC than we would have been using Web Forms. Developers who are looking for more control over what is output to the page and a more agile development style should learn more about MVC.

When it comes to debating the merits of Web Forms and MVC the MVC camp is just as guilty when it comes to the religious wars that technology debates seem to turn into. Those who have made the switch to MVC really can’t understand why someone would stick with Web Forms and the limitations they impose on the developer. MVC developers see the page lifecycle and server controls as limitation while Web Forms developers see them as benefits. So what is really going on is developers trying to protect their ego’s by denigrating the choices others have made. This is basically a variation of the Emacs versus vi text editor wars.

It was nice to see someone of Scott Guthrie’s status in the community telling everyone to use their heads and try and use reasoned arguments and not go around blowing your stack at people who happen to disagree with you.

Update: Ian Cooper has written up a fantastic MVC or Web Forms comparison following up on Scott Guthrie’s article. Ian Cooper does a really great job summing up the argument for MVC and where Microsoft web development practices are going.

Word Games

26 Jan

I have become quite a fan of word games recently, mainly Words With Friends on my iPhone along with the classic Scrabble.  I got sucked into playing Words With Friends and that motivated me to pickup Scrabble. My son who is almost ten years old loves playing Scrabble with me. We used to play board games together more but then we got out of the habit as he outgrew little kids games. I have really enjoyed the family time we have shared playing together. If you are looking for something to do with your kids as a family during a the very cold Midwestern winter, board games are a great option.

Atwood Needs to RTFM on Git

22 Jan

I was listening to the stackoverflow podcast  this morning when Jeff Atwood went off on an uninformed rant about the way that  github.com works. Jeff was complaining about network graph for the stackoverflow fork of the wmd JavaScript Markdown editor.

Jeff’s complaints showed a fundamental misunderstanding of how distributed source control works. Joel tried to explain to Jeff that in a DVC system forking or cloning a repository doesn’t mean anything unless the fork sends a pull request to the master repository to include its changes. Unfortunately Jeff couldn’t get past the way that github displays project forks on the network graph. If Jeff had spent some time becoming familiar with git and the concepts behind DVC systems the whole conversation wouldn’t have taken place.

Usually Jeff explores a concept in minute detail which is one of the reasons his blog became so popular. In this instance though he perform his usual exploration of a subject and it really showed. I hope he takes some time to become more familiar with DVC systems as they are a real boon to modern software development.

Ordered Book Nine of The Malazan Book of the Fallen

20 Jan

I couldn’t help myself and I went ahead and ordered Dust of Dreams by Steven Erikson. I really enjoy the Malazan books and I will post a review when I have finished the book.

LINQ Distinct Fix

21 Dec

I needed to use the LINQ Distinct operation on a list of objects today and I ran into the fact that Distinct doesn’t take a lambda expression. You have to create a class that inherits IEqualityComparer and implements both the Equals and GetHashCode methods. This seems like a real pain to me. Distinct should take a lambda expression like the rest of the LINQ operators.

I found a workaround by using GroupBy, First, and Select like so.

var distinct = collection
       .GroupBy(c => c.FilterProperty)
       .Select(c => c.First())