Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't think you understand PHP's greatest strength. It's all about the right tool for the right job for the right man.

PHP was invented so that designers could add a <p>Hello <b>Martin</b></p> and think it was cool that their homepage showed different names based on who you were. For most people basic functionality and the ability to connect to a database is more than enough. You can probably write up more than 90% of all webpages without using closuers, lambdas, recursive functions, object oriented programming and what have you. And the people who write these webpages don't care about programming at all, they just want the job done. These quotes from Rasmus shows where he's coming from.

You can of course argue that people shouldn't launch webpages if they don't know what they're doing, the terrible safety concerns of letting idiots code stuff for the web, etc. but it would be like scoffing at people who don't drive an extra souped up Ferrari Enzo - very arrogant. Some pople just want to get from A to B. These are the people who use PHP. And incidentally they are also the people down in the trenches actually building all the little sites that make the world go round.



> It's all about the right tool for the right job for the right man.

Oh, come on. Give me an instance where PHP is the right tool.

This argument is so overused that I don't even know what it means anymore.

And no, shared hosting doesn't count. My personal hosting plan costs something like $10 a month and I can choose between PHP, Python, Perl and Ruby (with Ruby it is more difficult, since I have to ask the sysadmin to add a couple of Mongrel instances for me). But mod_perl and mod_wsgi are there by default.

> <p>Hello <b>Martin</b></p>

Dude, that doesn't have any PHP code in it. To make this dynamic, you still have to have some way of authenticating and storing info about users. And you'll also want some way to edit those users.

Do you know how easy it is to create a simple CMS in Django, with authentication, and a functional admin? ... it takes only a couple of hours to a beginner that never worked with Python or Django before (yes, I saw one in action).

When PHP appeared, it made sense since Perl was the only game in town, and it was a bitch. But things have evolved a lot since then (even for Perl). For me, PHP doesn't make any sense.


> <p>Hello <b>Martin</b></p>

Dude, that doesn't have any PHP code in it. To make this dynamic, you still have to have some way of authenticating and storing info about users. And you'll also want some way to edit those users.

Dude, he was saying they could add personalization to the page.


> Do you know how easy it is to create a simple CMS in Django, with authentication, and a functional admin?

Frameworks have their place. PHP has a number of frameworks that can also make this claim. I would say raw PHP fits nicely where frameworks don't.

And <p>Hello <b><?php echo $_SESSION['first_name']; ?></b>!</p>. Populate SESSION however you like, whether it's from a database or a simple form submission.


> Oh, come on. Give me an instance where PHP is the right tool.

Even today, if you have a lot of HTML, and you want to add just a little bit of dynamic functionality to it, PHP is easy and fast.


But so is JSP, ASP, Mason, etc.


ASP, I'll agree; it occupies the "PHP" slot in Win32. JSP and Mason are far less likely to be available on a given server, and JSP requires a separate server to be running in addition to the webserver (tomcat or whatever).


With the declining popularity of Apache as the frontend server, I think PHP will have this problem in the future. Eventually everything will just be a FasgCGI handler. (PHP does FastCGI just fine, but so does Python/WSGI, Ruby/Rack, Perl/Plack, etc.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: