This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am working in a project that uses Spring, iBatis, Jess, Crystal Reports and SQL Server in server side and SWT/JFace, Struts, Java Web Start in the client side. Different parts of the system was developed by different teams independently and later integrated together. As a by-product of communication gap between different teams, we have come with a solution that could have saved a lot of time and effort if could be designed and developed upfront with single objective.
We are thinking of re-designing it, however, the server-side is pretty much neat and clean (except the reports part that we may switch from crystal reports to something else in future) and so better remain less touched. The first areas that seem a little bit isolated is the existance of client-side that involved SWT/JFace (which have been heavily twicked to make it windows-only), Struts and Java Web Start. We have 3 options that we can think of.
1. Improve the SWT/JFace and Struts codebase and design patterns. 2. Switching to JFC/Swing due to its improvement over years that will solve part of our windows-only implementation in SWT. 3. Make our client totally thin client using AJAX or some other technologies that can leverage the power of what our thick client GUI is providing now.
Which approach would you have preferred?
Personally, I am in favor of AJAX based approach but want to know pros and cons from you.
Also do you mind pointing me to some popular AJAX based frameworks, preferably open source, so that I can develop a prototype myself without spending money?
Looking forward to your comments.
Ashik Uzzaman Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
Really, it's totally impossible to give you good sound advice based on such a short overview of the whole system. It depends on what the software is for, how it is used, etc. For some systems, desktop clients (made with SWT/JFace or AWT/Swing) are more suitable, for other systems a thin-client AJAX solution is more suitable. Don't use the same technology for all your systems just because you only want to use one technology. You have to make an intelligent choice for every system.
I was once in a project where we were making software for a call center. We were making it using AJAX technology, as a "Web 2.0" web application. The project failed because a web application and AJAX was the wrong technology choice - the client had very strict performance requirements which were impossible to reach with the chosen technology and it was also very hard to impossible to get the level of control that was needed (they wanted the app to respond to very specific shortcut keys; some of these could not be handled in an AJAX web app because the browser would catch and handle those keys and not pass them on to the app). For that project, a desktop GUI (client-server) app would have been a much better choice.
In my opinion, the main advantage of (AJAX) web apps is that you don't need to install anything on the client; the client only needs a web browser. If you have thousands of client computers on which the software is going to be used it can be a major cost saving if you don't have to install the software on all those computers. However, you don't have the level of control in an AJAX web app that you have in a desktop GUI program.
Note that with technologies like Java Web Start you can (almost) have the same no-hassle installation with a Java desktop GUI program as you have with a web app.