Difference between Action and DispatchAction classes.1. Grouping related actions into one class is possible using DispatchAction class. But in Action class a group related action into one class is not possible. Several changes need to be done, when one plans to group the related action using Action class.
2. Action class is used to perform single functionality. To perform multiple functionalities, we need to write an additional Action class.
3. The complexity rises if Action class is used for multiple functionalities, whereas by using DispatchAction, the code complexity will noticeably be reduced.
4. An Action class acts as a controller and is an adapter class between the web tier and the business tier.
5. Dispatch class is used to combine the related operations, thus share the common resources, helper classes for instance.
6. An Action is invoked by the ActionServlet to perform an operation that is depending on the URL request.
7. A DispatchAction selects a method depending on the value of the request parameter that is configured in the xml file.
|