AJAX 令人头疼,因为它本质上意味着您必须编写两组相似的代码:一组用于启用 JavaScript 的浏览器,另一组用于不启用 JavaScript 的浏览器。
不仅如此,您还必须连接 JavaScript 事件以挂接到您的模型并显示结果。
如果这一切还不够糟糕,您需要在请求中发送地址更改,否则用户将无法正确“单击返回”(如果感到困惑,请查看地址栏发生了什么您单击 GMail 中的链接)。
我们正在寻找具有远见和设计目标并考虑到所有这些问题的东西。
性能和安全性也是显而易见的主要问题。
我们也喜欢基于配置的系统,您无需编写大量代码,只需将其放入易于阅读的配置格式即可。
这就像请求 chalice ,对吧?
最佳答案
你看过Pyjamas吗?
引用自网站
Why should I use it?
You can write web applications in python - a readable programming language - instead of in HTML and Javascript, both of which become quickly unreadable for even medium-sized applications. Your application's design can benefit from encapsulating high level concepts into classes and modules (instead of trying to fit as much HTML as you can stand into one page); you can reuse - and import - classes and modules.
Also, the AJAX library takes care of all the browser interoperability issues on your behalf, leaving you free to focus on application development instead of learning all the "usual" browser incompatibilities.
关于php - 一个 Web 框架,其中 AJAX 不是事后的想法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2642364/