3 ms·
Most of the post _isn't_ strictly necessary. You don't need a database to get your feet wet. You don't need to care about XSS for your first throwaway app (th
by eevee 14y ago
Most of the post _isn't_ strictly necessary. You don't need a database to get your feet wet. You don't need to care about XSS for your first throwaway app (though, arguably, you should). I pimp Mako precisely because there's no separate language to learn: the core syntax is just Python.
I tried to describe the _ecosystem_, and I assume any serious PHP application will care about most of the same things.
Here's all you really need: look at http://flask.pocoo.org/ http://flask.pocoo.org/ and do that thing it says right there. You don't even need to install a separate web server. (Yeah, yeah, 5.4, I know.)
A "quick dynamic page" is a deployment problem. If you're already running Apache and mod_php, you already have an environment ready to go to serve PHP, so of course it'll be easy for you. I don't run Apache, so PHP doesn't really help me there. (mod_passenger promises to, but I haven't tried it with Python yet.)
- lloeki 14y agoAlso, http://pow.cx/ http://pow.cx/ (Ruby I know, but it shows such things can be done.) Also the argument of python/ruby requiring lots of configuration while php would not is just plain bullshit. Making PHP run with Apache (esp. on a windows machine) without stuff like EasyPHP (and this is where you stop comparing apples to oragnes) is by and large tough on the beginner.
- jeltz 14y agoIndeed, I would say setting up PHP and Apache is usually more work than setting up Ruby or Python behind nginx.
- conradev 14y agoI am lucky that I found Flask a while ago, because I was sick of PHP. Flask, jinja2, and uWSGI have since been my best friends. It took a little while to figure out how to setup a proper web server around those, but the guides are not that complex. Install nginx, darmonize uWSGI with upstart, and configure it. It's funny, in some ways it's easier to use than PHP, because when I am working with the website on my local machine, I can run uWSGI in http mode, no configuration necessary. The only barrier I see going from PHP to Python or Ruby is managed hosting.
- conradev 14y agoIn fact, I felt impassioned about it enough to create a blog and write about it: http://kramerapps.com/blog/post/22551999777/flask-uwsgi-nginx-ubuntu http://kramerapps.com/blog/post/22551999777/flask-uwsgi-ngin...