-
1. Re: Seam promote bad design?
pbakker Nov 29, 2006 4:37 AM (in response to guanwh)To my opinion this is a pretty standard way of using JSF, so it's quite logical to map the same examples to Seam.
I do agree that it's not the best seperation of concerns, but on the other hand it works pretty well like this.
Specially for smaller applications I see no good reasons to do differently. -
2. Re: Seam promote bad design?
pmuir Nov 29, 2006 4:46 AM (in response to guanwh)You can provide more separation by returning a logical outcome from the action method and mapping that to a view from a naviation rule in faces-config.xml. IMO this provides the necessary split between business logic and navigation.
I guess the Seam examples return view-ids directly as it makes the example more readable (one less place to look). -
3. Re: Seam promote bad design?
evdelst Nov 29, 2006 5:09 AM (in response to guanwh)I use pageflows for the navigation, the beans don't contain any navigation and I call the action methods using expressions in the flow.
In the views, the buttons return the transitions to use.
It is a pretty clean seperation I think. -
4. Re: Seam promote bad design?
ellenzhao Nov 29, 2006 7:18 AM (in response to guanwh)Seam + jpdl pageflow really separate concerns very cleanly. You may want to have a look at the number guess example. There's pure business logic in the action class. Another example is DVD store, the newuser flow and the checkout flow.
-
5. Re: Seam promote bad design?
guanwh Nov 29, 2006 1:39 PM (in response to guanwh)"ellenzhao" wrote:
Seam + jpdl pageflow really separate concerns very cleanly. You may want to have a look at the number guess example. There's pure business logic in the action class. Another example is DVD store, the newuser flow and the checkout flow.
Thanks, I will look at the examples you mentioned. Another newbie question, can the statefull action or stateless action's interface be remote, so that all the ejb module located on a separate physical machine? does anyone manage to do this?