aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes FacesServlet in a sequence / class diagrams Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "FacesServlet in a sequence / class diagrams" Watch "FacesServlet in a sequence / class diagrams" New topic
Author

FacesServlet in a sequence / class diagrams

Marcelo Ortega
Ranch Hand

Joined: May 31, 2005
Posts: 519

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?


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD, SCEA/OCMJEA

Live life to an interface, not an implementation!
Rajan Choudhary
Ranch Hand

Joined: Mar 17, 2011
Posts: 196
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. -
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: FacesServlet in a sequence / class diagrams