File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Sequence diagram question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Sequence diagram question" Watch "Sequence diagram question" New topic

Sequence diagram question

Shogo Ito

Joined: Jun 10, 2004
Posts: 25
Which is correct message interaction in a sequence diagram when a user fills a form and submits?

Customer ---> Controller ---> ....
Customer ---> JSP ---> Contoroller ---> ...


Josep Andreas
Ranch Hand

Joined: Jan 09, 2005
Posts: 90
In Cade's Guide they start with Customer->JSP.
This should be safest. But I have seen other examples where they start with Customer->Controller.
Bil Bob
Ranch Hand

Joined: Dec 24, 2004
Posts: 36
I would recommend you research/think about why they would be in either order

Think about how can you access controller without JSP. and v/versa

SCJP, SCWCD, SCBCD, almost SCEA<br />... and a real developer too ;)
Josep Andreas
Ranch Hand

Joined: Jan 09, 2005
Posts: 90
I assume that you mean:
A) Start with a jsp if you are using model1 architecture for your web-tier
B) Start with a controller if you are using model2 for your web-tier
C) Start with a JSP if you are using Model2 with 'JSP Front Strategy'

But isn't it always a JSP post/get that triggers the controller?
Isn't it a mather of abstraction whether you show or don't show the initial JSP.
In Cade's Guide 8-12/8-13 in the sequence diagram they start with the JSP and in the Collaboration diagram they start with the controller.
what do you think?

Another post on this subject:

Thanks for your response.
[ January 25, 2005: Message edited by: Josep Andreas ]
Shogo Ito

Joined: Jun 10, 2004
Posts: 25
Thanks for providing your thoughts.
Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 446

I am also following JSP-->Controller.

The way I have depicted is that I am showing JSP as a stereotype and actual object is a screen.

So Screen SearchXXX (of stereotype JSP) posts a request, which gets routed via FrontController ....

John Alden

Joined: Jan 09, 2004
Posts: 7
This is confusing to me. It isn't the JSP that calls the controller but rather the browser. I was thinking of the following:

Browser makes HTTP request to controller; Controller does it's work and forwards the request to JSP; JSP produces HTML and sends HTTP response back to browser.

Browser ---> Controller
Controller ---> JSP
JSP ---> Browser

I know Cade did this differently but he doesn't show forwarding to a JSP to produce the output for the browser.
subject: Sequence diagram question
jQuery in Action, 3rd edition