Adrian von Bidder schrieb:
> On Monday 11 May 2009 18.51:26 Diez B. Roggisch wrote:
>> On Monday 11 May 2009 15:54:09 Cedric wrote:
> 
>>> I was hoping finding an easy way to generate the necessary JS on the
>>> fly from the models and controllers. So in other words translating the
>>> business-logic to JS for offline applications without the need to
>>> rewrite the application.
> [...]
>> Your best bet would be to implement a JS-application with a
>> data/business-logic-layer than can be directed locally or remote, through
>> ajax-calls.
> 
> Or you could start to write a python to js translator (working with Google 
> Webkit or whatever its exact name is at work.  I am intrigued how they 
> translate Java to JS.  Of course, I imagine in a strongly typed language 
> like Java this might be easier than in Python, OTOH doesn't JS work with a 
> "weak" type system like python as well?)
> 
> Ok, I'm at least 50% joking.  This would be a BIG projecct.

The PyPy project comes with a python2js-compiler. And AFAIK pygments or 
something similar uses that.

But even then - debugging *generated* client-side JS? I know what I 
*don't* like to do, but YMMV.

And to share code between back- and frontend, you'd need to translate 
all the dependencies to JS, ending with a nightmarish several dozen MB 
to load *upfront* before a single page is displayed...

So I repeat - this wouldn't be a TG application. It's a client-side JS 
or python2js-app, with a abstracted storage layer. It might use JSON to 
speak with a TG-app, but that's merely a simple RPC-backend.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to