python 后端有什么用途?
我主要是一名 PHP 开发人员,最近浏览了一些开源应用程序(特别是 Mozilla Bespin)的源代码,发现其中一些使用 Python“后端”。我只是想知道这个后端的目的是什么。我假设它与 MVC 框架中的模型相同,用于与数据库交互,但我不确定。如果我是对的并且后端用于简单地与数据库交互,那么 sqlite/mysql 服务器是否包含在后端中,因为我在安装说明中没有看到任何数据库配置信息?
I am primarily a PHP developer, and I have been browsing the source code of a few open-source applications recently(Mozilla Bespin in particular), to find that some of them use a Python "back-end." I was just wondering what the purpose of this back-end is. I am assuming it is the same thing as the model in an MVC framework and is used to interface with the database, but I'm unsure. If I'm right and the back-end is used to simply interface with the database, is the sqlite/mysql server included in the backend, because I didn't see any database config information in the install directions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“Python 后端”只是用 Python 编写的服务器端软件,一般来说与用 PHP 编写的服务器端软件没有什么不同。它做所有相同的事情,只是使用不同的编程语言。
A "Python backend" is simply server-side software written in Python, no different in general terms than server-side software written in PHP. It does all the same things, just with a different programming language.
看起来 Bespin 使用 Python 的方式与使用 PHP 的方式相同,如果作者选择 PHP 而不是 Python。
如果您是一名 PHP 开发人员,那么您已经是一名“后端”程序员并且您已经知道它的作用,唯一的区别是用于执行此操作的编程语言。
一些网站(大多数是 Facebook 或 Twitter 等大型网站)比通常的 MVC 网站包含更多层。如果您查看 Facebook,您可以看到生成 HTML 和 AJAX 响应的 PHP 脚本作为“前端”,高性能数据库、存储、计算集群、应用程序服务器等作为“后端”(其中 PHP 是很少使用)。那么什么被认为是“前端”,什么是“后端”可能也取决于你如何看待它。
It looks like Bespin uses Python in the same way it would use PHP, if the autors chose PHP and not Python.
If you are a PHP developer, you already are a "back-end" programmer and you already know what it does, the only difference is the programming language that was used to do that.
Some web sites, mostly the huge ones like Facebook or Twitter, consist of more layers than the usual MVC ones. If you look at Facebook, you can see PHP scripts that generate HTML and AJAX responses as the "front-end" and high-performance databases, storage, computation cluster, application servers etc. as the "back-end" (where PHP is rarely used). So what is considered "front-end" and what "back-end" may also depend on how you look at it.