5 ms·
That's why e.g. Flask exists: it gives you the basics, plus light structure and templating and routing and XSS protection and deployment options and whatever el
by eevee 14y ago
That's why e.g. Flask exists: it gives you the basics, plus light structure and templating and routing and XSS protection and deployment options and whatever else. With no setup and no boilerplate.
It's about as much effort as typing `<?php`.
- chrisguitarguy 14y agoWhile that's true (and I do love Flask), PHP comes installed on every discount web host. Deploying a PHP app is as easy as using FTP, deploying a Python app can be -- but doesn't have to be -- complex. I'd say this is the bigger sticking point than the framework. Obviously Heroku and other PAAS providers are changing the game as far as deployment ease. It should be to see what happens in the next few years on that front.
- espeed 14y agoDeploying a PHP app is as easy as using FTP, deploying a Python app can be -- but doesn't have to be -- complex. Easy != Simple && Easy != Good See "Simple Made Easy" (http://www.infoq.com/presentations/Simple-Made-Easy http://www.infoq.com/presentations/Simple-Made-Easy).
- eevee 14y agoIt's a chicken-and-egg problem. Best I can do is encourage more people to write more Python software, so those crappy free hosts are more inclined to support running it. Until then, I don't think it's terribly unreasonable to pay twenty bucks a month for a server to play with. That's less than AT&T wants to charge me for sending a thousand 160-byte messages.
- joering2 14y ago"crappy free hosts" ?
- espeed 14y agoDon't mess with "crappy free hosts" -- just run it on a free Heroku dyno (http://www.heroku.com/pricing http://www.heroku.com/pricing). Kenneth (http://kennethreitz.com http://kennethreitz.com) shows you can get good performance with Flask on the free dyno (http://flask.pocoo.org/mailinglist/archive/2012/2/22/flask-on-heroku-%2B-gunicorn-static-files/#cff05916ae6854557b93d0226cb87151 http://flask.pocoo.org/mailinglist/archive/2012/2/22/flask-o...).
- eli 14y agoThat's a fair bit more involved than "FTP files to my web host and they usually just work"
- espeed 14y agoIt's actually easier... $ git push heroku master
- eli 14y agoSure, well I would hope it's easy to do a one line deploy to any platform and with any language... once you set it up. You left out freezing requirements for pip, setting up cedar, etc. Nothing like that for a simple PHP app. I don't want to overstate the case; deploying Flask isn't hard, but deploying PHP is stupidly easy.
- mkopinsky 14y agoAs a Mercurial user who doesn't feel like learning git just for the sake of deploying toy Python apps, can anyone comment on whether hg-git or the like is a reasonable way of deploying to heroku?
- kenneth_reitz 14y agoIt would add a bit of overhead, but you can certainly have mercurial at the center of your workflow via gh-git, yes.
- 14y ago