IMHO, we need to rethink why we are creating so many layers and what those layers are
abstracting for us.
If you are using actions then you are using JSF, since "action" is a JSF
concept. It can be argued that JSF already provides view separation through ViewHandlers
and RenderKits.
The usual return type from an action is a String, which is not view-specific at all. Look
closely. There is no web code in the action class. It just returns a String that
indicates a state change for the client view. Isn't that a perfect way to hit the
business layer? Hit the black box and then tell me if my view state needs to change.
In J2EE 1.4, you wanted to carefully make sure that you didn't pass things like
HttpSession or ServletRequest objects into an EJB. With Seam/JSF, you generally don't
have that problem. It's actually a bit hard to pollute your EJB with view-specific
stuff like that.
Part of the beauty of Seam is that you don't have to write those ugly business proxies
that translate from the web layer to the business layer. I say good riddance to that
junk. It just made J2EE into a clumsy mess.
So yes, it feels like you are doing something wrong because you aren't building layers
all over the place. In reality, Seam and JSF are taking care of that for you. That's
exactly what frameworks ought to do.
Stan
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966156#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...