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.
Why PHP won
21–30 of 61 posts
Re: Why PHP won
#22Re: Why PHP won
#23This 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.
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
#24mod_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
#25I'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
#26Good 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…
Re: Why PHP won
#27Re: Why PHP won
#28After 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
#29I'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.
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 :)