Basically what we need it for is REST. Currently we use AutoBeans, but we 
want to change it because we need to pass the model to JS too; secondly 
AutoBeans generate a lot of code. We would like to still preserve shared 
model with the server. So, JsInterop seems the most natural choice, except 
it doesn't support collections. We mostly need List and Map. Switching to 
JsInterop with replacing Lists with some JS array view would be quite an 
effort. It would introduce that into our server logic too (by the shared 
model). And and you could even use Java's for each loop, as native JsType 
cannot extend non-JsType interfaces, so it could not extend Iterable (of 
course adapter could be instantiated for every list you want to iterate). 
Same for streams. 

Therefore we look for collection support in JsInterop, which was planned 
for "phase 2". If that was in our reach, we could help in getting it.

Marcin


On Monday, 8 May 2017 16:42:17 UTC+2, Ray Cromwell wrote:
>
> The adapter class adds overhead though and you need to convert into and 
> out of it every time you pass it to JS. At that point you may as well use 
> Java.util.List and write an adapter around JS array.
>
>
> On Mon, May 8, 2017 at 7:10 AM Jens <jens.ne...@gmail.com <javascript:>> 
> wrote:
>
>> IMHO if you want a JavaScript array, set, map behave the same as a Java 
>> collection, so you can use it with other libraries, you should write an 
>> adapter class that implements the Java API and operates internally on the 
>> JavaScript data type. 
>>
>> Basically do not rely on invisible magic. That could easily be 
>> implemented as a 3rd party project.
>>
>> -- J.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Contributors" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-web-toolkit-contributors+unsubscr...@googlegroups.com 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/4d08f88c-ec88-4818-b778-3e0e247f2e7e%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/4d08f88c-ec88-4818-b778-3e0e247f2e7e%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/5e9868cd-35d6-4f48-81b8-ef26ff791906%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to