• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FacesServlet in class diagrams ?

 
Ranch Hand
Posts: 145
8
Mac MySQL Database Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic