• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

SCEA part II desig I have selected.

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
And then the flying monkeys attacked. My only defense was this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic