• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCEA part II desig I have selected.

 
kumar as
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am on the way of doing my SCEA part 2.Can any one give suggestion on my design choice I have done for FBN.There are 2 clients going to access FBN system.One is web client that is straight forward , we can use JSP or servlet for presentation , other I have chosen is Swing application .This is acheived by using URLConnection to same servlet which act as frontconroller for both web as well as for Swing and getting response as XML to swing (can I go for XML or go for TO object ).My big problem is connecting to CGI prl sstem.How this can be done or is there is any patterns around this or any other resources around this.Please can an one give me the idea around this.

thanks in advance
kumar
 
Muhammad Asif
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kumar just a couple of comments !

(1) When you are making a URLConnection, do you intend to follow the Http Protocol for your application client as well ? HTTP has been designed for web and has some inherent shortcomings as well. How do you intend to generate an HTTP request everytime a button is clicked ?
(I would suggest going directly to a Mediator EJB)

I know their might be a security concern regarding direct access and port opening on the server. But there are mechanisms that might help you do that ?

A food for thought perhaps..
 
kumar as
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply , but anyway Iam not clear with you. can you please explain me more about the same.
 
Muhammad Asif
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kumar,

You have mentioned that you intend to access FBN application via a URL connection object from Rich Client (Swing App).

Now you also want to use the same front controller that you have developed for the web-application.

It does not seem logical to me. (I might be wrong). What you might do is access the EJB tier from Java Swing application. That is probably a better way to do things.

Regards,
 
Ricardo Ferreira
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kumar as:
Hi all,

I am on the way of doing my SCEA part 2.Can any one give suggestion on my design choice I have done for FBN.There are 2 clients going to access FBN system.One is web client that is straight forward , we can use JSP or servlet for presentation , other I have chosen is Swing application .This is acheived by using URLConnection to same servlet which act as frontconroller for both web as well as for Swing and getting response as XML to swing (can I go for XML or go for TO object ).My big problem is connecting to CGI prl sstem.How this can be done or is there is any patterns around this or any other resources around this.Please can an one give me the idea around this.

thanks in advance
kumar



Kumar,

I do not think a good idea your swing client application access the enterprise system by some servlet acting as front controllers.

One of the most benefits of enterprise java beans, is that they are built on rmi-iiop protocol, as such, you access it by any kind of client application, even non java applications as Delphi or C++.

In my opnion, you should create business delegates components at your swing application, to access EJB components throw JNDI tree and calling ejb method by rmi-iiop.

So, in your client application, the design should be something like this:

BusinessDelegate --> ServiceLocator --> EJB Fa´┐Żade

And of course, is much more easy rather that create URLConnections to Servlets, you can design only by interfaces and objects, instead of OutputStream

Regards,
 
Paul Codillo
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kumar,

If your intention is to have a centralized controller for both your JSP and Swing client, you could have something like this...
Web:
JSP --> Servlet --> AppContoller --> ServiceLocator -->
Swing:
Swing Client --> GUIController --> AppController --> ServiceLocator -->

You could have your web and Swing presentation layers use the same AppController. Your servlet processes your HTTP input and your GUIController processes your Swing input.

I hope this makes sense.

Good luck!
 
Peter Cook
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Codillo:
Hi Kumar,

If your intention is to have a centralized controller for both your JSP and Swing client, you could have something like this...
Web:
JSP --> Servlet --> AppContoller --> ServiceLocator -->
Swing:
Swing Client --> GUIController --> AppController --> ServiceLocator -->

You could have your web and Swing presentation layers use the same AppController. Your servlet processes your HTTP input and your GUIController processes your Swing input.

I hope this makes sense.

Good luck!



Agree with other posters. Dealing with HTTP request/response via a Servlet for the Swing Client would not be advisable.

A session facade of some sort could be used by both. Perhaps your AppController is a session facade.
 
Lakshmanan Arunachalam
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML over HTTP for accessing services thru intranet/internet is good for coarse grained (high level) services. In FBN, it may involve a lot number of small functionalities, using XML over http for this implementation will increase development time(Constructing business objects to and from XML) and runtime overhead.

So, better use EJB in this case.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic