Steven Benitez wrote: > I said: >> I prefer strong decoupling between layers; accessing Servlet spec artifacts >> smells. > [...] wouldn't the servlet API and Struts actions be considered controllers?
I think my view of an S2 action is that it's more of a command handler, coincidentally called most often from the web layer. By the time my actions are hit I don't want to care about the web any more. I only want to care about the data I'm taking in, and the data I'm spitting out. If I need to pre- or post-process something in that process I feel like I'm probably either doing it wrong, or I need to extract logic even further, or I should use an interceptor if it's across the app (things like etags or consistent data munging fall into this category, and I generally use interceptors and configuration for that), etc. I should note that I tend to not use the S2 annotations at all ever, which may color this discussion somewhat. I find them intrusive and ugly, and prefer either convention, or XML, precisely because I want to separate (even if only in my head) what they're doing vs. the nature of how data gets in and out. YMMV, and I realize I may be a tiny minority here. d. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
