lkcl wrote:

[ a lot of good stuff]

FWIW, here's another few cents about pyjamas, gleaned from using it for
a couple of weeks.

I found Ian Bicking's JSON-RPC example a good starting point for doing
the rpc stuff with pyjamas and repoze.bfg, so I imagine it will work
similarly well in pylons. http://pythonpaste.org/webob/jsonrpc-example.html

If you want to use all the batteries included with python, you need to
use that code server side.  Protect your rpc methods with
authentication, authorization and XSS safeguards.  For auth/auth,
repoze.who/what are definitely usable.

The html that pyjamas/GWT generates tends to use table-based layout,
very ugly for those of us trying to get away from that.  But it is
liberally sprinkled with uniformly-named class attributes, so styling
can still be done with css.  If you think "user interface" rather than
"web page", this is really not too bad a way to go.

In pyjamas, you can maybe use your favorite external javascript
libraries.  Sometimes it is as easy as

import thatotherlibrary.js

Then, if thatotherlibrary exposes a function "fribble", you can use it
in a python function or method

def xfribble(obj1,obj2):
    JS("""return fribble(obj1,obj2);""")

Several python syntactical constructs are not currently available in
pyjamas.  At compile time, pyjamas will tell you if you do something it
cannot handle.  Generally, if you keep your python code simple and
readable, it will work fine.  Compiling is pretty fast.

pyjamas does not currently minimize or obfuscate its output javascript,
so your javascript debugger will give you fairly useful hints about what
might be going wrong. Fix your python code, recompile, try again.

The widget set available in pyjamas is pretty basic.  You can compose
fancier widgets from the basic ui objects. You can also snoop in the
various libraries folks have built for GWT, and rewrite the java code in
python, if you do not want to reinvent the wheel too much.

I have not seen anything easier to work with to generate a complex user
interface for a web app.  Any widget can request data from the server
and handle the response.  This is a very nice way to make things happen.

- Jim Washington


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

Reply via email to