Freigeben über


ASP.NET MVC For Aspiring Architects - #1

 Alik Levin    Is ASP.NET MVC more than just new cool technology? What advantages it brings over ASP.NET Web Forms? When should I use ASP.NET MVC and when ASP.NET Web Forms? How do I MVC this and MVC that?

Resources

This the first post in series of posts that should help me as an architect to answer these questions. It is based on and digested from ASP.NET MVC Overview.

ASP.NET MVC Overview

The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller.

  • Models. Model objects are the parts of the application that implement the logic for the application's data domain.
  • Views. Views are the components that display the application's user interface (UI).
  • Controllers. Controllers are the components that handle user interaction, work with the model, and ultimately select a view to render that displays UI.

Advantages of an MVC-Based Web Application

  • It makes it easier to manage complexity by dividing an application into the model, the view, and the controller.
  • It does not use view state or server-based forms.
  • It uses a Front Controller pattern that processes Web application requests through a single controller.
  • It provides better support for test-driven development (TDD).
  • It works well for Web applications that are supported by large teams of developers and Web designers who need a high degree of control over the application behavior.

Advantages of a Web Forms-Based Web Application

  • It supports an event model that preserves state over HTTP, which benefits line-of-business Web application development.
  • It uses a Page Controller pattern that adds functionality to individual pages.
  • It uses view state or server-based forms.
  • It works well for small teams of Web developers and designers who want to take advantage of the large number of components available for rapid application development.
  • In general, it is less complex for application development, because the components (the Page class, controls, and so on) are tightly integrated and usually require less code than the MVC model.

Related Materials

This post is made with PracticeThis.com plugin for Windows Live Writer

Comments

  • Anonymous
    March 31, 2009
    Thank you for submitting this cool story - Trackback from DotNetShoutout
  • Anonymous
    May 09, 2009
    所谓MVC,其实就是M、V、C而已。归根揭底,MVC是一种表现模式,是一种软件架构模式。其中有几个重要的概念: M,Model, 引用系统数据,管理系统功能并通知View更改用户操作。 V,View,就是用户接口,用于显示数据。 C,Controller ,将用户操作映射到Model,并操作视图。 R,Routing ,MVC的奥秘在于通过Routing实现了对URL的路由选择,完成了上述3个基本概念的基础逻辑。