wood burning stoves 2.0*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes how to support multiple clients - controllers & .. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "how to support multiple clients - controllers & .." Watch "how to support multiple clients - controllers & .." New topic
Author

how to support multiple clients - controllers & ..

Rudi Vaum
Ranch Hand

Joined: May 02, 2003
Posts: 59
Hy everybody,
I was not sure how to combine patterns to make my architecture capable of supporting multiple clients.
In order to comply with a QoS reqirement, stating that users of the standalone client shall have faster
access and more availability, i thought directly connecting these clients to the ejb layer would be wise,
assuming they are in the company intranet.

Now, my first problem came as I made the uml diagrams, as I realized that I don't know where to put
the controller (I've got business delegates accessing session facade SLSBs).
Should it be all on the clients - as servlets, respectivelly some controller classes for the swing app?
Reading the pattern descriptions, I thought, there must be a way to share some of the fuctionality (and surelly code)
of the controller between the clients; after some strugle, searching and reading (thanx for your posts, girls & guys)
i just found a superbe description of what i wannted:
http://java.sun.com/blueprints/guidelines/designing_enterprise_applications/client_tier/multiple_types/index.html#1028399
beautiful MVC: part of the controller can be shared! beautiful!
Now, beeing curious, why I didn't find this before, i went to the second(current) edition of the "holly book", that i read carefully,
some time ago, and BANG!!! SURPRISE!!! the section isn't there anymore! instead, the reader is presented a link to another chapter:
section 4.4.2.2, which explains how to design THE WEB TIER to support multiple types of clients:
http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html#1078111
Thanks for your patience, to read all this, now, my questions to everyone:
1) DOES THIS MEAN, THAT DIRECTLY CONNECTING TO THE EJB LAYER, FROM A RICH CLIENT, IS NOW
BEEING "BANNED" BY THE BLUEPRINTS TEAM/SUN ? ( this equals my design is f***ed up ;-)
2) how could i comply with that QoS requirement, if i used the second approach - routing both types of
clients through the web tier? are there some (standard) strategies to follow?
greetings
Rudi
SCJP, SCEA I
zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
do you try to write a java class as webservice,that act as app client controller?it more seem like the facade.

in my project,i publish the method as webservice that provide to variable clients,because my project deal with different client type,such as vc#,vj#,vb........,till now they are working well.
Rudi Vaum
Ranch Hand

Joined: May 02, 2003
Posts: 59
no, I have Java everywhere; it's like this:
client --> business delegate --> session facade (SLSB) --> various business objects (EJBs)
the controller should be somewhere between client and BD; maybe in the client..
At present time, it is nowhere to see on my UML diags - that is bad ;-(
Rudi Vaum
Ranch Hand

Joined: May 02, 2003
Posts: 59
if I would use an existing framework for the web-tier, let's say Struts, would I still be needing a controller in the ejb layer, or could I say that the Struts controller directly uses the session facade beans through my business delegate?
zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
i think it should be the struts action class that access the ejb tier by the session facade,not the struts controller.
Rudi Vaum
Ranch Hand

Joined: May 02, 2003
Posts: 59
yes you'r right!
the user clics a button,
the request goes to the controller,
the controller checks for the xml configuration file for the appropriate action
and then it passes the parameters to the action class in form of an object;
now this action class uses a local class - a business delegate to talk to the ejb session facade;
right?
Ritu Chawla
Greenhorn

Joined: Jun 02, 2003
Posts: 14
Hi Rudi,
I saw your interesting post on Javaranch sometime back. I am in the process of completing my architect part 2 assignment. I am also facing the same dilemma regarding how to suppor multiple client types. I finally decided to use a separate controller for each client type. But now I have another issue regarding how the view has to be designed. For Browser based clients we can have JSP's handling the view, but for rich application clients, view doesn't make sense. Infact the front controller for the rich clients could handle the view by accessing data retrieved from the Business service via value objects. So if this were to be the case, then how do we depict this in our sequence/component diagrams?? do we need to show 2 different diagrams(for each client type) for each use case?
Or is it that my approach is all wrong and u have some other idea in mind. Please share some information regarding the same. If you are still in the process of working on the assignment, then we can collaborate and work towards cracking the assignment together..
Let me know your thoughts,
Regards,
Ritu.
Ritu Chawla
Greenhorn

Joined: Jun 02, 2003
Posts: 14
I am in the process of completing my architect part 2 assignment. I am also facing the same dilemma regarding how to support multiple client types. I finally decided to use a separate controller for each client type. But now I have another issue regarding how the view has to be designed. For Browser based clients we can have JSP's handling the view, but for rich application clients, view doesn't make sense. Infact the front controller for the rich clients could handle the view by accessing data retrieved from the Business service via value objects. So if this were to be the case, then how do we depict this in our sequence/component diagrams?? do we need to show 2 different diagrams(for each client type) for each use case?
Or is it that my approach is all wrong and u have some other idea in mind. Please share some information regarding the same.
:roll: People who have cracked the assignment, can you please share your thoughts on this? :roll:
Let me know your thoughts,
Regards,
Ritu.
Ritu_chawla@hotmail.com
Pamir Bahret
Greenhorn

Joined: Jul 17, 2003
Posts: 21
Originally posted by Rudi Vaum:
no, I have Java everywhere; it's like this:
client --> business delegate --> session facade (SLSB) --> various business objects (EJBs)
the controller should be somewhere between client and BD; maybe in the client..
At present time, it is nowhere to see on my UML diags - that is bad ;-(

you can have :
1) BD instantiate an event
2) BD send event to business layer controller
3) Business layer controller dispatch the event to a state machine
4) SM start the business action for this event
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to support multiple clients - controllers & ..
 
Similar Threads
web and GUI client design
web vesus Client tier tier for JSP's
httpsessionActivationlistener
Web Vs Application Design SCEA2(old)
Calling EJB