LWN.net Logo

Pyjamas: writing AJAX applications in Python

Pyjamas: writing AJAX applications in Python

Posted Aug 27, 2009 13:38 UTC (Thu) by NAR (subscriber, #1313)
Parent article: Pyjamas: writing AJAX applications in Python

My experience with generated code is "all is well until the first bugreport". Usually the bugreport mentions parts (stack traces, line numbers, etc.) from the generated code - how do you get back from that to the code you've written? Not to mention that the code generating can introduce errors on its own. Nowadays I spend most of my time chasing bugs in (open source) infrastructure code that should work (but doesn't), so I'd be cautious about adding any extra layers...


(Log in to post comments)

Pyjamas: writing AJAX applications in Python

Posted Aug 28, 2009 10:29 UTC (Fri) by lkcl (guest, #60496) [Link]

"My experience with generated code is "all is well until the first bugreport". Usually the bugreport mentions parts (stack traces, line numbers, etc.) from the generated code - how do you get back from that to the code you've written?"

that is exactly why:

1) we added a debugging system which keeps track of the current line number and even optionally includes the python source code line _in_ the javascript, so that during development you can get a full python stack trace - WITHOUT having to have any javascript debugger installed.

2) i went to all the trouble to create pyjamas-desktop, so that you would be able to run the exact same application under the standard python interpreter.

"Not to mention that the code generating can introduce errors on its own."

this is a matter of trust. you place your trust in the tool that it is going to do the job. just as you trust any other tool to do its job. to back up that trust, we always add a regression test whenever a new feature is added, and i've been pushing to have regression tests added whenever someone reports a bug, too, to demonstrate the missing feature.

lovelysystems are also working quite hard to make the python-to-javascript compiler pass the _standard_ python regression tests, from a command-line version that is combined with spidermonkey, and i've added experimental support for python-spidermonkey and pyv8, as well. this is a similar goal to what skulpt are aiming for.

"Nowadays I spend most of my time chasing bugs in (open source) infrastructure code that should work (but doesn't), so I'd be cautious about adding any extra layers..."

welcome to free software! did you pay money for any of that infrastructure? so - you got what you paid for.

pyjamas, like any free software project, does the job that the people who are *working on it* want it to do. everyone else who is NOT contributing is getting the [free] benefits of their efforts and expertise.

you should be grateful that google released GWT as free software; grateful that james tauber did the port to python, and grateful that the current developers continue to maintain it and release their contributions to the wider world.

Pyjamas: writing AJAX applications in Python

Posted Aug 28, 2009 13:36 UTC (Fri) by NAR (subscriber, #1313) [Link]

that is exactly why

This is the information that was missing from the article (at least for me).

welcome to free software! did you pay money for any of that infrastructure? so - you got what you paid for.

Well, actually quite a bit of money is spent on the support...

you should be grateful that google released GWT as free software

I don't feel like, because I hope I never have to use it, neither as a developer or a user. Web-based UIs (in my experience) suck, regardless of the technology behind them.

Pyjamas: writing AJAX applications in Python

Posted Aug 29, 2009 11:17 UTC (Sat) by lkcl (guest, #60496) [Link]

"This is the information that was missing from the article (at least for me)."

yehhh, it's tricky to cover a comprehensive topic, and often it's interactive discussion that works better for some (hellooo :)

"Well, actually quite a bit of money is spent on the support..."

oh dear! try http://siriusit.co.uk they actually employ or have contacts with many of the developers who work on products that their customers deploy, such as postgresql, kde, samba etc. unfortunately, with google's policy of employing many of the worlds' top free software developers (so that nobody else can) it's a quite a hard trick for any support company to pull off.

"you should be grateful that google released GWT as free software

I don't feel like, because I hope I never have to use it, neither as a developer or a user. Web-based UIs (in my experience) suck, regardless of the technology behind them. "

*rueful smile* you're not the only person to be utterly disillusioned with web-based UI development. this is one of the reasons why i risked creating and emphasising pyjamas-desktop, because by going "direct" to the DOM model and cutting out the javascript, one of the main painful psychological barriers (javascript) is lifted.

the skills list required to do decent web-based user interfaces is just absolutely horrendous. i listed them only last week: http://advogato.org/person/lkcl/diary/623.html - many people simply cannot cope with this, in order to create the level of UI interaction experience that web users expect these days.

anyway - it's particularly interesting to note that john resig, an experienced javascript developer, criticises pyjamas from a different angle: one of not being "direct" enough. but the thing is, the whole point of the pyjamas UI API is to solve and encode as many of the quirks and the bits of expertise as possible behind a common API so that _you_ don't have to know them. [that's the job of AJAX frameworks: it's just that pyjamas is written (mostly) in python, not javascript]

both GWT and Pyjamas do that: one for java developers, one for python developers. (there's also RWT (RubyJS) but its development stopped in 2007 unfortunately).

the point is: myself and many others have been just as exasperated and disillusioned as you, with web UI development (i vowed once that i would never do javascript programming, now i'm doing the complete opposite!) and both GWT and Pyjamas tackle UI development with less emphasis on "web", more emphasis on "desktop-widget-like", and thus allow us to carry on, keep abreast of current user expectations, not give up and not go bananas with stress either :)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds