简体   繁体   English

没有Node.js的实时HTML5 Web应用程序

[英]Real-time HTML5 web application without Node.js

What would be the most appropriate way to make a real-time web app that works on PHP (Apache web server)? 制作适用于PHP(Apache Web服务器)的实时Web应用程序最合适的方法是什么?
The idea of web application is to let two users at the same time edit same HTML form which is regularly saved to MySQL DB. Web应用程序的想法是让两个用户同时编辑定期保存到MySQL DB的相同HTML表单。
I am thinking about AngularJS + Laravel approach with lots of AJAX requests, but maybe there is more appropriate way to do this (maybe WebSockets)? 我正在考虑使用大量AJAX请求的AngularJS + Laravel方法,但也许有更合适的方法(可能是WebSockets)?
There are no requirements for browser compatibility except that it would work on latest version of Chrome. 除了可以在最新版本的Chrome上运行之外,对浏览器兼容性没有要求。

Basically, if you want a real-time web application your best bet would be WebSockets. 基本上,如果你想要一个实时的Web应用程序,最好的选择是WebSockets。 It is event driven so the client doesn't has to pull for updates, the server push them. 它是事件驱动的,因此客户端不必提取更新,服务器推送它们。 Otherwise, the client would have to constantly pull updates from a REST API. 否则,客户端必须不断从REST API中提取更新。

A quick search on Google led me to Ratchet which is a PHP websockets. 快速搜索Google让我看到了一个PHP websockets的Ratchet

Good luck! 祝好运!

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

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