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

后端 未结 9 998
甜味超标
甜味超标 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

    I believe you can only feel the difference after you've been in a big project and seen how much mess WebForms approach could cause.

    When you've seen a page contains multiple components, user controls, some of them living independent lives like hiding/showing or enabling/disabling themselves, all these rules passing through multiple control layers which cannot be traced until you've been in a project for many long years (or at least have smoked something reeealy good before diving in with the debugger :) ), you begin to appreciate the possibility for a clearly defined flow of control when you see how your data defines what components with what properties are rendered on a page.

    I've also loved WebForms for a long time. I also disliked first few weeks/months MVC for exactly same reasons you put forth. After I've done some coding and could compare the experience, I began to enjoy MVC.

    Still, there are some areas where MVC approach would be much more complicated and create more mess than WebForms would.

    It'll come with time. Not really a long time. :)

提交回复
热议问题