В защиту PHPи JAVA ;)

Многие плюются на php, есть даже шутка:
Вы указали в резюме знание php.. Вам не стыдно?
По факту же довольно большое количество крупных сайтов его используют. Чаще всего это не “чистый” PHP, а высокопроизводительные детища в виде HipHop от FB (его использует и Wiki) или KPHP от VK, но, например, jruby тоже не совсем Ruby. Можно добавить в список WordPress, на котором половина интернета 😉
Очень понравился в этом контексте комментарий на stackoverflow – проблема не в php, проблема в низком уровне входа (разве это минус?), который возможен в php и плохом из-за этого программировании на нем.
I really hate it when people say flat out that PHP is a terrible language because you can write code which mixes presentation with logic, or that it lets you allow SQL injection. That's nothing at all to do with the language, that's the developer.
PHP has proved itself to be highly scalable: Wikipedia is one of the largest and most popular sites on the Internet and it runs PHP. Enough said?
There are a lot of tools/libraries out there that give you a framework to work in, making it less likely that someone will write poor, less-maintainable code: see CakePHP, Symfony, PDO, Smarty, etc etc etc.
It has received a bad rap because it's a language which has very low barriers to entry: it's free, you can get very cheap PHP hosting, the documentation is the best there is, there's plenty of tutorials online, plus it makes a lot of things very easy (eg: open a URL and get the contents of the file: file('http://www.google.com');). This means that a lot of newbies picked it up and made a lot of very dodgy sites with it, but that's going to happen with whatever language you choose as your first.
Work with a solid ORM framework (there's about 30 questions on SO about which is best), and it will treat you good.

Яркий пример того, что не следует делать категоричные выводы – twitter, который мигрировал с ruby (RoR) на java по причине, которой многие эту java пинают – скорость. Аналогично и high frequency trading приложения, которые часто пишутся на java.

Вывод: нужно смотреть конкретные проблемы языка в ваших сценариях применения, а не плеваться на язык в целом.

Leave a Reply