[Zope3-dev] Re: Ajax in Zope 3

Florent Guillaume fg at nuxeo.com
Wed Dec 7 09:12:44 EST 2005


Tarek Ziadé wrote:
>>Myself I absolutely love the approach taken by CrackAjax
>>(http://www.aminus.org/blogs/index.php/phunt/2005/10/06/subway_s_new_ajax_framework)
>>
>>
>>I'm sure lots could be improved like improving python->javascript
>>translation, allowing for explicit javascript when really needed,
>>improving the testability, etc.
> 
> 
> Yes it needs inprovment indeed: the problem I had with this approach at
> this time is that the python written that is meant to be translated in
> js via an ast engine. it makes the Python code looks like pseudo-javascript.
> 
> see in this example:
> http://svn.subway.python-hosting.com/crackajax/trunk/itunes.py
> 
> the update_list() is using things like "document.getElementById()" and
> the 'document' variable is not existing at all in python side, if i get
> it right.

Well of course, it's part of the client-side namespace. Testing would have 
to take that into account.

> I was wondering in fact what was the benefit of doing it, beside having
> a strong aversion of doing js coding (and that aversion can be
> really improved by using toolkits like mochikit)

The point for me is to code everything in one language, and have all the 
view code in one place. We could even detect the Firefox versions that have 
python scripting and send them python :)

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope3-dev mailing list