Live data from Hacker News

Why PHP won

startuplessonslearned.blogspot.com

21–30 of 61 posts

Re: Why PHP won

#21
post #6

Earlier quoted context omitted.

Item 2 should not really be a problem unless you are using cheap shared hosting. You should test your stuff on your workstation, not on the server. If you do not test on the server, the whole restart apache after you upload something becomes moot. Also, if you happen to change many files, what will users see in your application when half of the site uses new logic and half of it used the previous one? This is a nasty…

I think the point is that PHP grabs people when they're on cheap shared hosting and they continue using it as they build more complicated stuff.

And it's only recently with the rise of virtualization that we have any options besides cheap shared hosting and horrifically expensive dedicated server/colo.

Re: Why PHP won

#22
I'd love to refute this article, because it's incredibly depressing to suspect that it's on the money. There's not much hope for software engineering if the features that make for a poor language are also the ones that make it popular.

Re: Why PHP won

#23
post #9

This article is totally barking up the wrong tree. PHP's growth had little to do with its appeal to programmers, and lots to do with its appeal to shared hosting providers. Safe mode is what I'm talking about.

I wish I could upmod you more points. That's 50% of the reason right there.

mod_perl was a far superior solution, and you didn't have to restart Apache every time. However, this was not the default configuration, which is apparently enough to deter decently smart people.

Re: Why PHP won

#24
PHP won because mod_php was well done. The language isn't especially relevant. Perl's mod_perl was simply a no go for the typical hosting scenario because it gives way too much power to users to screw up the server; you can't realistically set it up for basic shared hosting.

mod_perlite is a new piece of software that brings a php style system to perl. It's mod_perl made suitable for typical hosting needs.

Re: Why PHP won

#25
post #22

I'd love to refute this article, because it's incredibly depressing to suspect that it's on the money. There's not much hope for software engineering if the features that make for a poor language are also the ones that make it popular.

It's popular because it's a great platform, not because of its poor language design.

Re: Why PHP won

#26
post #2

Good article. To add a few things: 1. PHP doesn't require routing. It's done for you by Apache to the PHP file at that location. Sure, you can go the way of nice frameworks like Cake and add routing for nicer URLs, but it's not required . PHP has some solution built in. 2. Deployment. The author touched on having to restart when using mod_perl, but it's more than that. In most cases, uploading files is enough. That's…

I'm a bit surprised that he didn't mention that PHP has very good documentation - virtually every function has a plain-english description (translated to multiple languages) followed by several usage examples and snippets that solve common real-world issues.

Re: Why PHP won

#27
Without getting off topic about what a good programmer is etc - One thing to point out that is relevant is the fact that there are a lot more beginner programmers than non-beginner programmers out there - all the content being generated around forums for performing specific tasks (code snippets and QA) created an insane feedback loop for the PHP community - I think that this is where PHP really beats out everyone else - There is much more google searchable support than any other language out there. Fast ROI of your time/instant gratification which fuels beginners to learn more/ask more questions generating more content and answering more questions.

Re: Why PHP won

#28
In the late 90s, when I began making webpages, there was a mysterious folder in my shared hosting FTP account called "cgi-bin." What is "Bin." I was on Windows. What is "CGI." A friend told me it had something to do with Perl. I didn't know anything about Perl, and everything I found on the web about it was difficult to understand.

After some experimenting with FrontPage extensions, I began to experiment more. I found a site called Matt's script archive that had Perl CGIs that I could actually understand. It was slow, slow going. I was coming from QBasic. I scoured the Web, mixing and matching bits of example code I'd found to make things like random quotation generators. Then a friend showed me something called PHP.

PHP, to me at the time, wasn't just a language - it was an ecosystem of developers, example code, and practices that was flourishing. There was consolidated documentation. There were global functions for any string operation I could conceive. But most importantly to me at the time, there was an active community who was interested in more than showing off their most arcane, clever, and obfuscated programs. Very early on, the PHP community could be characterized as "welcoming."

I would argue that PHP "won" not because of any innate technical superiority over any of the other languages available for web programming in the mid to late 90s. It won because it had the right kind of community for a new breed of developer - the "web programmer." It didn't have the stigma of snootiness that came with trying to figure out Perl. PHP was not for geniuses or academics; PHP was for people who wanted to make dynamic websites and not have to catch attitude from some asshole in IRC about not knowing what tail recursion is.

I don't use PHP anymore. I don't like PHP any more. I got into Java, JavaScript, C, even Prolog; and now, I'm into whatever will save me time, and scale. Language agnostic. I'm into parallelization and web services; why would I use PHP for anything more than toy projects? Yes - PHP is "easy." But at my current (thankfully temporary) job, I'm in charge of adding features and debugging a massive functionally-written PHP codebase. It is horrifying.

I think PHP is a great language for anyone to learn how to program with. I think there's a lot of shitty PHP code out there and it's easy to make a living by billing yourself as a PHP developer. It introduced me to "C-like" syntax of brackets and semicolons. It's an easy way to learn how to do neat things with SQL. Beyond that, it really just sucks, and no matter how much more crap they add on to it, I think it always will.

So what is the lesson here? PHP won because it had an excellent community. The Ruby/Rails uprising of the past few years reminds me a lot of the early PHP days. PHP made it easy for independent, inexperienced programmers to create dynamic web applications. Which was great. But having grown up and seen the world, I've rarely seen or worked with small teams of professionals, fluent in several languages, who have decided that PHP is the best way to implement a website. But hey - whatever floats your boat.

Re: Why PHP won

#29
post #22

I'd love to refute this article, because it's incredibly depressing to suspect that it's on the money. There's not much hope for software engineering if the features that make for a poor language are also the ones that make it popular.

There's no much hope in engineering at all if you don't give what its users are looking for.

While I am on it, not one of the article's points is about the language design or syntax. Maybe the fourth, about OOP, but it says something else: It's not really about OOP, but making what users want to do (grab form data, insert into db) incredible easy. The author makes the mistake to confuse OOP with bloatness, which is wrong in theory but right in practice. A lot of people that make web apps in Java make it utterly complex.

My point is that Python, Perl, Java, or any other language can do points 1, 2, 3 and 4. But they didn't (not blaming anyone here, just saying that it wasn't done), so you can have a nice engineered language, but they need to provide these four things to be more sucessful on the web. One thing doesn't exclude the other... but someone needs to do it :)

Re: Why PHP won

#30
as a former client used to say to me, "if i wanted a django developer, i could hit a few websites or forums and maybe find one. if i wanted a php developer, i could walk out into the middle of the street and start shouting, and find several very quickly."
Post reply on HN