Choosing Web Forms or MVC

The ASP.NET web application framework provides different programming models that you can use to create web-based applications.

Web Forms

Web Forms are written using a combination of HTML, server controls, and server code. When users request a page, it is compiled and executed on the server, and then it generates the HTML markup that the browser can render.

Using Visual Studio, you can create ASP.NET Web Forms using a powerful IDE. For example, this enables you to drag and drop server controls to lay out your Web Forms page. You can, then, easily set properties, methods, and events for controls or for the page in order to define the page's behavior, look and feel, and so on.

To write server code to handle the logic for the page, you use C#; however, since Web Forms omit the details of HTML, it can be more difficult to use for developers who want to control more of the details of the web page design. Using client-side technologies such as JavaScript can also be more difficult.

For more information on Web Forms, refer to http://www.asp.net/web-forms.

Model-View-Controller (MVC)

Model-View-Controller (MVC) is a popular design pattern that helps cope with application complexity by separating major functionality into the following customizable and flexible components:

MVC is a better choice for developers who want:

For more information on MVC, refer to http://www.asp.net/mvc. In particular, search for the topic “Recommended Resources for MVC” for several useful links.