Joined: 11 May 2007
|Posted: Fri May 11, 2007 4:14 am Post subject: Struts 1.x - Single or Multiple Action Classes
Which is a better way - whether to use single action class to control flow of the whole application or have multiple actions for each form?
I know its a debatable question but I need answer urgently. My applicaton contains approx 100 pages. Now we have two options -
1. Have single action class extending DispatchAction, provide generic methods to handle requests from multiple pages
2. As standard practice, use multiple actions for different pages even though the functionality is almost same, i.e., List > Add/Edit > Save
I have mainly used 2nd option in my earlier projects but now design team wants to try option one for which they have developed a framework using Factory design pattern. But I'm not not sure how the application will behave when multi-user access gonna the site.
User base is not very large but keeping in mind that in Struts 1.x, there is only 1 instance of action class to handle all requests, I'm not very sure whether this is a right & roboust solution.
Any help, especially from designing n performance point of view would be highly appreciated.