Web tier: servlets, JSP, Web frameworks: Swing vs Web App
Given business logic developed in a J2EE architecture, when is is better to develop a Swing client that accesses the business logic vs a web front end (say in JSPs/Struts) accessing the business logic?
If there are moderate visualization requirements like drawing an outline of country or scanning over a timeline, would these requirements be better met using Swing clients than a web app? Will Swing be more performant showing this data?
If there is a large amount of data, say thousands of rows from a database, is it better to use a Swing client to display this than a web app so that you can display more rows? Will Swing perform better? Or will you still need to implement a paging mechanism? Will paging be more performant in Swing?
If you developed a Swing client and deployed it to one server, could you deploy something like pcAnyhere or vnc to user PCs for them to access the Swing client? Does this make sense or this idiotic? Is there a better to do this so you don't have to deploy the Swing client to each user PC? What does Swing use to communicate with the business layer? RMI? Can this be secured with SSL or PKI?
Thanks a bunch.
- Swing vs Web App by Sanjaya Ganesh on April 22 2004 07:26 EDT
- Swing vs Web App by Fernando Petrola on April 22 2004 12:19 EDT
- Swing vs. JSPs: looking for feedback by Akila Ramakrishnan on February 16 2005 11:02 EST
- Swing - Web by Imre Tabur on September 26 2007 02:19 EDT
Given business logic developed in a J2EE architecture, when is is better to develop a Swing client that accesses the business logic vs a web front end (say in JSPs/Struts) accessing the business logic?The difference really THICK or THIN. Exactly that. Also the web technologies are abundant in frameworks and future growth
If there are moderate visualization requirements like drawing an outline of country or scanning over a timeline, would these requirements be better met using Swing clients than a web app?
Will Swing be more performant showing this data?Both (web or swing) will depend on the capability of the client machine. One cant be faster than other.
If there is a large amount of data, say thousands of rows from a database, is it better to use a Swing client to display this than a web app so that you can display more rows? Will Swing perform better? Or will you still need to implement a paging mechanism? Will paging be more performant in Swing?Web would be better as memory capacity of various client machines will differ and so your performance will vary depending on your client machine capability. Also reusability of cached components will not be much.
If you developed a Swing client and deployed it to one server, could you deploy something like pcAnyhere or vnc to user PCs for them to access the Swing client? Does this make sense or this idiotic? Is there a better to do this so you don't have to deploy the Swing client to each user PC?Normally you use Citrix Metaframe for these kind of requirements - Not PCAnywhere ;-).
What does Swing use to communicate with the business layer? RMI? Can this be secured with SSL or PKI?Thanks a bunch.Any protocol can be used. But if your thick client is going to hit a firewall on way - your IT admin is probably not going to allow you deploy the app - or will throw you out of the window looking at the holes he has to punch in the firewall. Also no control on which IP addresses will pass thru the firewall - as all swing clients will need a hole :-)
You can try with WebOnSwing Web Application Framework (http://webonswing.sf.net).
This framework can create web pages using Swing components, keeping the same source code for both environment. The idea is make use of Swing arquitecture with all its advantages to create web applications, as its components are enough generic to use them in almost any presentation layer, like HTML. Also, this framework, provides some mechanisms, based on a powerful template engine, that adapts the look of applications to acquire a professional graphic design in web. It has some similar aproach to .NET webforms, like a kind of viewstate to maintain the page state through successive requests, and a set of validators (required, regular expression, compare, range, group).
My experience is that you should use swing if ALL the conditions are met:
1. You have control over the user environment.
2. You are replacing an MDI app.
3. Users work with master/detail information where there is a lot of detail tables.
4. A lot of tabs on the same page (see point 3).
5. You do not want to pay $$ for new app server machines.
6. Users have 1GHz or better AMD XP or Celeron machines with +128MB.
7. Your seesion data exceeds 1GB RAM for server side persistance. (Depends upon Server memory and OS.)
8. Users want under 2sec transaction response times (viewed at client) and you have over 1,000 concurrent users. Again, depends upon app server hardware.
Do you have specific links to the cost benefit involved in swing vs jsp clients? I have a project where a subsystem is already developed in swing j2ee business tier type of architecture and we are investigating the possibility of changing that architecture to a thin client for the other two subsystems. Remember that the user population is intranet not internet. Can you think of advantages given that user group? Can you share any statistical information that you may have?