PHP 框架(CodeIgniter、Yii、CakePHP)与 Django

发布于 2024-08-28 02:16:15 字数 218 浏览 4 评论 0原文

我必须开发一个每天要容纳大约 2000 个用户的网站,速度是一个标准。此外,该网站是一个面向用户的网站,用户可以登录并检查他的个人资料,注册他/她想要参加的特定活动。该网站将托管在 VPS 服务器上。虽然我有使用 python 和 PHP 的经验很好,但我不知道如何使用这两个框架。我们有足够的时间来试验和学习上述框架之一。您能否指定考虑到网站的速度、功能和安全性,对于这种情况首选哪个框架。

谢谢, 尼宁

I have to develop a site which has to accomodate around 2000 users a day and speed is a criterion for it. Moreover, the site is a user oriented one where the user will be able to log in and check his profile, register for specific events he/she wants to participate in. The site is to be hosted on a VPS server.Although I have pretty good experience with python and PHP but I have no idea how to use either of the framework. We have plenty of time to experiment and learn one of the above frameworks.Could you please specify which one would be preferred for such a scenario considering speed, features, and security of the site.

Thanks,
niting

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

溺孤伤于心 2024-09-04 02:16:15

这是一个非常主观的问题,但我个人推荐 Django。 Python 是一种非常好用的语言,Django 框架很小、易于使用、文档齐全,并且还有一个非常活跃的社区。

做出这个选择的部分原因是我不喜欢 PHP,所以对这个建议持保留态度。

This is a very subjective question but personally I'd recommend Django. Python is a very nice language to use and the Django framework is small, easy to use, well documented and also has a pretty active community.

This choice was made partly because of my dislike for PHP though, so take the recommendation with a pinch of salt.

樱花落人离去 2024-09-04 02:16:15

如今大多数框架的速度都足以满足您的任何需求。这实际上取决于您在哪种环境中感觉最舒服。尽管存在细微差别,但 MVC 框架有很多相同的原则,因此无论您选择使用哪个,实际上都是您最喜欢使用哪个。

所以,如果您更喜欢 Python,这就是您的答案。使用Python框架,Django是最好的。如果您更喜欢 PHP(我个人并不喜欢),那么您还需要做出更多决定。但任何 PHP 框架都可以。他们确实是。只需选择一个看起来不错且具有全面文档的产品即可开始工作。

Most of the frameworks out there nowadays are fast enough to serve whatever needs you will have. It really depends on in which environment you feel most comfortable. Though there are nuances here and there, MVC frameworks share a lot of the same principles, so whichever you choose to use is really a matter of which you most enjoy using.

So, if you like Python more, there's your answer. Use a Python framework, and Django is the best. If you like PHP more (which I personally don't), you've got some more decisions to make. But any of the PHP frameworks are fine. They really are. Just pick one that looks nice with comprehensive documentation and get to work.

旧情别恋 2024-09-04 02:16:15

我曾使用过 CakePHP 和 Django,我真的推荐 Django。我对 CodeIgniter 不太了解,但我记得大约一年前我自己评估框架时排除了它。 CakePHP 当时看起来更加发达。

首先,Django 社区规模更大,并且花费了大量时间专注于可重用应用程序。这意味着您可以免费获得很多功能。将其与 django admin 配对,您已经为您完成了很多事情。我不太了解 PHP 框架,但我很确定 Django 也更发达。

这更多是个人的事情,但我只是喜欢 Python 而不是 PHP。比较 CakePHP 和 Django 中模型的完成方式: http://book.cakephp.org/ view/67/Understanding-Models http://docs.djangoproject.com/en/dev/topics/db/models/#topics-db-models。 python 显然更具可读性。

请记住,Django 为您提供了一个很棒的 ORM 并为您构建模式,即,如果您不想,您永远不必接触数据库。使用 PHP 框架,您必须进行自己的数据库设计,这只会减慢我的速度。您可以随时进入并添加索引以提高速度。

这可能是最有偏见的,但如果您要开始一个新的应用程序(认真地说),请坚持使用 Django 或 Ruby on Rails。每个人都在谈论它们是有原因的,他们背后有最大的社区和最好的开发人员。

您还可以查看 Pinax 获取许多 Django 好东西。

I've worked with CakePHP and Django and I really recommend Django. I don't know too much about CodeIgniter, but I remember ruling it out when I was evaluating frameworks myself about a year ago. CakePHP seemed much more developed at the time.

First of all, the Django community is much bigger and has spent a lot of time focusing on reusable apps. This means that you get a lot of functionality for free. Pair this with the django admin, and you have a lot of things already done for you. I haven't kept up with the PHP frameworks much, but I'm pretty sure Django is also more developed.

This is more of a personal thing, but I just like Python over PHP. Compare the way models are done in CakePHP and Django: http://book.cakephp.org/view/67/Understanding-Models, http://docs.djangoproject.com/en/dev/topics/db/models/#topics-db-models. The python is clearly more readable.

Keep in mind that Django gives you an awesome ORM and builds your schema for you, i.e. you never have to touch the database if you don't want to. With the PHP frameworks, you have to do your own db design, which just slows me down at this point. You can always go in and add indexes for speed later.

This is probably the most biased, but if you are starting a new application - seriously - just stick with Django or Ruby on Rails. There is a reason everyone talks about them and they have the biggest communities and best developers behind them.

You can also check out Pinax for a lot of Django goodies.

荒芜了季节 2024-09-04 02:16:15

Codeigniter 速度快,文档丰富,还拥有一个大型社区,对程序员来说非常友好。

Codeigniter it's fast and very documented also has a large community to and finaly friendly with the programmer.

懵少女 2024-09-04 02:16:15

CodeIgniter 是一个出色的 PHP 框架,速度快且具有优秀的文档。开始阅读他们的用户指南,它将让您很好地了解如何使用该框架。

CodeIgniter is a great PHP framework that is fast and has excellent documentation. Start reading through their user guide and it will give you a good idea how to work with the framework.

冷︶言冷语的世界 2024-09-04 02:16:15

扩展 Matchu:

或者,-如果您更喜欢 PHP,那么是时候学习/成长其他东西,例如 Python。它并不难学,而且当你开始学习时,它会变得非常有趣。

许多人都完成了 PHPtoPython/Django 移植,例如 Mozilla、Netgeo、Nasa、洋葱

Extending Matchu:

Or, -If you like PHP more- its time to learn/growup about other things like Python. Its not hard to learn, and when you get started it gets very enjoyable.

Many people has done the PHPtoPython/Django port, like Mozilla, Netgeo, Nasa, TheOnion, etc.

时光礼记 2024-09-04 02:16:15

如果对于 PHP 部分,我会选择 CodeIgniter - 它不会对您造成太大影响。但它没有任何现成的代码/视图/模型生成器,您需要输入一些内容。

但除 PHP 之外的语言似乎更性感。

If for the PHP part I would choose CodeIgniter - it doesn't get too much into your way. But it doesn't have any code/view/model generators out of the box, you need to type a bit.

But languages other than PHP appear to be more sexy.

ゞ花落谁相伴 2024-09-04 02:16:15

我正在使用 CodeIgniter 1.7.2,对于复杂的网站来说,它非常好且功能强大,但它肯定缺少某种代码生成器,例如允许一键构建 IT 应用程序。
我(通过观看教程)得到的印象是 Django 拥有它。

I am using CodeIgniter 1.7.2 and for complex websites it's very good and powerfull, but it definitely is missing some kind of code generator which will allow for example to build an IT application in one click.
I had the impression (from watching a tutorial) that Django has it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文