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.