ajax30秒刷新页面_30秒AJAX

ajax30秒刷新页面_30秒AJAX

ajax30秒刷新页面

PHP's creator Rasmus Lerdorf has posted a message on the PHP-General mailing list. It's a 30 seconds AJAX tutorial and is a response to a question about using PHP and AJAX.

PHP的创建者Rasmus Lerdorf在PHP-General邮件列表中发布了一条消息。 这是一个30秒的AJAX教程 ,是对有关使用PHP和AJAX的问题的答复。

Yours truly recently published an intro to AJAX on Devmo (second part is coming up, stay tuned ???? ) so I couldn't help but look at Rasmus' email with a critical eye. Well, there are a few bits that a modern hardcore javascripter might dislike, like for example if(browser == "Microsoft Internet Explorer"){... (browser sniffing as opposed to feature sniffing) or <a href="javascript: ... (javascript is not a protocol) or the use of innerHTML (an HTML document is a tree of nodes, not strings)

您的公司最近确实在Devmo上发布了AJAX 简介 (第二部分即将上映,敬请期待????),因此我不禁以挑剔的眼光看着Rasmus的电子邮件。 好吧,现代的核心javascripter可能会有些讨厌,例如if ( browser == " Microsoft Internet Explorer " ){... (浏览器嗅探而不是功能嗅探)或< a href = " javascript: ... (JavaScript不是协议)或使用innerHTML (HTML文档是节点树,而不是字符串)

But overall, it's a nice, short and clear intro. And I do like the message as a simple reminder that we should think in terms of the task to be performed, not in terms of the solution, I mean not to rush into using a PHP-AJAX lib, just because, but to try and see if there's an easier and simpler way.

但总的来说,这是一个不错的,简短而清晰的介绍。 我很喜欢该消息,它只是一个简单的提醒,我们应该考虑要执行的任务,而不是解决方案,我的意思是不要因为一个原因而急于使用PHP-AJAX库,而是尝试并看看是否有更简便的方法。

As a side note, that's the beauty of Rasmus' PHP -- it's designed to solve a problem, the web problem, and it's doing this in a very good manner. PHP was not designed to be, for example, the best OO language ever or something. It was just a set of CGI programs to help their creator (and all the world later on) solve web problems. Afterwards, with the help of the web dev community, PHP grew up to become the programming language it is today.

附带说明一下,这就是Rasmus PHP的优点–它旨在解决问题,网络问题,并且以一种很好的方式做到了这一点。 例如,PHP并非设计成有史以来最好的OO语言。 这只是一组CGI程序,可以帮助其创建者(以及以后的世界)解决Web问题。 之后,在Web开发人员社区的帮助下,PHP逐渐发展成为如今的编程语言。

Tell your friends about this post on Facebook and Twitter

FacebookTwitter上告诉您的朋友有关此帖子的信息

翻译自: https://www.phpied.com/30-seconds-ajax/

ajax30秒刷新页面