Hi all

Put another way

Is there no particular reason for the comment regarding JS() will
cause you grief and also unless I want to provide a nicer OO wrapper
around a JS library (like the widgets do with pyjamas as they wrap
HTML elements) there's no particular need for wrapping JS libs with a
python wrapper like GWT has to do because of static checking ?

Are there any pitfalls to watch out for when using JS libs

Also regarding __jsimport__()
I take it this will include the code in the monolithic pyjamas HTML
page once compiled

Pros - one less server round trip compared to using script tag in HTML file

Cons - the compiled pyjamas page gets bigger in size as includes all
the js library code ?

BH

On 6 Dec 2011, at 22:40, Luke Kenneth Casson Leighton
<[email protected]> wrote:

> On Tue, Dec 6, 2011 at 6:22 PM, Apexi 200sx <[email protected]> wrote:
>> Hi Lex,
>>
>> I completely agree that you can write sophisticated apps without doing what
>> I describe.  I also agree that pyjamas desktop is excellent for debugging
>> etc.
>
> i don't do development nor running of applications under pyjs.  i
> *only* develop using pyjd, and run locally.  it's only when it comes
> to deploying live, or to show clients, that i compile for pyjs.  this
> is actually bad practice: for large apps i at least do _some_ regular
> compiling, and i always always make sure that i do regular commits (no
> more than 5-10 lines of code) so that i can go back through the
> revision history if an error is introduced that pyjs cannot cope with
> [but pyjd can].
>
>
>> Also, I was under the impression you can't run Javascript under pyjd as it
>> is pure python ?
>
> correct.  there's a potential way to do it, but it's hellishly
> tricky.  a combination of running a JSONRPC service (adapted to run
> locally in the browser!) and using a hidden iframe (just like the
> History module) to "serve" the results of the javascript call.... to
> the browser itself!
>
> truly dreadful, but it'd work.  just.
>
> l.

Reply via email to