4 ms·
Can't upvote you enough. I mostly write desktop apps. I really want to write my own web apps, just as a fun exercise. So far, PHP looks like the only programmi
by GeneralMaximus 17y ago
Can't upvote you enough.
I mostly write desktop apps. I really want to write my own web apps, just as a fun exercise. So far, PHP looks like the only programming language that will let me write web apps without spending eight hours trying to set up a friggin' web server.
I compile an entire OS from source every week (the Haiku trunk), but getting Python with Apache set up on OSX Leopard is something I always shy away from.
(Also, why is it so hard to not have to use a framework to write your webapp in the Python world? All I want is a 'Hello World', not friggin' Facebook.)
- nostrademons 17y agoIIRC (untested), a "Hello world" webapp in the Python world is as simple as dropping this into your cgi-bin: #!/usr/bin/env python print 'Hello world' You can do CGI apps just as easily in Python as you can in other languages. It's just that CGI doesn't scale, and so you'll want a framework for anything more complicated than that. Incidentally, have you tried to setup PHP on a machine that doesn't already have it installed? (Particularly without using a package manager - with port or apt-get, Python isn't all that difficult to install either.) It's a frigging nightmare of building shared libraries, making sure they're in the right place, finding the right Apache config files to edit, and adding the appropriate LoadModule/AddType/AddExtension/whatevers. The reason PHP's easy to deploy is because most webhosts already have it preinstalled - they've done the work for you. If you use a Django-aware webhost like Webfaction, the process of creating a new Django app is reduced to clicking a button on your web-based control panel.
- garnet7 17y ago> It's just that CGI doesn't scale, and so you'll want a framework for anything more complicated than that. No, that's not the issue. The issue is, when you have a relatively small webapp that you want to be fast. It's large and fancy enough -- you just want it to be fast. So, for that you want a persistent language runtime, such that when your page gets accessed the already running Python interpreter just grabs your .pyc file and runs it immediatly. The final ingredient is that with php you can put your php files into your docroot so that you don't even have to mess with apache rewrite. If Python had those things, there wouldn't be any reason for a new user to choose php over python.