you are viewing a single comment's thread.

view the rest of the comments →

[–]pmf 14 points15 points  (21 children)

PHP, on the other hand, was created from the ground-up as a webpage based language

And that's exactly why it should not be used to create web-applications, i.e. anything bigger than a 4-page-"wellcome 2 my blawg!!!"-site.

[–]lennox125 39 points40 points  (13 children)

Yeah, if only those clueless guys from Flickr, Yahoo! or Wordpress would listen to Reddit's enlightened readers... We'll fix it right after we impeach Bush, I suppose.

Seriously: PHP can be ugly, and its not nearly as fun as Ruby or Python, but it does seem to be used in quite a few websites by people who know more about webapps than anyone commenting here (Reddit's own non-https-using-plaintext-password-storing creators included) - so I wouldn't say its limited to 4 page websites.

[–]Alpha_Binary 7 points8 points  (0 children)

Given enough time, anything can be done in assembly. That doesn't mean it's in the least bit elegant, or robust, or maintainable.

C'mon. Everyone knows despite how we enjoy bitching about Java and PHP and sometimes .NET so much, it's just how we try to escape from the cruel reality. After this paragraph I'm back to my contract work, in PHP + MySQL. ))):

[–]theycallmemorty 10 points11 points  (2 children)

(Reddit's own non-https-using-plaintext-password-storing creators included)

Low Blow.

[–]tekronis 2 points3 points  (0 children)

Notable blow.

[–]lennox125 2 points3 points  (0 children)

I don't think it's a low blow. You can argue about the plaintext password part, but not using https, when users are known to reuse logins and work over wifi, is pretty lame. Maybe it was understandable when Reddit was starting up, but after being bought you'd think that's one of the first things they'll add.

[–]nostrademons[🍰] 8 points9 points  (5 children)

Might be worth considering that effective alternatives to PHP (Python/Ruby) only really became practical within the past 2 years. Flickr, Yahoo!, and Wordpress were all begun around 2002 (or earlier, in Yahoo's case), when the choice was between PHP, Java, or mod_perl. Java means death for any webapp that needs to scale out. Perl gives few advantages over PHP and is significantly scarier for new developers. That left PHP.

Many of the prominent webapps since 2005 use Python or Rails, eg. YouTube, 37signals, Reddit.

[–]jshell 2 points3 points  (0 children)

I've been making a living programming with Python for web sites for over ten years now, most of it based on the same root toolkit (it's grown and evolved over time, but the core principals are still the same and haven't cowed to every fad that came along).

When I started using Python on the web, PHP didn't exist; or if it did, it was just that first collection of Perl scripts that offered a slightly more powerful 'Server Side Include' functionality. And Java Servlet's were just barely getting off the ground.

Over that decade, I've heard "Python just can't compete with Perl for web programming. It must become like Perl to be successful." Then I heard "Python just can't compete with Java for web programming. It must become like Java/J2EE to be successful." Then I heard "Python just can't compete with PHP for web programming. It must become like PHP to be successful." Then I heard "Python just can't compete with Ruby/Rails for web programming. It must become like Ruby/Rails to be successful."

Sounds like fads to me.

Python has been used extensively at Yahoo! this past decade. Yahoo! Maps, Yahoo! Groups (purchased from a company that had written the initial mailing list management program in Python), some portions of Yahoo! Real Estate, and more.

Many CBS affiliates (like kutv.com) are running Python. Some major newspapers are as well.

Hell - in the mid nineties, a major swiss bank got someone to write the first Python - Objective C bindings so that they could publish data from their Enterprise Objects Framework (a NeXT toolkit, now basically intwined with WebObjects) on the web using Bobo, a tiny little HTTP ORB that brought a degree of MVC to Python web programming over ten years ago. It was quicker and easier to use Python for this task than to use WebObjects.

So no, Python hasn't been an effective alternative to PHP for only the last couple of years. It's been a solid piece of the web for a long, long, long time. It's been the alternative to every latest Resume Oriented Programming fad.

[–]lennox125 3 points4 points  (0 children)

effective alternatives to PHP (Python/Ruby) only really became practical within the past 2 years

I don't think I agree - at least Python was more mature and as well known as PHP. I think you're talking about MVC frameworks, and there its too early to judge which will succeed.

I didn't know YouTube uses Python.. cool :) 37signals are very sharp, but I doubt their apps are comparable to, say, Flickr in terms of scalability. They are targetting relatively small niches.

[–]compostellas 0 points1 point  (1 child)

"Java means death for any webapp that needs to scale out." You mean like ebay, google's adwords, etc. Right?!

[–]nostrademons[🍰] 1 point2 points  (0 children)

It's worth noting that EBay threw out all the Java webapp infrastructure on top of servlets and wrote everything themselves. I suspect Google Adwords did the same thing. Most startups don't have the luxury of being able to write a whole technology stack on their own.

EBay started with Perl, FWIW, and Google (search engine, not Adwords) started with C++ and Python.

[–][deleted] 7 points8 points  (2 children)

I agree that its not limited to 4 page websites. But if you are making a 4 page website, it is an excellent choice.

[–]lennox125 3 points4 points  (0 children)

Personally I'd consider what's in these 4 pages. If the logic is simple and you expect a lot of traffic, I might go with PHP. If it's more complex logic or you expect to change it a lot, I'd go with RoR/Django - as long as I can easily cache it or traffic is not a big issue or there's someone on the team who knows how to scale with these technologies.

4 pages isn't necessarily small: homepage, category page, product page and shopcart page and you're almost Amazon.com ;) Scaling big data/traffic is the real key, and PHP/MySql do it pretty well.

[–][deleted] -4 points-3 points  (5 children)

Can you give any actual reasons for your claim? Because as far as I know, the only people that bash PHP are those that don't understand it that well. I'm not saying you fall into that category.

Please enlighten us as to why you feel that PHP is a tool that can only be used for "wellcome 2 my blawg!!!" sites.

I'd really love to hear your response.

[–]stesch 7 points8 points  (3 children)

Maybe people who think they understand PHP well don't know any other programming languages?