File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes PartII: jsp and swing clients Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "PartII: jsp and swing clients" Watch "PartII: jsp and swing clients" New topic

PartII: jsp and swing clients

Robin ng

Joined: Oct 09, 2006
Posts: 2
I am thinking to use business delegate and service locator for swing client. My question is: should the swing connect to web servers or directly to the app server. If connecting the web server, swing can re-use the same delegates and service locator created for jsp/servlet, but there might be performance overhead incurred. If connecting the app server directly, the code for delegate and service locator will be somehow duplicated.

Here I am assuming the swing program will be run within the company's intranet. Any comment is very much appreciated.
Ricardo Ferreira
Ranch Hand

Joined: Feb 13, 2006
Posts: 156

You can consider to make your swing application connect int the application server directly using business delegates and an service locator.

For the assignment pourpouses, you have to define in your solution that you will use 'an business delegate' and 'an service locator'. This is not redudance because at the real world, thare are techniques to avoid the repetition, using common jars for example.

If you care about how your architecture will be evaluated about redundant components, try to use some package diagrams and put the commons components (business delegate, service locators, pojo entities), at packages there are accessible at all the major packages, such as the business package, the controller package and so on.

Even the assignment did not ask for an package diagram, provide one could be a very good idea because your architecture will mitigate two main things: redundance and component dependency.

Best Regards,

Ricardo Ferreira,<br /> <br />Sun Certified Enterprise Architect<br />IBM Certified SOA Solution Designer<br />IBM Certified RUP v7.0 Solution Designer<br />IBM Certified Specialist for RUP v2003
Cleuton Sampaio
Ranch Hand

Joined: Nov 11, 2005
Posts: 181
Yes, Ricardo is right. You should design an architecture that works for both kinds of clients (Web and Swing), and by using common Jars you can achieve that.

Cleuton Sampaio<br />Systems Architect<br />(SCEA,SCWCD,SCBCD,MCSE,MCSD)
Robin ng

Joined: Oct 09, 2006
Posts: 2
Thanks for your great advice.
I agree. Here's the link:
subject: PartII: jsp and swing clients
It's not a secret anymore!