39 ms·
>There must be some other advantages over this badly picked function names. Very easy to learn
by romanovcode 13y ago
>There must be some other advantages over this badly picked function names.
Very easy to learn
- berkes 13y agoI'd always argue against this. Python is, by far, easier to learn. Python was, after all, designed as a language to teach programming. The issue is, that people often compare apples and oranges here: Good, SOLID, and well-architectured OOP PHP applications (YII, Zend) are far harder to learn then Django or Rails. It is unfair to compare the "hacking of a free WordPress theme" to "setting up and deploying a full MVC application in Rails". When you compare similar stacks, PHP is, nearly always, the harder-to-learn choice. A simple, hacked-together sequential script serving a webpage is, by far, easier in both Python and Ruby then in PHP. If only for the fact that both Python and Ruby come with decent, built-in webservers. PHP has gotten this in the latest release only, but before, a fair comparison would be: a PHP app requires you to erect a full LAP-stack, whereas a python-script could be serving pages on the most barebone machine with Python installed. Again, the very beginning of PHP might seem easier to learn, because in practice, a lot of the infra is there and a lot of groundwork is already done (LAMP-stacks come for almost free; Passenger or Fastcgi not so much, allthough they are there). And then, when going a bit further then "removing these two menu-items in a WP-theme", when moving into the area of proper designed, maintainable webstacks, PHP is a lot harder to learn. And when moving one step further, e.g. including stuff like asyncronous workers, long-running-threads, commandline-tools, and so forth, PHP is often even completely unable to cope, but in the very least, proves a really hard and cumbersome tool.
- Sharlin 13y agoYou're correct, but unfortunately that's not the point. PHP makes it very easy to learn to write ugly hacky code quickly, and in the beginning, that's all that matters - the person learning simply doesn't know any better.
- Tloewald 13y agoWhen comparing stacks, (1) to serve a PHP page you upload it to the server and you're done, (2) a basic PHP page is a web page. Python just lost. (Not that I don't prefer python.) It's not PHP, it's mod_php that makes PHP so easy to use.
- todorstoyanov 13y agoYep, I think Rails is easier to learn compared with Zend, which is over-designed for me. I will choose CodeIgniter in the shared hosting world, but in the cloud age haha, you can host almost everything for free - Spring, Rails, Django. So this can change the things, except for "Brochure Web Sites" where WordPress is the king.
- spmurrayzzz 13y ago> If only for the fact that both Python and Ruby come with decent, built-in webservers. With PHP 5.4+: `php -S 0.0.0.0:8000`, just as useful as SimpleHTTPServer. And I wasn't aware of Ruby coming with a web server. I know of WEBrick for Rails -- but is there a standard module that Ruby ships with that's similar to the above PHP and Python servers?
- berkes 13y agoWebrick comes in the <a href="http://www.ruby-doc.org/stdlib-2.0.0/libdoc/webrick/rdoc/index.html">Std-lib</a> http://www.ruby-doc.org/stdlib-2.0.0/libdoc/webrick/rdoc/ind.... I explicitely mentioned that the latest release of PHP comes with the built-in -S server. But that before this, it was always either install *AMP of some variation, which is, frankly a lot harder. And even now, Whereas Rails requires a few commanline commands, a CMS like Drupal still needs quite some fiddling to get it ro run on your localhost. (Source: I have been professional Drupal trainer for years) But let me note that neither three of these servers are anything good for production. But, for small (internal) projects, `SimpleHTTPServer`, `Webrick` or even `php -S` might suffice, especially when behind a reverse proxy. Yet of all three, Webrick is especially slow, and php-s is especially memory-leaking and unstable.