MVC in ASP.NET? Really?!

Rick Strahl just got back from his string of conferences and wrote a general, “I’m back from the circuit and plan to post more” post.  Which I scanned over real quick.

Right in the middle of the post he mentions that Microsoft is working on MVC for ASP.NET!

Now, this is particularly interesting to me because way back when ASP.NET 1.0 was in beta, the big question from the JSP programmers, you know, the guys who write web sites using Java?   was “How can we use the MVC pattern in ASP.NET?”

Now, the real answer to this question is, “you don’t and you shouldn’t want to.”  But, I did come up with a way to use MVC,  Or at least what the JSP guys meant when they said MVC for ASP.NET, and wrote an article about it.  In fact, it became the source document on the subject.  Just about anyone who wrote on the topic referred back to the article as either part of the source for what they wrote or as further reading.

However, like I said above, MVC doesn’t really fit ASP.NET.  Further, the way it is implemented in Struts for JSP significantly limits what can be done with it.  For example, in Struts it is difficult, if not impossible to closely wire the validation controls in such a way that you only write the validation once and it validates using both javascript on the client and whatever language on the server side.

However, the multi-layer approach we currently use has it’s problems too.  Primary among them is that most programmers are confused about how much code belongs in the presentation layer and how much belongs in the business layer, or even the data layer.  I’m afraid that with the advent of LINQ, this line is going to blur even more.

At this point, I have to agree with Rick’s assessment that MVC for the web and for ASP.NET specifically may not be the appropriate band aid for our current problems.  It will be interesting to see what the Microsoft gang cooks up.  Will we be able to use MVC and get true separation?  Or will using MVC just muddy the waters even more?  Let’s hope the gang at Microsoft gets the answer to this one right prior to forcing us to use it.

MVC for ASP.NET

Technorati Tags: ,

del.icio.us Tags: ,

Related Post

Leave a Reply

Comment Policy:

  • You must verify your comment by responding to the automated email that is sent to your email address. Unverified comments will never show.Leave a good comment that adds to the conversation and I'll leave your link in.
  • Leave me pure spam and I'll delete it.
  • Leave a general comment and I'll remove the link but keep the comment.

Notify me of followup comments via e-mail

Bear