3 ms·
Apparently Wikipedia, Facebook, Flickr, Wordpress.com, Facebook, Yahoo, Digg... haven't hit that complexity ceiling yet :) (Some of these use other languages as
by nir 17y ago
Apparently Wikipedia, Facebook, Flickr, Wordpress.com, Facebook, Yahoo, Digg... haven't hit that complexity ceiling yet :) (Some of these use other languages as well, but AFAIK it's stuff like Java or Erlang for particular tasks)
PHP is far from perfect, and personally I've also moved from it to Ruby and Python, but the automatic "switch from PHP to anything" on a language that powers so much of the web is meaningless.
- nostrademons 17y agoWordpress has definitely hit the complexity ceiling; just look at all the security vulnerabilities and random bugs published for it. ;-) FaceBook and I think Yahoo both make heavy use of an RPC-based, service-oriented architecture. They use PHP for the frontend but then call out to backends to do any sort of complicated processing. This is basically the only sane way to architect a large system. While I think their choice of PHP to power the front-end is regrettable (it's a major reason why I didn't apply to FaceBook), it's at least defensible. And I'm also a PHP->Python refugee - I used PHP on a bunch of projects in college, one of which got to the 100k-to-million-user range. I would not take a PHP job unless I was desperate for cash; I hate the language that much.
- nir 17y agoAFAIK in its recent versions PHP doesn't have any unique design flaws that make them more vulnerable to attacks. In fact, being the most widely deployed web language means it probably had more security patches than most. Bugs and vulnerabilities in applications are certainly not unique to PHP.. I wouldn't take a PHP gig either. I would also prefer Ruby work to Python, since I enjoy it more. But that's my selfish interest as developer, it doesn't mean that for the project itself PHP isn't, sometimes, the best option for the project. For people who want to create a web app and don't have much programming experience, PHP can still be the best choice - it's easy to deploy, it has great official and unofficial docs, it's easiest to find developers for and it's pretty reliable. Now, this may sound crazy to many, but not only PHP has some good sides, a lot of them come from intelligent choices its designers made: for example, PHP script only runs in context of the request - no application server here - which helps reliability since memory leaking etc scripts can't cause too much harm. PHP's basically saw itself merely as an Apache module - in a rare, pre-hyposhpere display of egoless coding - making it extremely easy to deploy (compare and contrast with Rails before Passenger). The fact it comes with so many libraries welded into the common namespace is ugly for me, but a boon for beginners, and the fact you can mix PHP and HTML allowed many web designers to tinker with it, gradually moving from design to HTML to PHP - one of whom ended up writing Wordpress, I think :)
- strlen 17y agoWith the (possible?) exceptions of Wikipedia and WordPress PHP is used by these sides for the fairly thin front-end layer. The core algorithmic functionality is implemented in (usually) Java and C++ and occasionally Erlang, Python and Perl. In fact, I am willing to argue that there's more reason to use something else if your app is simpler (i.e. it's a monolithic web application): you can add functionality without resorting to a more complex multi-tier/service oriented architecture or writing C-based extensions.
- nir 17y agoThe article is about PHP & Python. Erlang, C++ and Java don't really compete in the same space - I doubt writing any of these sites in Python would mean they wouldn't need Erlang or C++.
- strlen 17y agoPython is, in many cases, a serious contender for Java and C++. E.g. if you're dealing with any sort of machine learning (suppose you wish to add a recommendation engine to your site), Python (e.g. with NumPy) is more than capable of that (although these scripts will generally ran standalone, they could still use the same libraries for fetching user data). Yes, there are many cases where Python/Perl/Ruby can't do what Java/C++/Erlang can, but their capabilities stretch far longer than those of PHP. PHP essentially limits you to front-end web development; writing standalone scripts/tools/daemons in PHP -- been there, when a boss at a startup I worked in refused to allow me to use any other language -- is horribly painful. There's a progression between "simple CRUD pages" and "complex, service oriented architecture". Python can fill a lot more on that continuum.