Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 767
Markos Fragkakis Avatar asked May 10 '11 12:05

Markos Fragkakis


People also ask

What's the difference between ASP.NET MVC and ASP.NET Web Forms?

Asp.Net Web Form has built-in data controls and best for rapid development with powerful data access. Asp.Net MVC is lightweight, provide full control over markup and support many features that allow fast & agile development. Hence it is best for developing an interactive web application with the latest web standards.

Is ASP.NET and ASP.NET Web Forms the same?

ASP.NET Web Forms is a part of the ASP.NET web application framework and is included with Visual Studio. It is one of the four programming models you can use to create ASP.NET web applications, the others are ASP.NET MVC, ASP.NET Web Pages, and ASP.NET Single Page Applications.

What are the 3 main components of an ASP.NET MVC application?

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

Is ASP.NET is MVC?

ASP.NET MVC is a web application framework developed by Microsoft that implements the model–view–controller (MVC) pattern. It is no longer in active development. It is open-source software, apart from the ASP.NET Web Forms component, which is proprietary.


1 Answers

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!

like image 95
Jimmy Avatar answered Sep 30 '22 11:09

Jimmy