Search This Blog

Monday, February 7, 2011

What is the DIfference between ASP.net MVC applications and ASP.net Normal Web Form Applications

Please refer the Document Below.

Serial Number

Parameters


ASP.net Web Forms

Asp.net MVC

1
URL's
Through page names / URL rewriting.
Through routing
programmatically set up the URL's by default this works through REST like interfaces.
2
Event driven
YES
NO
3
State full
YES
NO
4
Work Scenario
Works very well for small teams where focus is on rapid application development
Works well for large projects where focus in on testability and maintainability
5
Double Click to get action
YES
NO
6
Different view engines supported
NO
YES
7
Abstraction from html
YES
NO
8
Exact control over html
NO
YES
9
Will be able to use library of third party controls for ASP.NET
YES
Partial (no state / postback controls only)
10
Works on Linux / Mono
YES (Partially)
NO
11
Page Rendering Mechanism
Uses the ‘Page Controller’ pattern. Each page has a code-behind class that acts as a controller and is responsible for rendering the layout.
Uses the ‘Front Controller’ pattern. There is a single central controller for all pages to process web application requests and facilitates a rich routing architecture
12
Architecture & Maintainability
Uses an architecture that combines the Controller (code behind) and the View (.aspx). Thus the Controller has a dependency on the View. Due to this, testing and maintainability becomes an issue.
ASP.NET MVC enforces a "separation of concerns". The Model does not know anything about the View. The View does not know there’s a Controller. This makes MVC applications easier to test and maintain
13

Testing Capability
At its core, you ‘cannot’ test your controller without instantiating a View. There are ways to get around it using tools.
At its core, ASP.NET MVC was designed to make test-driven development easier. You ‘can’ test your Controller without instantiating a View and carry out unit-tests without having to run the controllers in an ASP.NET process.
14.
Prerequisites
Deep understanding of HTML, CSS and JavaScript is not required to a large extent since the WebForm model abstracts a lot of these details and provides automatic plumbing. While abstracting details to provide ease of use, sometimes a solution is overcomplicated, than it needs to be.
A thorough understanding of how HTML, CSS and JavaScript work together is required. The advantage is you can do a lot of jQuery and AJAX stuff in an efficient and simple manner than you would do in an ASP.NET application.
15
Time Lines
WebForms can drastically reduce time while building up intranet and internet applications that use a lot of controls (drag and drop model). Although this is true for development, a lot of time is spent later to code around limitations.
You lose the 'drag and drop' quick model of building your web applications. The focus is on control over the application behavior and test-driven development. The model is extensible and you do not have to spend time working around limitations.

No comments:

Post a Comment