wood burning stoves 2.0*
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


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

Sequence diagram question

Shogo Ito
Greenhorn

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 ---> ...

Thanks!
Shogo


<i>SCJP, SCWCD, SCEA</i>
Josep Andreas
Ranch Hand

Joined: Jan 09, 2005
Posts: 90
Shogo,
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.
regards,
J
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
Bil,
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:
http://www.coderanch.com/t/152845/java-Architect-SCEA/certification/Omit-JSP-sequence-diagram

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

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

Joined: Feb 13, 2004
Posts: 443
Josep,

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 ....

regards,
Deepak
John Alden
Greenhorn

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sequence diagram question