开发者

Should I use Struts 1 or 2 with jQuery?

开发者 https://www.devze.com 2023-02-28 00:39 出处:网络
I want to develop a Java EE application with a rich user interface which uses Ajax heavily.I know that I can use Ajax frameworks like jQuery and Dojo to achieve this.I have worked previously on Java E

I want to develop a Java EE application with a rich user interface which uses Ajax heavily. I know that I can use Ajax frameworks like jQuery and Dojo to achieve this. I have worked previously on Java EE with Struts (1.x) and Hibernate.

But recently I found that Struts 2 has inbuilt Ajax support. Is it worth it to use Struts 2? I am not familiar with Struts 2. Should I go with Struts 1 or 2? If I use Struts 2 will I have to开发者_高级运维 use jQuery also or does Struts 2 have custom tags that support Ajax?


Use Struts 2, Struts 1 is extremely antiquated. Struts 2 is considerably different from Struts 1 though, so your knowledge of Struts 1 probably won't transfer much (except for general purpose understanding of the servlet request / response life cycle, etc). There's a Struts 2 JQuery plugin that you can use for Ajax. Don't use the Dojo ajax support, it's deprecated.


Next to Struts 2, you should maybe consider JSF 2. This is a very good web framework that has great build-in support for Ajax as well.

There are lots of component libraries that are a good showoff of how AJAX can be used in JSF, e.g. see the PrimeFaces Showcase.


Struts 2. You will have to use jquery (not only helper tags).


You should use GWT. Seriosly. Struts is good, but nothing beats GWT if your goal is Ajax.

0

精彩评论

暂无评论...
验证码 换一张
取 消