Fred So wrote:
> There are many AJax libraries available at the moment. Which one do you
> think works best/most natually with Struts?

Hi Fred,

I think to answer that you have to determine what your needs are. Your right, there are a lot of choices, but each has a fairly different focus, even though they obviously have a lot in common. Off the top of my head, the ones I'd consider:

* AjaxTags in Java Web Parts (http://javawebparts.sourceforge.net) - Of course I'd list my own first :) Seriously though, if what your looking for is an easy to integrate solution that deals with the client-side but leaves the server-side to you, AjaxTags may be of interest. It's a completely declarative approach to Ajax (i.e., all driven by XML config file) that comes in the form of a taglib (with a grand total of four tags, two of which you may not use much). AjaxTags won't give you canned solutions, i.e., it isn't about UI widgets or pre-made dropdown suggestion boxes, but it will facilitate you building those with a minimum of fuss, plus a lot more.

* Dojo (http://dojotoolkit.org/) - This one is growing in popularity, and for good reason. It offers more than just the mechanisms for making Ajax calls. Widgets are a big part of it, as is animations, as well as "extensions" to Javascript to make your life easier. It has a much wider focus, but what is coming out of the project has looked very good so far.

* DWR (http://getahead.ltd.uk/dwr/) - This one actually has some information specifically about integrating with Struts on the site. DWR in interesting in that it is literally a remote procedural call mechanism whereby you can call Java code from Javascript. DWR even handles marshalling and unmarshalling of data types between Java and Javascript.

There are plenty of others of course, but those are the three I would personally look at first. As you can see, they all have a different focus, some offering a wider range of things than others. They can all be used with Struts apps, with varying degrees of complexity.

So, it depends on what you are trying to do. If your goal is to be able to fire some Ajax requests at your server based on various events with a minimum of fuss, AjaxTags might be the ticket. If you are looking for some fantastic Ajax-based UI widgets (this one tends to impress people the most, although there was a better one a while back: http://archive.dojotoolkit.org/nightly/tests/widget/test_FisheyeList.html), check out Dojo. If you need a more "full-stack" solution for calling remote code, DWR might be perfect.

Hope that helps!

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to