• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interceptors vs. BaseActions

 
Junilu Lacar
Bartender
Pie
Posts: 7796
62
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Been looking at the Struts Action Invocation Framework and was wondering if the Interceptors would make it unnecessary to have all your Actions extend a BaseAction. Haven't seen too many examples of how these things are used so if anybody has experiences/thoughts on this to share it would much appreciated.
Thanks!
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I don't think so. You will still want to have BaseActions to provide common functionality to your Actions. However, Interceptors are useful for declaratively tacking on orthogonal services to your application easily. It is a poor man's AOP with a very limited pointcut selection. Therefore, I don't see Interceptors replacing BaseActions any more than I see AOP replacing Inheritance.
If you are interested in Interceptors then I suggest you checkout XWork/WebWork2... it is built into the framework and they did a much better job of it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic