Current position:  Home > Default > Protocol Router for Rich Client Front Controller

Protocol Router for Rich Client Front Controller

Time:October 11
Advertisement
Hello,
I would like to support multiple client types in my J2EE application - Web Client and Rich Client (Swing Application).
Java BluePrints (Designing Enterprise Applications
with the J2EETM Platform, Second Edition) suggests using a Protocol Router for centralized control in case of supporting multiple client types with multiple controllers - http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html.
I have several doubts with this approach and will appreciate very much any help with clarifying the following:
1) How does a Rich Client communicate to Protocol Router? Using HTTP? That means then that each request/response has to be wrapped in HTTP Request/Response object. It may impact the performance and make the communication between Rich Client and back-end slower.
2) If rich client communicates with Protocol Router through HTTP, what is the difference between Fron Controller for Web Client and for Rich Client?
3) The J2EE Tutorial on the other hand, shows direct connection from Application (Rich) Client to EJB layer - http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Ebank.html.
It will be greatly appreciated to know how would you address the above doubts.
Best Regards.
Advertisement
1) How does a Rich Client communicate to Protocol
Router? Using HTTP? Yes, HTTP . You are right about performance issues. That protocol router seems to me like like overengineering. Anyway, I think a WEB service could be better choice. It's a standart way how to wrap remote requests in HTTP.
2) If rich client communicates with Protocol Router
through HTTP, what is the difference between Fron
Controller for Web Client and for Rich Client?I think the difference is in types of requests. WEB client would request
WEB pages, SWING client doesnt need WEB pages. It would request contents
of list boxes and things like that.
I would suggest you to use EJB's with session facade pattern. Provide WEB service style access to your app. Many app. servers provide feature to expose SLSB as WEB services. Thus you will support almost any types of clients (.NET, Perl, whatever). You can also use WEB service to connect from you'r SWING client. If later you are not satisfied with performance, you can switch to RMI. If you use BusinessDelegate pattern then you will need to change BusinessDelegate only, just one class.
I have written an example EJB based app. which can be accessed by SWING client using RMI or SOAP, WEB client, .NET client and CORBA.
You can get it from:
http://www.datapro.lv/~mariso/ejb.html
feel free to ask questions, if you have any
Maris Orbidans