Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FacesServlet in a sequence / class diagrams

 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 1:

In general, would we include the FacesServlet in a sequence diagram? I'm showing it in the class diagram, but in the
sequence diagram if we DO should it, how do we get back to the JSF view from the Managed bean?

E.g
Step 1: JSP --> FacesServlert --> ManagedBean --> etc
Step 2: JSP <-- FacesServlert <-- ManagedBean <-- etc

-- OR --

Step 2: JSP <-- ManagedBean <-- etc (skips FacesServlet)

Would the Managed bean return the result back to the FacesServlet, or would it go straight back to the JSP / JSF view?


Question 2:

Also in reality, the JSF page has a dependency on the ManagedBean (e.g. when we say #{MyBean.myMethod} in JSF). So the class diagram would need to show a dependency between the JSF page and the Managed bean, as well as the JSF page with the FacesServlet. Like so:



Correct?
 
Rajan Choudhary
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We all know the flow of any MVC frameworks. We all want to make it very clear to the examiner with good intentions but unfortunately, we can't draw all the stuff in sequence diagram as we need to keep them clean and focused on the business we want to show to the examiner. I thought a lot about it. Initially, I had shown FacesServlet in small sequence diagrams but then once I moved to real business, diagrams got cluttered, I myself didn't like them so I decided to take the FacesServlet totally out. Instead, added a nice note, saying this is how MVC works and I do not want to show Controller for clarity of the diagram. I did similar thing with JPA as well in couple of places where the diagrams were uncontrollable. Let's make this decision guys, we are architects even if the exam is not cleared. -
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic