El mejor lenguaje para un sitio para compartir fotos: ¿PHP, Python, Ruby o algo más? [cerrado]

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.

preguntado el 08 de noviembre de 11 a las 13:11

It doesn't matter. YouTube is written entirely in Python, flickr entirely in PHP. Take whatever language you like. -

@Sven Marnach - will the performance be the same (at least nearly) if I choose any language? -

honestly, learn how programar. A few particular syntax rules doesn't matter too much. -

@BadLearner: As nightcracker said, the performance will depend on your code, not on the language. Eventually, it will also depend on your hardware. -

3 Respuestas

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 y 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.

Respondido 27 Feb 15, 23:02

out of interest, are there any decent C++ web frameworks? I don't know of many sites written in C++ The only site I know of is OkCupid. - Flukey

Here's the most popular one, I think: webtoolkit.eu/wt Not used it but I've heard it's meant to be quite good. - user542603

but just to be honest don't you think that a low-level language like C++ has more performance than a a memory managed on like C# - Qchmqs

@BadLearner: personally I'd pick either PHP or Python as those are the languages I'm most comfortable with. - user542603

@BadLearner: it depends. Personally, I'd pick a language and code everything in that. Then, look for performance problems. Say you're resizing images in PHP and it's taking a while, perhaps you could start doing that in C++ using a cronjob. But don't optimise prematurely! Just get writing code. Keep an eye on performance, sure, but don't worry about shaving off every millisecond you can until you're at least put a release out. - user542603

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

respondido 08 nov., 11:17

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.

Sin embargo, lo haces no want to use MySQL as a database. PostgreSQL is far more powerful and scalable, and doesn't have MySQL's silly limitations and gotchas.

respondido 08 nov., 11:18

But why is Twitter switching from Ruby then? - user860672

Because Twitter screwed up their initial design and wound up with something horribly inefficient. (They were one of the first big sites hosted on Rails, so at the time no one knew a lot of things we know now. But I understand that their database design was just agachado.) Instead of improving their Rails site to get the performance they needed (which would have been possible), they decided to replace a lot of the Rails stuff with Scala. Ravelry, OTOH, has built a big, high-traffic site with Rails and done it right. - Marnen Laibow-Koser

Also, remember this: you're probably not going to have the performance demands that Twitter has. Particularly if you're doing photo sharing: why would anyone use your site when Twitpic and Flickr already do it well? - Marnen Laibow-Koser

If that's the thinking of a developer, there would be no Google when Yahoo was doing great back then, and no Facebook today, when Orkut and MySpace were ruling the social networking world. IMHO. And thanks for the clarification about Twitter. - user860672

AFAIK, Postgres is best of all. It's certainly the best open-source SQL DB. If you want rápido, you might also look at MongoDB (which has a different set of limitations from SQL databases). - Marnen Laibow-Koser

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.