最适合照片共享网站的语言:PHP、Python、Ruby 还是其他语言?

发布于 2024-12-14 02:12:04 字数 360 浏览 0 评论 0原文

我计划为摄影师建立一个像 Flickr/Picasa 这样的照片共享网站,并提供最适合他们的功能。如您所知,如果该项目获得成功,每天都会发生大量 GB 到 TB 的数据传输。

这个问题不仅涉及我的应用程序随着其增长的可扩展性,还涉及性能。我想做出明智的决定。我想我会使用 MySQL 数据库,JavaScript/jQuery 用于客户端脚本,但问题是使用什么服务器端语言 - PHP、Python、Ruby 还是其他语言?

在开发需要在一段时间内扩展的应用程序(即可扩展编码)时,肯定需要记住一些事情。如果您想提出任何建议,它们是什么?

注意:我指定“照片共享网站”是为了让您了解我的使命。不然这个问题就不会显得那么主观了。请这样理解。

I plan to build a photo-sharing site like Flickr/Picasa for photographers, with features most suited for them. As you know, if that venture proves successful, many GB to TB of data transfers take place every day.

This question is not just about scalability of my application as it grows, but also performance. I would like to make an informed decision. I think I'd go with MySQL database, JavaScript/jQuery for client-side scripting, but what server-side language with it, is the question - - PHP, Python, Ruby or something else?

And there are definitely somethings to keep in mind when developing an application (i.e., scalable coding) that needs to scale over a period time. If any that you would like to suggest, what are they?

NOTE: I am specifying "Photo-sharing site" in order to give you an idea of my mission. Otherwise, this question wouldn't look as subjective. Kindly take it that way.

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

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

发布评论

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

评论(3

别再吹冷风 2024-12-21 02:12:04

任何。语言并不重要。 Ruby 狂热者(尤其是 RubyOnRails 类型)会尝试告诉您,他们的语言只需 10 行即可完成所有操作并且它可以为您做饭并接孩子放学。其他人会告诉你他们的语言是最安全的、最快的、最快开发的等等。忽略他们。

我喜欢 Python 并且很乐意推荐它 - 但说真的,它不会有什么不同。只需选择您最熟悉的语言并开始写作即可。因此,如果那是 Java,就开始编写 Java。如果那是 C++,见鬼,开始编写 C++。

我不相信那些说[此处插入语言]发展最快的人。这完全取决于你觉得舒服的东西。有些语言提供了额外的功能,但如果您需要的话,您总是可以编写一个库来提供这些功能 - 它不会花费太长时间,而且很可能有人已经做到了。

请记住:Facebook 是用 PHP 编写的(尽管为了速度,他们现在将很多 PHP 编译为 C++),MySpace 是用 C#/ColdFusion 编写的(我相信),Twitter 使用 Ruby On Rails(尽管他们显然计划放弃它), Google 使用 Java/Go(我认为),LinkedIn 使用 ASP.net 或我认为的其他东西。我的观点是——大量的服务、大量的语言,而且它们都做得很好。现在,任何语言都可以。

我最喜欢的一句话是“just build it”。虽然拥有一个好的架构并考虑性能和可扩展性是个好主意,但如果这些事情会让您中途放弃该项目,那么烦恼又有什么意义呢?此外,假设项目不断增长,您以后很可能需要重新编码其中的很大一部分。真的认为 Facebook 正在使用与一开始相同的代码吗?

因此,总而言之,选择您想要的语言。会没事的。

Any. The language doesn't matter. Ruby-fanatics (especially the RubyOnRails sort) will try and tell you that their language will do everything in only 10 lines and it'll make you dinner and pick the kids up from school. Others will tell you that their language is the most secure, fastest, quickest to develop in, etc. Ignore them.

I love Python and I'd love to recommend it - but seriously, it won't make a difference. Just pick the language you know the best and get writing. So if that's Java, start writing Java. If that's C++, hell, start writing C++.

I don't believe the people who say that [insert language here] is fastest to develop in. It's all about what you find comfortable. Some langauges provide extra functionality but you can always write a library that provides that if you need it - it shouldn't take too long and, chances are, someone has already done it.

Remember: Facebook is written in PHP (though they compile a lot of that PHP to C++ now for speed), MySpace was written in C#/ColdFusion (I believe), Twitter uses Ruby On Rails (though they plan to abandon it apparently), Google uses Java/Go (I think) and LinkedIn uses ASP.net or something I think. My point is - tonnes of services, tonnes of languages and they're all doing ok. Right now, any language will do.

My favourite little phrase is "just build it". Whilst it's a good idea to have a nice architecture and think about performance and scalability - if those things will make you abandon the project half way through, what's the point in bothering? Besides, chances are you'll need to recode a large part of it anyway later on, assuming the project grows. Really think that Facebook are using the same code they were at the start?

So, in summary, pick whichever language you want. It'll be fine.

北凤男飞 2024-12-21 02:12:04

PHP 可以很好地做到这一点。 Python 还可以使用 Django 或turbogears 等网络框架来完成此操作。
话虽这么说,只要它具有您的帖子似乎规定的网络功能,语言就不是问题

PHP can do it well. Python also can do it using web frameworks like Django or turbogears.
That being said, language is not an issue as long as it has web capabilities which your post seems to dictate

z祗昰~ 2024-12-21 02:12:04

我已经使用 PHP、ColdFusion、Java 和 Ruby 以及各种框架完成了 Web 应用程序。我发现 Rails 是我用过的最强大的 Web 框架。没有什么可以真正与它相媲美,因为它的力量来自 Ruby 语言,没有其他语言(也许除了 Smalltalk)可以真正与之相媲美。也就是说,只要您使用正确的开发实践,您应该能够用几乎任何语言来完成它。

但是,您不想想要使用MySQL 作为数据库。 PostgreSQL 更强大且可扩展,并且没有 MySQL 的愚蠢限制和陷阱。

I've done Web applications in PHP, ColdFusion, Java, and Ruby, with various frameworks. I find Rails to be the most powerful Web framework I've ever used. Nothing can really equal it, because the power comes from the Ruby language, and no other language (except maybe Smalltalk) can really equal that. That said, as long as you use proper development practice, you should be able to get it done in almost any language.

However, you do not want to use MySQL as a database. PostgreSQL is far more powerful and scalable, and doesn't have MySQL's silly limitations and gotchas.

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