• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

sequence diagrams for web and java client ?

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on the assignment part 2 and have a question for the sequence diagrams. do I need to create two sequence diagrams one for web users and the other for swing users ? here, the swing users are travel agents. thanks
 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Tony,

Originally posted by tony clare:
do I need to create two sequence diagrams one for web users and the other for swing users ?


Are the sequence diagrams for both totaly equal? Then one diagram could be sufficient, used by a double-roled "...OrAgent" actor.

However, I divided them, i.e. constructed two nearly trivial 10 second diagrams for both and generalized as much as possible common behaviour to a third common sequence diagram. This is automaticaly a great preparation for the component diagram(s) that many get in trouble with later.

In UML 2.0 you can reference the third one using the ref keyword (you may want to use the Search link of this forum for details).

Thomas
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suggest you include sequence diagrams for both swing and application client. I scored very low and i feel one of the reason is i never showed swing clients in my sequence diagrams.
 
tony clare
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
quote:
----------------------------------------------
Are the sequence diagrams for both totaly equal? Then one diagram could be sufficient, used by a double-roled "...OrAgent" actor.
----------------------------------------------
Not 100% equal since the sequence for web users includes the servlets in web tier, and the sequence for Swing users doesn't includes the servlets.
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If both the Web and Swing components are using same business logic why cant we have a generic Actor called UI, which initiates business logic and shows flow from there. by this I guess we think in terms of genralizing the business functionality and put more effort in code reuse.

We can draw seperate sequence diagrams for Swing and Web application.
In these diagram for the business part logic we would refer to the above sequence diagrams.

Do you see any downfall for this approach?
 
Thomas Taeger
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Saritha ventrapragada:
If both the Web and Swing components are using same business logic why cant we have a generic Actor called UI, ...


Even if we had such a "generic Actor called UI" or "double-roled '...OrAgent' actor": As Tony Clare noted the sequence diagrams for both are "not 100% equal since the sequence for web users includes the servlets in web tier, and the sequence for Swing users doesn't includes the servlets." - and other controllers for the Swing GUI.


Originally posted by Saritha ventrapragada:
... generic Actor called UI, which initiates business logic


An actor should not (at least not directly) initiate any business logic, not for technical but for design pattern reasons. The needed conjunction is a web-server-side frontcontroller/helper and a client-side GUI/Swing controller/model.

These then can re-use the same common logic proposed by you.


Originally posted by Saritha ventrapragada:
We can draw seperate sequence diagrams for Swing and Web application.
In these diagram for the business part logic we would refer to the above sequence diagrams.


If you mean Swing and Web sequence diagrams referencing the same common logic sequence diagram: Yes.

And this common logic sequence diagram then can refer to a common app server logic sequence diagram.

Thomas
 
tony clare
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
by using reference, I understand there are 3 sequence diagrams for each use case: web client, swing client and a common shared EBJ tier. Right ?
 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Thomas Taeger:

An actor should not (at least not directly) initiate any business logic, not for technical but for design pattern reasons. The needed conjunction is a web-server-side frontcontroller/helper and a client-side GUI/Swing controller/model.



I am sorry. What are the design pattern reasons that will not recommend doing something like this.

I am thinking of n tier application.

[WebUI]/[Swing UI] ---- Front Controller(POJO that initiates business logic) ---- business classes --- DAO classes

Sequence diagrams:
1. have a sequence diagram that shows logic from Front controller till DAO.
2. Sequence diagram that show web UI flow (which includes actors (can be users/other application), servlets)
3. Sequence diagram that show flow for Swing UI (which includes controllers and models)
 
tony clare
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The common architecture are:
[WebUI] ---- Front Controller ---- business classes --- DAO classes
[Swing UI]------------------------------^

But you dont' want to lose Front Controller logic in the sequence diagram by drawing a single diagram including [a common UI] --- business --- DAO only.
 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am sorry I should not be using terms loosely.

Actually I was thinking of one more layer of POJO classes (like facade classes) between UI components and business classes that would get requests from either WEB UI or Swing UI. The logic from there will be same for both Web and Swing UI requests, which can be shown in one sequence diagram.

These classes will have logic for JNDI look up and so on..
 
Thomas Taeger
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by tony clare:
by using reference, I understand there are 3 sequence diagrams for each use case: web client, swing client and a common shared EBJ tier. Right ?


I see a fourth between the two client types and the "common shared EBJ tier": A sequence diagram generalizing common behaviour of the two client sequence diagrams and then referencing the app server sequence diagram ("common shared EBJ tier"). It is not a must, ok, but it reduces redundant parts of the client sequence diagrams, like fetching values from the model/helper, looking up the EJB, delegating business methods to the app server, ...

Thomas
[ June 28, 2006: Message edited by: Thomas Taeger ]
 
Thomas Taeger
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Saritha ventrapragada:
Actually I was thinking of one more layer of POJO classes (like facade classes) ...


Ok. That is what I would call the Session Facade pattern between, regardless of wether POJO or Session EJB implementation.

Thomas
 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great...
We all are on same page now..
 
reply
    Bookmark Topic Watch Topic
  • New Topic