Are ASP.Net Webforms and ASP.Net MVC component-based or action-based?
Asked Answered
S

2

7

I come from a JavaEE background and I am investigating what web frameworks exist in Java and .Net. As far as Java is concerned, I have found this talk by Matt Raible.

One of the categorizations he makes among frameworks is that some of them are action-based and some of them are component-based. The former are stateless and focus on the action to be performed per request and the generation of the report, while the latter are stateful and retain a server-side representation of their web interface components.

As expected, component-based web frameworks usually come with their own components or 3rd party component libraries (in addition to their own components, JSF has Richfaces, Icefaces, ... and GWT has ExtGWT, SmartGWT, ...). In order to provide rich interfaces with action-based frameworks, the developer must use either a JS component library or Flex etc.

As the advantages and drawbacks for each of these categories make sense to me, I would like to know if this categorization is applicable to .Net frameworks as well. As far as I could find, both ASP.Net MVC and ASP.Net Webforms are stateless, but Webforms has a mechanism called Viewstate, which can be configured to save and retrieve state from hidden fields, Session, etc. However, I could find no server-side representation of components.

So, are ASP.Net MVC and ASP.Net Webforms component-based or action-based?

Serena answered 10/5, 2011 at 12:45 Comment(0)
B
4

By your description it sounds to me like Webforms would be component based and MVC would be action based.

Webforms tried to bridge the gap between desktop programming and web programming by providing a way to persist state across actions and use an evented model of programming.

Whereas MVC is more of a framework for web developers instead of desktop programmer, where you will be focusing on actions and REST verbs and using JavaScript directly.

Hope this helps!

Backstroke answered 10/5, 2011 at 13:18 Comment(0)
V
2

MVC is definatly Action based.

Webforms is component(Control) based.

Vehicle answered 10/5, 2011 at 13:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.