folks, hi,

as an instant django convert when i discovered it a couple of months
ago, i wanted to make people aware of some technology that has saved
me vast amounts of development effort, and given me no end of
amusement: pyjamas.

pyjamas - http://code.google.com/p/pyjamas - is an AJAX-based web
kit.  it's a port of google's web tookit - http://code.google.com/gwt
- to python, making it a python-to-pyjamas compiler.  the underlying
AJAX library is incredibly smart, taking care of all the usual nasty
browser differences that trip people up.  all the expertise is "taken
care of", so you don't even have to know that you're involved with
javascript.  at all.

my application uses the following:

* pyjamas the compiler to convert my desktop-looking
   code from python to javascript
* pyjamas JSONRPCService AJAX RPC calls to the server.
* libcommonDjango.tgz from http://pimentech.com to
   do JSONRPC into django
* django functions to actually do the back-end hard work,
   meeting the django models at this point

there are _very_ few django templates involved.  only about 300 lines
of the 6,000 lines of back-end code, if that, is "django templates".
the rest is *entirely* called as JSONRPC services.  i think... the CSS
stylesheet is generated as a template; the advertising is done as a
template: the facebook code returns FBML using django templates.  the
reason for making this decision - to go ENTIRELY ajax - becomes clear
when i describe pyjamas-desktop, and what it does.

pyjamas-desktop is a port of pyjamas to webkit, making *exactly* the
same functionality and API as is used by the pyjamas compiler to
generate javascript available as a desktop application.  in other
words, the code that _was_ handed to the pyjamas compiler is instead
handed to the python compiler.

the upshot of this is that my web application is now also an identical
_desktop_ application.  and, thanks to webkit's built-in
XMLHttpRequest capabilities, i can *still* run the JSONRPC calls to
the JSONRPC-enabled Django Server!

which is where it begins to make sense as to why i'm lettting you know
that this is possible.  you can not only do web development in "pure
python", right from front-end to back-end, but also, if you stick to
some not-very-restrictive good-coding-practice guidelines, the exact
and i literally mean exact same application can be run as a _desktop_
application.

thanks to django's role, and pimentech's libcommonDjango library (copy
available at http://lkcl.net/libcommonDjango.tgz if you can't find it
anywhere else).

so, if you're interested, you can get pyjamas the AJAX compiler at
http://code.google.com/p/pyjamas, and you can get pyjamas-desktop via
http://pyjd.sf.net - the API documentation, at http://pyjd.sf.net/api
is relevant and identical for both versions.  additional
documentation, if you're missing anything, can be found on google's
web toolkit web site, where you can look up the exact same widget and
widget function, and pretty much work it out.  ignore the java  :)

have fun!

l.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to