ASP.NET MVC > ASP.NET WebForms, Why?

后端 未结 9 970
甜味超标
甜味超标 2021-02-01 08:25

I\'ve now completed my first web application using ASP.NET MVC and overall, I still am not grasping why this is getting all the praise and glory. Maybe I\'m being stubborn. I k

相关标签:
9条回答
  • 2021-02-01 09:18

    Of course a simple example is going to be very clear and readable no matter how you do it. Supposedly, MVC's advantage becomes more apparent as you scale up the complexity.

    Also, it turns out that the webforms model just isn't that great for high-volume public internet sites. ViewState plus the expensive page life cycle in a normal web forms site can make scalability a challenge (not impossible, but challenging). By contrast, on an intranet site users generally have much greater upstream bandwidth (ViewState works better) and volume is much better controlled. So webforms really works great there.

    0 讨论(0)
  • 2021-02-01 09:21

    I'm also taking a wait-and-see attitude about ASP.NET MVC (along with the Entity framework and WPF for diff reasons). I'm a huge fan of MVC in general but am a little concerned about wrapping something as general purpose as a web development framework into the constraints of one pattern. A very useful pattern but still only 1 of many.

    A skilled developer can implement MVC in practically any language. So MVC may be a great way to prevent less-skilled developers (we're all this at some point, like when just learning a framework) from making egregious mistakes. Since the pattern works well in a wide range of scenarios that could make it a net benefit.

    On the other hand, for expert developers it may turn out to be like training wheels on an olympic cyclist... Redundant and more of a pain than a boon.

    0 讨论(0)
  • 2021-02-01 09:21

    I think it very much depends upon your background. If you're already familiar with something like Ruby-rails and/or Django, asp.net mvc makes much more sense.

    Also if you have been doing websites in Html and css for a long time, Mvc is much better as you have full control over your html output.

    If you're comfortable with asp.net just keep using that, it's not going away :).

    0 讨论(0)
提交回复
热议问题