如何根据用户的行为来更新内容[像脸谱网墙] [英] How to update content based on user actions [like the facebook wall]

查看:82
本文介绍了如何根据用户的行为来更新内容[像脸谱网墙]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关我的下一个应用程序,我想实现的东西,有一个像Facebook的墙上的特点,但让我解释一下。对于那些你谁使用Facebook的你知道,当有人将消息挂在墙上,而你登录到你的账户,你会得到一个通知,立即某处的左下角。最近,他们甚至推这得远一点,如果在上面有人评论,你可视化的页面的评论已更新,它就像一个即时聊天。

For my next application i would like to implement something that has a feature like the facebook wall but let me explain a bit. For those of you who used facebook you know that when somebody posts a message on your wall, and you are logged in to your account, you will get a notification immediately somewhere in the lower left corner. Lately they even pushed this a little bit further and if somebody comments on it the comments are updated as you visualize the page, it's like an instant chat.

我的应用程序将在PHP开发,我将使用Zend框架来做到这一点。我很感兴趣的基本原则,使Facebook的墙作用一样(实时更新)。我知道有阿贾克斯参与,但我真的不能告诉的JavaScript是如何触发,当用户在做什么。或甚至更多,如何推回给用户的加入后,他观看的页的一些信息。例如,让我们说,一个人加我为好友。我希望看到一个通知说:X已经加你为好友如果我登录,我希望你明白我想要做的。 如果你能告诉我一些基本思路,也许提供有这个信息,我将非常感激一些链接。

My application will be developed in PHP, I will use Zend Framework to do it. I'm interested in the basic principle that makes the facebook wall behave like that (updates in real time). I know there is ajax involved but I can't really tell how is the javascript triggered when the user is doing something. Or even more, how to push back to a user some info that was added after he viewed the page. For example, let's say that a somebody adds me as a friend. I would like to see a notification saying "X has added you as a friend" if i am logged in. I hope you understand what I'm trying to do. If you can tell me some basic ideas, maybe provide some links that have this information I would be very grateful.

感谢您抽出时间阅读这本。

Thank you for your time in reading this.

推荐答案

您需要看彗星逆转阿贾克斯,的 Ajax轮询

这篇关于如何根据用户的行为来更新内容[像脸谱网墙]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆