File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes JSP in Sequence Diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "JSP in Sequence Diagram" Watch "JSP in Sequence Diagram" New topic
Author

JSP in Sequence Diagram

Chih-Wei Lee
Ranch Hand

Joined: Feb 20, 2008
Posts: 129
Hi:
I am working on sequence diagram and want to know
how to show JSP in sequence diagram.
Because it doesn't have a class name so how do I present JSP in sequence diagram?
Use a Lifeline Actor or a simple Lifeline?

Best,


SCEA, SCJD, SCDJWS, SCWCD, SCJP
Chih-Wei Lee
Ranch Hand

Joined: Feb 20, 2008
Posts: 129
Another question is how do I show the JSP navigation in sequence diagram?
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Chih-Wei Lee wrote:Another question is how do I show the JSP navigation in sequence diagram?


Would that not be stepping over the bounds of what an application architect should be doing? I'm wondering if that's not a little too fine grained.

Chih-Wei Lee
Ranch Hand

Joined: Feb 20, 2008
Posts: 129
The assignment requires to show JSP in component diagram. I think that means you need to have entire flow designed including the JSP page.
If there is no JSP in sequence diagram then no one calls controller. Also it's hard to know if your controller design is correct without JSP.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

You certainly need to show an actor issuing commands to a front controller.

The idea of creating a wire diagram for the JSF pages is way off, in my humble opinion. The job of an application architect is not to design a user-interface, or for that matter, paint the user interface designers into a box.

The UI design should easily be put together using facelets, or JSPs, or whatever, without impacting the integrity of the designs provided by the application architect.

That's my opinion and experience. Dont' hesitate to disagree.

"you need to have entire flow designed including the JSP page"

Perhaps I'm reading too much into what you mean by 'entire flow?'

-Cameron McKenzie

guru prasanth
Ranch Hand

Joined: Aug 20, 2009
Posts: 96
Let's take a case.I have my flow like this.JSP/JSF -->Controller-->Controller --> Business Delegate-->Session Facade-->Session Bean-->Entitty Bean

Now in sequence diagram my JSP/JSP become actor.And it would give me complete flow.This is how i would approach it.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

That's exactly the way I see it, Guru. That's the extend of my "JSP" in a sequence diagram, and to be honest, I never actually use "JSP", but instead, just refer to an 'actor'. The input page being a HTML page, JSP page, facelet page if you're using JSF 2.0, or even a servlet, isn't important, and in my opinion, might be too rigid, forcing the developer into a box. What's important is that an actor issues a command - the artifiact used to generate the UI that issues the command isn't relevant to the sequence.

JSP/JSF -->Controller-->Controller --> Business Delegate-->Session Facade-->Session Bean-->Entitty Bean

To be a jerk and overly critical, I might even say that the JSP/JSF reference is awkward, and demonstrates how using JSP/JSF/Facelet here instead of just identifying the actor is awkward.

To be even more persnikity, I might question the use of a Business Delegate and an "Entity Bean" in a JEE5 application. Entity Beans don't really exist anymore, and the need for a business delegate has been greatly diminished with JEE5. And don't even get me started about calling the controller twice!!!

BTW, re-reading my last few posts, I'm sounding like a 'know it all.' This is just my opinion, and how I approach the issue. I could very well be wrong.

rana izzat
Greenhorn

Joined: Jan 20, 2010
Posts: 20

Hi,

Is there anything wrong in this approach of object interactions in Sequence diagram?
User-->Controller-->Backing Bean-->Business Delegate-->Session Bean-->Service class-->JPA Entity

Can I move the business logic to 'Service' class from 'EJB' class? Any advantage in keeping business logic in 'EJB' as enterprise component rather than delegating to business service class?

Kindly answer. I don't think I am violating the forum rules & regulations.

-rana izzat
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

What is the purpose of the Business Delegate in the EJB3.0 world? And I'd also wonder if your session bean is any different from your service class. In EJB 3.0, the service class is the session bean, because it just gets annotated. Are they two different things? If so, why?
rana izzat
Greenhorn

Joined: Jan 20, 2010
Posts: 20
dear Cameran,

Having thought of implementing "application service" pattern( in exam point of view), I tried to use additional layer "Business service" with session bean. I agree with you this is not right candidate in usage of patterns.

Regarding Business Delegate in ejb 3, Dependency Injection is remove the JNDI with service locator in Business delegate class.Since remote exceptions are unchecked in ejb 3, some decoupling is required between business and presentation tier. Can annotated session beans remove this tight coupling & override the responsibility of business delegate?

Can you please give more clear picture on this or share reference documents?

Thanks.

-rana
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP in Sequence Diagram
 
Similar Threads
sequence diagram question
Clarification on UML Sequence Diagram element.
Is it necessary to draw the picture of jsp for part II?
Using classifier in the sequence diagram
Condition (if-else) in Sequence diagram