users@jersey.java.net

Re: [Jersey] Any plans to support client api in GWT

From: Robert Koberg <rob_at_koberg.com>
Date: Tue, 12 Jan 2010 08:06:23 -0800

On Jan 12, 2010, at 7:35 AM, Paul Sandoz wrote:

>
> On Jan 12, 2010, at 4:23 PM, Robert Koberg wrote:
>
>> Hi,
>>
>>
>> You could use Rhino on the server and reuse any appropriate javascript (including GWT generated JS), but you would need a mapping script that gives the browser environment. For example: http://ejohn.org/blog/bringing-the-browser-to-the-server/
>>
>> But, perhaps you want to skip the java to js step for the server side and just use java on the server?
>>
>> javascript page building = DOM manipulation and/or string concatenation: Fine for building pages in the browser on the client, but not on the server. But, perhaps enough for some needs and does make things simple.
>>
>> How do you see Jackson working in this scenario?
>>
>
> Off the top of my head, use a Jackson/GWT plug-in to compile the JSON model Java classes to JavaScript.


Isn't this what GWT does? Or are you talking about using jackson to create something like a JSON Schema (http://json-schema.org/ )? Or are you talking about creating javascript object instances at runtime using Jackson? Either way you will still need a javascript implementation to run it (i.e. a current Rhino or the older JDK version of it)

Why limit to GWT? It sounds like you need a plain old javascript object. I am not familiar with GWT, so maybe I am missing something? Maybe it handles typing information in a useful way?

best,
-Rob