wood burning stoves 2.0*
The moose likes Java in General and the fly likes Web application vs Swing application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Web application vs Swing application" Watch "Web application vs Swing application" New topic
Author

Web application vs Swing application

Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 430
    
    1

Good morning to all nice people of JavaRanch..

I need some advice from you. The question is simple, the answer I'm sure won't be so easy.... I've been working for a long time on a project which aims to develop a java-based ERP. This ERP let the user work with a LOT of data: some forms may have even an half hundred of fields (!) partitioned in several views (panels) of our modules. Moreover, we have developed a lot of custom components which allow us to quickly bind data from bean to forms, controls, tables and vice-versa.

All this stuff have been realized as a Swing Desktop Application, and some areas of our ERPs are still growing up with new features.

Anyway, now I'm wondering if using Swing was a good choice, or if a Web application should have been a better idea. Of course, all business logic is separated from user interface - modules call remote services on an application server - and business logic itself has been developed without tying up with the client. So, it's very handly for us to develop
a web module which would be able to interact with existing server side architecture...

The original choice of using Swing was due mainly to the the fact I realized (some years ago) that Web development, even with best IDEs, isn't straightforward. If you want to use "pure web applications", i.e applications which does not require any specified runtime on client's machine, like Silverlight, JRE, or Adobe Flash player, you have to deal with HTML, Javascript, and AJAX... and this may be a real nightmare. In 2006 i tried to use JSF... Attractive, of course, but when the things became harder, the whole project stranded.. to much time to develop web pages, to much time in mantaining modules, and so on...

So, I give up with web development.
Now, I'm required to develop some web modules to interact to our application, and I'd like to get some advice from you on choosing the best framework... with the hope that things are changed, and that modern web frameworks may solve the worst drawbacks i met in the past:
- lacks of modularity
- can't work with costum components
- binding data between forms and beans in a easy way
....

PS. Even if people look at me as an alien lifeform when I say i choosed Swing instead of web, I'm quite convinced that Desktop apps are more powerful that actual Web Applications, at least when you need to work with complex structures. I'm really so crazy ?

Thanks to all !




Ralph Cook
Ranch Hand

Joined: May 29, 2005
Posts: 479
Well, I don't think you're crazy, but then not everyone is agreed on my sanity, either.

It seems to me you evaluated your possibilities based on the then-current technology and your needs -- that's what analysts (or whatever they're called this year) are supposed to do. It seems to me, also, that many, many folks in our field just assume that a web application is best for everything, I mean, that's what everybody is doing, right? But that doesn't necessarily make it the best choice for your app, or for any app.

I can't tell you whether you made the best choice. It does sound like you looked at the things that make a difference: length of development time, and I assume you considered the costs of deployment as well.

Any set of technologies comes with its own limitations, and I wish more people regarded their technologies as collections of advantages and disadvantages instead of pretending that the flavor-of-the-month was all advantages. Web applications are tied to the paradigms of http, and usually HTML, and often JavaScript, etc., etc. -- all of these are Great Things, and they all have their disadvantages.

Swing, certainly, is the same way -- I still haven't met an IDE that makes Swing development all that easy, it's a complicated paradigm, and that is one of its disadvantages. Anyone who's tried to create a JTable with customized rendering and flexible columns and still says otherwise is just being purposely blind.

As to a current framework, I've been quite interested in GWT. To use it, you write your client-side code in Java with components similar to Swing, and the GWT compiler turns it into JavaScript. Their toolkit also provides for debugging IN JAVA, a tremendous advantage. The JavaScript automatically takes care of browser differerences. I have not investigated yet how much help it gives you communicating with the server, or whether bean/form binding is easy.

rc
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 430
    
    1

Hi Ralph,

thank you so much for your reply. Actually , I based my initial decision upon the state-of-the-art of those times, when if your applications were not "Web-ready", nobody would have been interested on them, no matter how they were really suitable for your needs... despite of this condition, I quickly understood that with few programmers, and even fewer time to develop, the "Web application way" was inapplicable.

Even today, I strongly believe that web applications have made tremendous strides towards getting an usability similar to classical desktop applications, but still have major limitations. I'm not speaking of a "customer's order tracking" or of the classical e-shop application, of course, where a web application is nowadays quite mandatory.. i'm thinking of the back-end processing of customers' orders, for example... where the game is not so easy as select your goods and submit a list of products.


I'll try soon GWT.. I hope I will achieve good results...
Thank you again !
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

I think modern applications have no choice, IMHO, YMMV, etc. You gotta be web. Which is bad for developers. In the olden days, you could write your Java app with servlets, Beans, JSP and be happy. That simply is not enough today. You have to have great HTML 5 user experiences, with drag-n-drop, integration with other web apps, etc. So this means you have to have tons of javascript on the client, plus all the servlets, Beans, JSP, etc.

I really hate having to write in two languages. But I see no alternative.
Ralph Cook
Ranch Hand

Joined: May 29, 2005
Posts: 479
I think the only real reason that apps "have no choice" is that the industry has swallowed the kool-aid. In other words, "You gotta be web" is now a mantra that "everyone" has bought into, and they no longer discuss the pros and cons objectively.

HTML 5 ? I don't think users care a whit about that. What they care about is getting their work done.

Drag-n-drop? Integration with other web apps? These are not always necessary, or useful, or even desirable. Again, I think competent analysts in any field are supposed to evaluate different technologies and pick the best one for their use. It isn't always a web app. Let's keep in mind what its advantages and disadvantages are, so that we can judge whether it is best for a particular situation. I don't have anything much against web apps, just against the blind use of them in situations where they shouldn't be.

I support an app written in Visual Basic 6, 10 years ago, that cries out for a rewrite. Over half of its users are on a radio network which does IP at 20 kilobaud when coverage is available. The users need this app at times when they have no coverage. I invite all and sundry to try to convince me that this should be a web application.

rc
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

Ralph Cook wrote:I think the only real reason that apps "have no choice" is that the industry has swallowed the kool-aid. In other words, "You gotta be web" is now a mantra that "everyone" has bought into, and they no longer discuss the pros and cons objectively.


Which is what happened with Object Oriented 20 years ago. There is a lot of hype on it. But there is also good reason for using the web as part of your application. The handheld devices (where *all* of the engineering and buzz is) are limited, limited storage, limited CPU. There is nearly unlimited storage and CPU out in the cloud.

Ralph Cook wrote:HTML 5 ? I don't think users care a whit about that. What they care about is getting their work done.

HTML 5 is not something that users would ever care about. Its the only hope I see on the horizon to break out out of writing three copies of all of the code. HTML 5 is *not* a standard the way older versions are. Its a framework to allow dymanic work, expandable without change to the specs.



Ralph Cook wrote:Drag-n-drop? Integration with other web apps? These are not always necessary, or useful, or even desirable. Again, I think competent analysts in any field are supposed to evaluate different technologies and pick the best one for their use.


How about touch and geo-location? You can't write new code for new devices without being touch-aware. You'd be crazy to try to write a new commercial application without touch.

I strongly disagree with your claim that integration with out apps is not desirable. The days of writing stovepipe applications are long over. If you write an application that can't pull names and addresses from the smartphone's existing address book, your users are not going to tolerate typing them in again.

Ralph Cook wrote:I support an app written in Visual Basic 6, 10 years ago, that cries out for a rewrite. Over half of its users are on a radio network which does IP at 20 kilobaud when coverage is available. The users need this app at times when they have no coverage. I invite all and sundry to try to convince me that this should be a web application.


I've written web applications that use far slower networks than that. ZigBee is well suited for perhaps 100 bytes of interaction.

I will not try to argue with you beliefs, that is pointless. But the industry is going mobile. Nothing is happening on "personal computer" that you can't carry with you.
Ralph Cook
Ranch Hand

Joined: May 29, 2005
Posts: 479
Pat Farrell wrote:
rc wrote:
Drag-n-drop? Integration with other web apps? These are not always necessary, or useful, or even desirable. Again, I think competent analysts in any field are supposed to evaluate different technologies and pick the best one for their use.

I strongly disagree with your claim that integration with out apps is not desirable. The days of writing stovepipe applications are long over. If you write an application that can't pull names and addresses from the smartphone's existing address book, your users are not going to tolerate typing them in again.

Don't misquote me. These are not the same:

"Integration ... [is] not always ... desirable."

"... integration ... is not desirable"

So, you've got a hammer and that's all you want. Everything must be a nail to you. Understood.

rc
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

Ralph Cook wrote:Don't misquote me.

I quoted you exactly as your post said.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

Pat, please BeNice. That second sentence was definitely not necessary.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 430
    
    1

...after all, only different opinions may help us to clean-up our minds...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web application vs Swing application
 
Similar Threads
Will JDO be better for me Than JDBC ?
Wanted Java J2EE Consultants in Dalton,Georgia
Jr. & Sr. Java Developers needed in FL!!!!!!
If one has to develop a servlet/jsp appln. from scratch... :-)
Can JavaFX be used in place of Swing ?