简体   繁体   English

Java Web应用程序中的Ajax和复杂的图形

[英]Ajax and sophisticated graphics in Java web-app

In my opinion WWW will sooner or later come to full-blown AJAX web-sites, so that we wouldn't have page reloads every time you click somewhere. 在我看来,WWW迟早会进入成熟的AJAX网站,这样,每次单击某个位置时,我们就不会重新加载页面。

Now I want you to ask this. 现在我要你问这个。

What tools and frameworks can one use to make a Java Web-application running on Tomcat 可以使用哪些工具和框架来使Java Web应用程序在Tomcat上运行

have AJAX functionality like "in-place, with no page reloading" table sorting by 具有AJAX功能,例如“就地,无需重新加载页面”

clicking on its column header, multi-tabs that enable opening at once the new screen to the user without reloading a page, saving data in the database without reloading a page, and other similar things that we do not usually see on web pages. 单击其列标题,多个选项卡,这些选项卡可立即向用户打开新屏幕,而无需重新加载页面,无需重新加载页面即可将数据保存在数据库中,以及其他通常在网页上看不到的类似内容。



That's all should probably be based on AJAX. 这一切都应该基于AJAX。

But how to integrate this AJAX functionality with existing java web-frameworks, let's say Spring MVC? 但是如何将这种AJAX功能与现有的Java Web框架集成在一起,比如说Spring MVC?

Or maybe there are other frameworks that better suit such needs but that can be integrated with core Spring? 也许还有其他框架可以更好地满足此类需求,但可以与Spring核心集成?

Your question is rather confusing--AJAX calls are all client-side, any server-side technology can return data to the client. 您的问题相当令人困惑-AJAX调用都是客户端,任何服务器端技术都可以将数据返回给客户端。

That being said, you may try taking a look at Google Web Toolkit . 话虽如此,您可以尝试看看Google Web Toolkit

With the GWT SDK, you write your AJAX front-end in the Java programming language which GWT then cross-compiles into optimized JavaScript that automatically works across all major browsers. 使用GWT SDK,您可以使用Java编程语言编写AJAX前端,然后GWT将其交叉编译为可在所有主要浏览器上自动运行的优化JavaScript。 During development, you can iterate quickly in the same "edit - refresh - view" cycle you're accustomed to with JavaScript, with the added benefit of being able to debug and step through your Java code line by line. 在开发过程中,您可以按照您习惯使用JavaScript的相同“编辑-刷新-视图”循环快速进行迭代,其附加好处是能够逐行调试和逐步执行Java代码。 When you're ready to deploy, the GWT compiler compiles your Java source code into optimized, standalone JavaScript files. 准备部署时,GWT编译器会将Java源代码编译为优化的独立JavaScript文件。

Among other things, GWT supports built-in serialization of objects for transfer to your Java servlets, allowing for crazy-easy (the technical term) integration of your GWT client and existing Java technologies. 除其他外,GWT支持对象的内置序列化以传输到Java servlet,从而允许您将GWT客户端和现有Java技术轻松地(技术术语)集成。

Homebrewed/3rd-party Ajax stuff with JSF isn't that easy since you have to take its lifecycle and component tree into account. 使用JSF进行自制/第三方Ajax的东西并不是那么容易,因为您必须考虑其生命周期和组件树。 You would need to write your own ViewHandler . 您将需要编写自己的ViewHandler Rather look for what's already available. 而是寻找已经可用的东西。 To start, JSF2 already provides builtin Ajax functionality with under each <f:ajax> . 首先,JSF2已经在每个<f:ajax>下提供了内置的Ajax功能。 There are further also a lot of Ajaxical JSF component libraries, like RichFaces ( showcase here ). 还有许多Ajaxical JSF组件库,例如RichFaces在此处展示 )。

No wording about Spring as I don't do it. 由于我不这样做,所以没有关于Spring的字眼。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM