Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Swing vs Web App

Status
Not open for further replies.

scohan

Programmer
Dec 29, 2000
283
US
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.
 
Don't use Swing over VNC - results would be disastously slow.

If you use Swing, the downside is that you have to install code on the client machine, whereas you don't with a webapp.

If you are displaying thousands of rows of information, then this has problems for both swing and a webapp, because you still have to get the data to the client's PC.

The Swing app would communicate with the server from the client ultimately using RMI I expect, or maybe Jini which is built on RMI, or maybe EJB which is also built on RMI. It would also be possible to use JMX to communicate between the two.

These days, with a combination of SVG and javascript, there is not a lot, interactively, that can be done in Swing but not in a webapp.
 
A Swing app will perform better than a JSP app. With the JSP app the html rendering on the client side can take longer than having a Swing client displaying the data.

With the Swing app, you have to worry about the JVM on each clients machine and the database server. With the JSP app, you have to worry about what browser each client has, an application server and a database server.

However, what you really have to consider is the number of users. If you're writing an app for a few people, all in the same building as you, then write a nice Swing app and give them a snappy experience.

If you expect hundreds of users, or have users in other locations (or at home), then the JSP option will be far far easier to deploy and maintain. Installing and upgrading JVMs and versions of your app on lots of distributed machines is a nightmare.

And the users, by the way, get used to browser-based apps fairly quickly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top