Hello,
i just posted on the myfaces mailing list on jsf application design and package
structure
The most people the use this approach:
1)
The managed bean (seam component) contains the action methods for itself
(explanation "course they are tied together")
I noticed the seam example applications use a different approach
2)
The managed bean(seam component) is a pojo (maybe also an entity bean) and the
Actions for it are seperated in 2 files - an interfaces marked local and the
implementation for it
To show some code to show the different approaches, i choose the seam
registration example
Approach 1)
| public class User implements Serializable {
| //properties
|
| //action method
| public String register();
| }
|
---------------------------------------------------------
Approach 2)
| public class User implements Serializable {
| //properties
| }
|
| @Local
| public interface Register
| {
| //action method
| public String register();
| }
|
| public class RegisterAction implements Register
| {
| //action method implementation
| public String register()
| {
|
| }
|
| }
|
So what approach should i choose (currently using approach2 but thinking about
switching to 1)
Are there any technical drawback on approach 1) ?
Thank your very much for your help , its a very important decision i have to
make(also influences the package structure).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991489#3991489
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991489
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user