[Ilugc] Simple Python Web Application
- From: vkanakala@xxxxxxxxx (Vamsee Kanakala)
- Date: Mon Jul 12 19:34:41 2010
On Monday 12 July 2010 05:43 PM, Kenneth Gonsalves wrote:
webpy is mentioned above - and another reason to use it is that a core
developer is our very own Anand C - in fact the current inpycon 2010 website
is being run on infogami - a wiki that runs on web.py. But what Bharathi is
doing is a simple throw-away app - and as he says - no need for any framework.
I noticed web.py in the list - I was just wondering why it wasn't
recommended over CGI, as the latter seems like a rather crude approach.
From whatever I've seen, it seems to inter-leave python code with html.
Not that there's anything wrong with it, but I rather like web.py's way
of separating views into .html files and stuffing the values in python
vars/placeholders.
Throw-away programs have a habit of becoming rather useful and grow big,
so it seems with only a little bit more effort, web.py provides a much
cleaner way to do a web app, even if it is a throw-away one. Not that I
have a lot of experience with the Python side of things, but if you'd
ask me to give a way to do a simple web app with minimum fuss, I'd
rather recommend Sinatra (which seems to be inspired by web.py) rather
than the clunky Ruby CGI module. Perhaps I'm over-bearing the point, but
web.py/sinatra seem to hide enough of the rough edges of the CGI
approach, while giving plenty of room for starting small and keeping the
code clean/organized/flexible, just in case this tiny app turns out to
be useful.
Vamsee.
Other related posts: