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?
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.
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.
The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller.
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.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With