4 ms·
I can set up a new Django environment in virtualenv, using Pip in about 15 minutes (using sqlite) without using a 'skeleton' template. Having not touched PHP i
by bmelton 14y ago
I can set up a new Django environment in virtualenv, using Pip in about 15 minutes (using sqlite) without using a 'skeleton' template. Having not touched PHP in years, it would almost certainly take me longer to get PHP up and running with Nginx/Apache.
With Django 1.4's templates, you get more speed boost on setting up each app. With 'manage.py runserver', you don't even have to mess with Apache/Nginx to get running.
Regardless, comparing "PHP" to Django isn't particularly fair, even though I would argue that it isn't as one-sided as you make out. You can get started in Flask in slightly more than the time it takes to type 'pip install flask'.
If you're baselining PHP to Python, then know that Python has a much greater penetration on Unix servers, though arguably 'web hosting providers' are also very likely to have PHP installed (if it isn't dedicated).
Since you brought up Django, how long does it take to get started with CodeIgniter or Symfony (a better comparison to Django)?
- smacktoward 14y agoIf you're a real newbie, terms like "virtualenv" and "Pip" are much harder to wrap your brain around than "unzip this ZIP file into your web root", which is the way you set up, say, CodeIgniter.
- bmelton 14y agoIf you're a real newbie, then perhaps PHP is the better choice -- not because of complexity, but because of the lack of proper rigidity enforced in getting started. Though I will say that I read 'getting started' as the cost of getting started on a new project, not 'your very first' project. In that regard, sure, PHP is easier. It gets that way by encouraging programming idioms that most other languages actively discourage. I understand the argument for would-be developers to get started with PHP. That's not too far off from how I got my introduction into web programming, but I have a hard time believing that developing developers choose PHP over Python or Ruby because it's easier to install.
- larrik 14y agoI actually am a full-time Django developer (pip and virtualenv included), and I hate PHP. But if, say, I want to try out a new JS library or widget, I'm pretty likely to just throw a PHP script in my webroot and use that, instead of firing up a full-blown Django project. The time from deciding to write some HTML or JavaScript or whatever to actually writing it in a PHP script? Basically nothing.
- bmelton 14y agoWhat does PHP have to do with JS? I'm not trying to be snarky, but I feel like I'm missing something. How would creating an 'index.php' be any faster than an 'index.py' with Flask or just using Python directly? Again, comparing it to Django isn't exactly fair. I wouldn't see many people standing up a full CodeIgniter setup for that either.