Oct 31, 2008

View is the king.

ASP.NET MVC is very hot today, it catches more and more attention from asp.net developer. There are many problems it tries to solve, like testability, separation of concern ect. But to me the most important think it solves is the View. There are not many web 2.0 web site use asp.net to develop, but PHP is very widely used for these web site? Why? There are many reasons, but the most important reason is the View is back.

In session PC21 ASP.NET MVC: A New Framework for Building Web Applications of latest PDC 2008, an audience asked Haack, "do we need to known html?". What kind of question is that? When you love somebody, you can give of a long list of the merits of her or him. I love asp.net mvc, because it is testable, separation of concern, inversion of control. But to me, it think the force of driving mvc is the view. ASP.NET MVC put the view to the control of developer and designer. Naive developers love the server control, in fact they are spoiled to a degree to ask the question of "Do we need to know html". There is nothing wrong with from this practice, in fact asp.net page model and server control framework does encapsulate lots of html, javascript. But developers are quite limited to what the server control has to offer. Although server control is very extensible, developers need to have learn very deep to fully leverage the power of it, until we understand internal of viewstate, render control, javascript, css, we can develop our own server control. I think that is why there are many web 2.0 site is not implemented in asp.net. Now the view is back, we can fully control how the view is rendered.