English 中文(简体)
在 Play 中自动更新选项!
原标题:Auto update option in Play! framework

使用游戏框架, 我该如何添加自动更新功能的选项( 如Youtube和Twitter)?

具体地说,如果我要做一个堆积流克隆,我想在不必刷新页面的情况下让新的问题出现。 或者,当看到一个问题时,新的答案会被添加到列表中,而不会让整页都刷新。

谢谢!

最佳回答

你们有两种解决办法 两者皆有可能 在游戏中没有问题!

  1. Use AJAX to send request for some period of time and check if there are new events for displayed page and the use ie. jQuery to update values of required eleements.
  2. StackOverflow as I can see uses websockets for updating vote counters, informing about edits, etc. It s reaaaaly powerful feature, but keep in mind that older browser can have some problems with it.
问题回答

暂无回答




相关问题
Manage dependencies in a Play Framework app

I m trying to figure out the proper tools for managing dependencies between JARs. I have a Play Framework app, which imports a JAR (based on another project I m writing). This JAR imports other JARs, ...

Deploy Play! application as executable jar

Is it possible to bundle Play! web application to executable jar instead of war? Could it just be run on localhost at some port just like when using "play run" command? (without the need of installing ...

JPA: Store fileAttachment into the database

I would like to know if there is any way I can store a fileAttachment directly into the database with JPA. I have an attribute: public fileAttachement logo; I have tried to change it to: @Lob ...

Java Web Development and Automatic Feedback

I ve been having a (ironic) play around with the Play Framework and have been impressed thus far. I was just curious as to what other Java frameworks are out there that have a similar feature to Play ...

Java web frameworks

I was looking around to see if there is an equivalent to django/RoR in java. I found: Play Framework Grails Does anyone have ever tried those frameworks, or do you know any other? Are they faster ...

热门标签