-
Website
http://www.emadibrahim.com -
Original page
http://www.emadibrahim.com/2008/09/07/deciding-between-aspnet-mvc-and-webforms/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
danatkinson
1 comment · 1 points
-
Korayem
3 comments · 1 points
-
dukon21
1 comment · 1 points
-
Mladen Mihajlovic
1 comment · 1 points
-
Chad Myers
3 comments · 1 points
-
-
Popular Threads
So the port previous to this one RAD! is much coverring for faster development that will include such data driven scenarios.
That was just my idea. I see the 3rd node is a bit confusing.
You can pretty much create a sortable, pageable and editable grid in webforms by simply dragging a table from your database into your webform...
Need to use a flowchart to decide which approach to use?
No:
Great, you seem qualified to be the lead on this project
Yes:
Best stick to whichever methodology you know best
Seriously though, maybe these would just be better as a small list of pros and cons for each approach, leaving it to the readers good sense to decide what to do with that information
But I do also have a list of "strengths" of both frameworks... Do you have other suggestions or anything else that you think should be in the list below?
MVC Strengths
1. Absolute control over rendered HTML
2. No ViewState
3. No PostBack
4. Clean separation of responsibility (Model, View, Controller)
5. Better suited for TDD
6. Steeper learning curve (might depend on your background)
Web Forms Strengths
1. Better suited for Rapid Application Development (RAD)
2. A plethora of third party controls and tools
3. Better integration with the IDE (Visual Studio 2008)
4. Abstraction of low level layers (HTML, CSS, JavaScript)
If you do decide you want to deviate from the well trodden path then I find that the amount of code that is required to perform simple tasks (if done in MVC) can seem disproportionate.
For example to add a hidden field per row in a repeater and bind a value to it requires the on_row_databinding (close?) to be used and the control found in the control tree before a value can be assigned to it. Some things just feel more complex than they need to be if you understand the what is really happening behind the webforms facade
http://www.strong-point.com/Blogs/tabid/87/Entr...
http://www.strong-point.com/Blogs/tabid/87/Entr...
http://pro-thoughts.blogspot.com/2008/09/custom...
Anyway, for cleaner generated HTML there are workarounds to (partially) achieve this with Web forms as well, such as the ASP.NET 2.0 CSS Friendly Control adapters ( http://www.asp.net/CssAdapters/ ). I just installed them a few days ago and they seem to work great.
As you are a visual person, please see if that makes things clearer for the normal guy.
Cheers.
There are even client-side validation frameworks for ASP.NET MVC (xVal for instance). So lots of form validation would actually be a reason to use MVC.