Web 编程:Apache 模块:mod_python 与 mod_php
我在我的网站上使用 PHP 和 Apache(又名 mod_php
)已经超过 12 年了 开发工作。我最近发现了 python 及其真正的力量(我仍然不明白为什么这并不总是成为最著名的最好的产品)。 我刚刚发现了 Apache 的 mod_python
。我已经用谷歌搜索过,但没有成功,例如mod_python vs mod_php
。我想知道 mod_php
和 mod_python
在以下方面的区别:
- 速度
- 、生产力
- 维护 (我知道 python 是世界上最高效、最可维护的语言,但对于使用 Apache 进行 Web 编程也是如此)
- 功能的可用性,例如 cookies 和会话处理、数据库、协议等。
I've been using for more than 12 years PHP with Apache (a.k.a mod_php
) for my web
development work. I've recenlty discovered python and its real power (I still don't understand why this is not always the best product that becomes the most famous).
I've just discovered mod_python
for Apache. I've already googled but without success things like mod_python vs mod_php
. I wanted to know the differences between the two mod_php
and mod_python
in terms of:
- speed
- productivity
- maintainance
(I know `python is most productive and maintainable language in the world, but is it the same for Web programming with Apache) - availability of features e.g, cookies and session handling, databases, protocols, etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的理解是,PHP 的设计考虑了 Internet/Web,但 Python 的目的更通用。
现在大多数人都离开 mod_python 而选择 mod_wsgi,后者更加健壮和灵活。
回答其他问题:
Python 在 Web 上并不流行,因为它根本不专注于 Web。它有太多的Web框架(比编程语言还多的框架),因此社区没有Ruby on Rails那么强大。
My understanding is that PHP was designed with Internet/Web in mind, but Python is for a more general purpose.
Now most people are leaving mod_python for mod_wsgi, which is more robust and flexible.
To answer other questions:
Python was not popular on web because it wasn't focused on web at all. It has too many web frameworks (more frameworks than programming languages), so the community has not been as strong as Ruby on Rails.
PHP 在互联网主机上比 Python 更广泛使用。
我在我的一个 Python 网站上注意到,如果我是第一个使用 Python 的用户,那么在该 Internet 主机上,Python 服务的启动时间可以以分钟为单位。大多数人不会等待几分钟来弹出网页。
Python 具有与 PHP 相同的 Web 功能(cookie、会话处理、数据库连接、协议)。
PHP is more widely available on Internet hosts than Python.
I've noticed on one of my Python web sites that if I'm the first user to use Python, on that Internet host, the start up time of the Python services can be measured in minutes. Most people won't wait minutes for a web page to pop up.
Python has the same web features (cookies, session handling, database connections, protocols) as PHP.