views:

3073

answers:

7

I am using struts2 for my java web application .

Now I want to use ajax for my client side user interface can anyone suggest me which is the best one to learn and implement ajax framework .

I have seen

  • jmaki , dojo , jQuery

and heard about vroom for netbeans IDE

thanks in advance .

+1  A: 

I don't know if it's the "best" but I had a pretty good experience with Seam using RichFaces(JSF).

RichFaces comes with many AJAX components which are extremely simple to implement.

Seam comes with RichFaces so it's pretty much install and go. Hope this helps. :)

Peter D
is it avilable as netbeans plugin or should i download it from the above link ?
hib
If he's using Struts2 then changing to Seam and Richfaces would be re-architecting the whole thing.
Damo
+3  A: 

Get DWR.

If you need good UI, also get YUI or extJS.

Francis
can you tell me how can i use it in the netbeans IDE ?
hib
I don't use netbeans but there's some plugin to use DWR in netbeans:http://wiki.netbeans.org/CreateReverseAjaxWebAppsWithDWRhttp://directwebremoting.org/blog/joe/2007/03/07/dwr_netbeans_plug_in.html
Francis
thanks Francis for the link
hib
+1  A: 

I like MooTools, JQuery, Script.aculo.us and Prototype in that order.

Ichorus
Keep in mind that scriptaculous is an extension to prototype.
Chris
+4  A: 

There are many choices available: prototype, jquery, etc. The best one depends on your need and your programming preference. If you want to do simple stuff on browser, prototype is enough especially if you prefer $ sign style variable (same as Perl). Otherwise I will try JQuery.

ccyu
+1 for prototype: very well documented etc. JQuery is also good.
Chris
+2  A: 

I would go with jQuery and the jquery ajax plugin. From reading the struts2 dev list, it looks like this plugin is going to be brought into the struts2 project itself in the future.

I would also suggest looking into the json plugin. This makes it easy to output json from your struts2 actions and communicate with any of the ajax frameworks.

Brian Yarger
+1 for jQuery (and jQuery UI) and the JSON plugin. I haven't actually tried the jQuery plugin yet, though.
Steven Benitez
+1  A: 

If you are a Java developer and you want to build a B2C web app which need to support huge amount of concurrent user access, I'll suggest you using GWT 2.0.

I wouldn't suggested anyone to use GWT while 1.X because you need to ship your application using a CD-ROM or your user have to wait for ages for javascript loading (this is not what I said, it's Google Wave team confessed in GWT2.0 release video in Youtube). But since GWT2.0, The GWT.async() is a simple but powerful concept that helped you to load UI on demand, plus the UiBinder, it's mature enough now.

Here is an example of how to use UiBinder to layout your App: UiBinderEN

But if what you need is to ship your product in a short time and the result is to build a MIS system or an existing product's Web UI. I'll say ZK + any other Javascript lib might be your choice.

ZK not only allows you to do fast prototyping like:

<window>
<textbox id="usr"/>    
<textbox id="pwd" mode="password" />
<button label="submit">
    <attribute name="onClick">
        loginCtrl.submit(usr.value, pwd.value);
    </attribute>
</button>
...

But also help you to refactor them to more organized MVC pattern.

Both of these two AJAX Java Frameworks use XML + CSS as there layout document, have plugin point for native Javascript and have Eclipse IDE support. The development speed of using ZK is faster but GWT's memory consumption is lower.

And actually, it's possible to ask them to cooperate to each other!

Zanyking
+1  A: 

You may want to check this link. It has a great comparison of various ajax jsf frameworks. IMHO, JSF is very well supported and has more than required set of rich components to fulfill any needs. And with JSF2 out, the cake has only grown bigger. I personally like the JBoss RichFaces.

It's more of what you're more suitable with. This should be the biggest consideration when choosing a framework for development. In the end it will boil down to how soon you can fix issues and respond to CR's in you application.

cracked_all