Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AJAX & Swing can't be together ?

 
Carlos Schweizer
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have done some work with Ajax, particulary with DWR. I'm familiar with all the background involved, and have read a lot of papers about Ajax, Ajax best practices, "Ajax patterns", so others.
I'm a Java professional, formed in the old school where the term GoF doesn't exists (someone who remember OMT...). why should not use Swing or why I must replace it with AJAX, like a old-new fashion ?
I have a particulary scenario, I'm using a JApplet with a lot of graphical objects(Graphics2D), images, and others. I want to use Ajax for text forms, in the same application.
I'm just a bit "deprecated" ? Or something good could born between Ajax and Swing ?
Thanks in advance for your time.
 
Jord Sonneveld
Author
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Carlos Schweizer:
Hi, I have done some work with Ajax, particulary with DWR. I'm familiar with all the background involved, and have read a lot of papers about Ajax, Ajax best practices, "Ajax patterns", so others.
I'm a Java professional, formed in the old school where the term GoF doesn't exists (someone who remember OMT...). why should not use Swing or why I must replace it with AJAX, like a old-new fashion ?
I have a particulary scenario, I'm using a JApplet with a lot of graphical objects(Graphics2D), images, and others. I want to use Ajax for text forms, in the same application.
I'm just a bit "deprecated" ? Or something good could born between Ajax and Swing ?
Thanks in advance for your time.


I don't see why you couldn't use Swing applets and Ajax techniques in the same web app. http://www.raditha.com/java/javascript.php has a great demo of how applets and javascript can interact.
 
M Easter
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure I understand the question: who is telling you that you need to replace Swing with Ajax?

That said, here are some thoughts:

1. In the beginning, there were GUIs (aka rich clients).

2. Along came applets, but network latency and performance problems prevented their success. Also the UI experience couldn't touch typical rich clients.

3. Eventually, web applications did succeed. The UI experience was lame, but the ease of deployment, versioning, etc, triumphed over typical rich clients. The browser is an irresistable force as a deployment model.

4. Rich clients struck back with "java web start" to address versioning, installation of JRE, etc, but, from what I can tell, it hasn't been very successful.

5. The web side, having gained "air superiority"/dominance on the deployment side, is trying to improve the weak UI side with Ajax and other neat ideas that comprise "Web2". It is debatable as to whether or not a web app can match a Swing UI, but it _is_ now, for the first time, an interesting debate. (esp with killer apps like Google Maps).

The primary "intent" of Ajax/Web2 (IMHO) is that the user can interact with a page without expliciting submitting the "form". The UI/mindset is closer to an "app" than a "page". Ajax, in particular, is essentially a background fetch/submission of data.

In one sense, Ajax doesn't "fit" the Swing model because a Swing UI is already an app vs a page. That said, a Swing app can populate its widgets in a variety of ways: calling out to a web service is certainly one of those. So nothing really prevents a Swing app from using Ajax/web stuff per se.
 
Carlos Schweizer
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok.
My answer was like that, it's not the same nor succesor, there's nothing wrong, different technologies, but I have a lot of experience developing applications (also MCP), feel fine working with Spring, Struts (even WS Security with Axis2), the fact of mixing an Applet with Struts, EJB's, Hibernate and AJAX sounds a little creepy (sorry about my english, I don't speak it very well).
Sonneveld, Easter, thanks a lot, again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic