At the application control level, web frameworks can be divided into two classes. While action-based web frameworks consistently display the HTTP-related request-response pattern, it is abstracted in component-based web frameworks.
Action-based web frameworks: when it comes to action-based frameworks, the controller serves as a central instance that accepts client requests, validates them, and triggers a suitable action. For each possible action, the app developer must first create a software object that contains the appropriate application logic. This can usually be derived from abstract classes. If the action has been executed, the controller updates the data model and forwards the result to the view, which in turn creates the response and sends it back to the client.
Action-based web frameworks lean strongly towards the MVC pattern and are also referred to as request-based because of the request-response pattern’s strict implementation. Classic representatives are:
Since the possible actions of an action-based web framework are defined in detail by the app developer, it is referred to as a white box approach. This provides developers with great freedom, but requires a deeper understanding of the web framework since developers are responsible for creating HTML, CSS, and JavaScript.
Component-based web frameworks: unlike the action-driven approach, component-driven web frameworks abstract the HTTP-related request-response pattern by looking at the user interface of a web application as a collection of components. For each of these components, which are linked to software objects on the server side, specific reactions are defined during the development of the web application. These follow events triggered by a user interaction with the component. This is why event-controlled web frameworks are mentioned. Classic representatives are:
The basic idea behind the component-based approach is to group related actions together. For example, the component, AccountController, represents actions such as login, logout, or getAccount. A software object can therefore be responsible for several actions. Component-based web frameworks typically provide a large selection of reusable components that conceal details of the underlying request-response pattern from the app developer. In this context, this is known as a black box. Web frameworks of this type are therefore suitable for developers, who primarily want to rely on predefined components. Those that want more freedom regarding HTTP, HTML, CSS, and JavaScript are better off with an action-based web framework.