• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to support multiple clients - controllers & ..

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 416
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic