[python-advocacy] The python way to write web applications
paul at boddie.org.uk
Sat Oct 13 19:44:18 CEST 2007
On Friday 12 October 2007 06:12:08 Tennessee Leeuwenburg wrote:
> I've got a problem. Please, hear me out in case I've got it jumbled. Then
> feel free to criticize my understanding of things -- I declare Crocker's
> There seems to be no Pythonic way to write web applications.
And the nominations for sweeping statement of the year go to... ;-)
> There are python web application frameworks, but these stacks still require
> cross-platform RIA with Python, authored from a linux development
I guess what you mean is that the Python Web application frameworks which
support "AJAX" or "Web 2.0" functionality require the developer to learn some
as Jurgen points out. Indeed, if I could only get round to enhancing my own
Web application framework slightly, it'd support something like KSS instead
then they wouldn't even need to know how to write a simple function call in
fancy desktop application-like behaviour which either doesn't work properly
in 80% of browsers (and it's a different 80% every time) or which cause the
legitimate choice given the continual stream of cross-site scripting exploits
or implementation issues. See Google Picasa for an AJAX-laden example of an
application which doesn't seem to work satisfactorily in any browser.
> I can write flex applications, but apollo isn't ready for linux yet. I can
> write Moonlight applications, but the authoring process is poorly
> documented, requires compilation of mozilla from source (!) and isn't
> up-to-date with respect to Silverlight. If I'm happy to constrain my widget
> extent, but certainly for my purposes, and probably for all purposes, I
You could possibly write XUL-based applications together with PyXPCOM, but the
effort involved in building a capable browser still seems to be significant.
Still, it's arguably better than mixing in Mono as well. One day I'll return
to the task of making KHTML/WebKit work with Python - another thing which has
proven to be awkward over time.
> I could try swigging mozilla and interacting with the browser directly, but
> this is a jungle of old documentation and is clearly not a well-supported
Yes, most wrappers around Mozilla or Gecko don't touch the internal stuff like
> The premier web toolkits like GWT and YUT appear to be totally
And aren't they still fairly proprietary?
> There just doesn't seem to be a Python solution to a modern web
> application. The best I can now imagine is a decoupled system with Python
> on the backend. Frankly, in this situation I don't see the point. The whole
> point of a web application is to present a cross-platform user interface
> using a deployment model which allows good control over the environment. It
> is, essentially, a UI decision. To give up Python on the UI seems to be
> giving up the very core of what it means to write a web app.
> Please, somebody, tell me I'm wrong!
You're wrong! ;-)
switched on to use this application"  is that the AJAX stuff should
provide extra interactivity over and above the rest of the application. Now
level of comfort (or special effects), but then you've got to make sure that
it remains consistent with the rest of the application, that it doesn't
provide the only way for users to achieve certain things, and so on. You
but in the end you have a maintenance problem if the additional stuff has
significant amounts of custom logic.
In the end, we return to the observation that the logic should be in one place
and that we make the "view" part of the architecture capable enough to
provide a nice interface without the temptation to write our application in
the Web page templates, PHP-style. In attempting to reinvent traditional GUI
programming this observation has obviously been forgotten.
P.S. Isn't this really a Web-SIG discussion?
More information about the Advocacy