2. Agenda
• ASP.net Web form vs MVC Pros
• ASP.net Web form vs MVC Cons
• Compare the run-time stack for Web Forms and ASP.NET MVC.
• When to use ASP.net WebForm or MVC ?
3. Pros
ASP.NET MVC ASP.NET WebForms
Provides fine control over rendered HTML. Provides very good RAD development capabilities.
Cleaner generated HTML. Great designer support in VS.
Superior separation between UI and code. Ease of development for data-heavy LOB applications.
Easier to unit test. Very rich control libraries and third party vendor
support.
Can support multiple view engines. A familiar event-driven model when compared to
Windows Forms development, and so easy for
By default uses RESTful intefaces for URLs – so better SEO. developers to pick up.
No ViewState (this may also be a weakness).
Typecal size of page is small.
Easy integration with frameworks like JQuery.
4. Cons
ASP.NET MVC ASP.NET WebForms
Not event driven, so maybe difficult for people UI logic coupled with the code, and thus is hard
who know only ASP.net Webforms to wrap to separate.
their minds around it.
Third party control library support is not that Harder to unit test, so difficult to employ TDD.
strong.
No ViewState(this is also a strength). Heavy page sizes due to view state
management.
5. Compare the run-time stack for Web Forms and ASP.NET MVC.
As long as the view
engine is based on Web
Forms, the view is an
ASPX file with a regular
code-behind class
where you can handle
classic events such as
Init, Load, PreRender,
plus control-specific
events such as
RowDataBound for a
GridView control.
8. Develop web application
Considering
TDD ?
No
Heavy Data Yes
driven
application
No
ASP.NET MVC ASP.NET WebForm
9. Develop web application
Considering
TDD ?
No
Need
WinForms like Yes
programming
Heavy Data interface
driven
application
No
ASP.NET MVC ASP.NET WebForm
10. Develop web application
Considering
TDD ?
No
Need
WinForms like
programming
Heavy Data interface No Need RAD
driven
Development
application
Yes
ASP.NET MVC ASP.NET WebForm
11. Develop web application
Considering
TDD ?
No
Need Need fine
WinForms like control on
programming Yes html and
Heavy Data interface separation
Need RAD between html
driven
Development and code
application
No
ASP.NET MVC ASP.NET WebForm