• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Ajax and Struts best aproach

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm trying to follow the article in Sprinkle some AJAX magic in your Struts App but I'm having a problem with the button's form values being always passed.

So I want to ask if anyone have a different approach to combine AJAX+STRUTS

Maybe any other framework that could be included in the existing project.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Struts forum.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The approach that I use is quite different than the one presented in this article. I use Struts in combination with DWR (Mentioned in the article). They work quite well together.

As I looked at the article you referred to, I got a little irritated at this very inaccurate statement:

You could move to a new approach, like Direct Web Remoting (DWR) or Ruby on Rails, which are specifically built for AJAX applications. While these are both very impressive frameworks, and are worth taking a look at if you wish to consider web development without Struts, this option would mean rewriting your entire application.



Believe me, it is not necessary to rewrite your whole application in order to use DWR. Neither is it necessary to choose between Struts and DWR. The approach I use is to use Struts for traditional "display a page/submit a form" type of processing, and to use DWR for AJAX processing.

I find that most of the time the task I need to perform can most easily be performed by the traditional method. There are a few situations, though, where AJAX comes in very handy and can give your application an added sparkle. I'm referring to such things as dependent drop-down boxes, auto-completion, drag-and-drop, etc.

In my opinion, using an Action class to respond to an AJAX call is like hammering a nail with a pipe wrench: Sure, you can do it, but it's not the best tool for the job. DWR is much better suited to handle AJAX than Struts is.

Check out this thread for more information on this approach.
[ August 14, 2006: Message edited by: Merrill Higginson ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic