• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FacesServlet in class diagrams ?

 
Mike Degteariov
Ranch Hand
Posts: 145
8
Java Mac MySQL Database Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,

Should we show FacesServlet and dependencies to/from it in a class diagram ?

Cade and Sheil's book example shows that all JSPs depend on controller, and the controller depends on @Stateless managers.
Same approach is employed in Amritendu De's book example - JSFs depend on FacesServlet, and it depends on beans.

However, I am not sure I understand why JSFs depend on FacesServlet, and not on backing beans. After all, FacesServlet must comply to JSF spec, how can it possibly change and break the dependency ?
Also, I think everyone should agree that FacesServlet does not, and should not, depend on backing beans.

Contrary to it, JSFs definitely depend on backing beans. Just change the signature of the method of the backing bean used by JSF, or change the bean name in the annotation -- and JSF will stop working.

I fully understand that JSF do not call backing bean directly, but neither do all session beans when they call other session beans.
I think that it is probably more important to show how JSFs depend on backing beans, more specifically, which JSFs use which backing beans, rather than to show to examiner that I know what MVC is.

I would appreciate if those of you who used JSFs in their solution would provide your input.
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF pages submit to the FacesServlet and the FacesServlet uses the backing beans to handle the request. So it is valid to say that JSF pages depend on the FacesServlet and the FacesServlet depends on backing the beans.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic