Here is another example 
<https://github.com/errai/errai/tree/4.0.0.Beta1/errai-common/src/main/java/org/jboss/errai/common/client/dom>
 
of project that could wait no longer for Elemental 2. As you can see, 
similar stuff, but incompatible. Let's hope Elemental 2 comes out soon 
enough to prevent "elemental hell" in GWT land :-)

On Tuesday, June 7, 2016 at 2:02:03 AM UTC-7, Vassilis Virvilis wrote:
>
> +1 for elemental 2.0
>
> One project that I know of is 
>
> https://github.com/workingflows/gwt-jquery
> that requires
> https://github.com/workingflows/gwt-jscore
> that re-implements Node for example
> @JsType(isNative = true) 
> public class Node extends EventTarget { 
> public native void bind(String property, JsObject objects); 
> public native Element parentElement(); 
> public native Node parentNode(); 
> public native Node firstChild(); 
> public native Node removeChild(Node child); 
> public native void appendChild(Object child); 
> }
>
> Its author Cristian Rinaldi explicitly states: "This project is an 
> abstraction of the key elements of HTML and JS functionality. This can be 
> replaced in the future by Elemental 2.0." in README.md
>
> jquery is a very basic js library. Lots and lots of js libraries depend on 
> it. I believe its adoption is a corner stone for jsinterop success 
> (although you can cut corners and create the wrappers only from the high 
> level js libraries your application actually needs).
>
> On the negative side I am somewhat worry of the danger to be confusing for 
> plain GWT users (like me). GWT lready has 2 element types (one deprecated). 
> A third one unavoidably will increase the confusion.
>
>
>     Vassilis
>
> On Tue, Jun 7, 2016 at 3:03 AM, Hristo Stoyanov <[email protected] 
> <javascript:>> wrote:
>
>> Thanks Thomas,
>> Yes, your are very close to what I am thinking! Note, that if such 
>> mapping cannot be "special-cased" with some jsinterop cleverness,  it could 
>> be refined by an additional @JsX annotation (or two).
>>
>> ... Other than that, releasing Elemental 2.0 is becoming an urgent 
>> matter, IMHO. I noticed at least 2 gwt frameworks that could not wait and 
>> started rolling out their custom jsinterop-enabled  basic DOM "stuff", 
>> which would otherwise belong to a proper GWT 2.8/Elemental 2 release. I 
>> also assume that Elemental 2 will include some of the  "jsinterop 
>> helper/utils" discussed in this forum.
>>
>>
>> On Monday, June 6, 2016 at 3:58:53 PM UTC-7, Thomas Broyer wrote:
>>>
>>>
>>>
>>> On Monday, June 6, 2016 at 9:15:43 PM UTC+2, Hristo Stoyanov wrote:
>>>>
>>>> Kirrill,
>>>> I did not suggest to *convert*, but *map*. That means that if/when a 
>>>> JSInter-oped class is exported into the JS Engine (let's say V8) , the JS 
>>>> developer will see plain old js arrays, so s/he can work with them as they 
>>>> have been for ages. When Java/JsInterop developers work with the same 
>>>> structure, they can chose to view it as java.util.ArrayList, java array or 
>>>> some other java.util.Collection, thus using familiar Java APIs. It is the 
>>>> same structure in the JS Engine memory, but viewed differently. But no 
>>>> conversion involved.
>>>>
>>>
>>> Some of those might work, but not all.
>>> I.e. "seeing" a JS Array as a java.util.List might work, but not the 
>>> reverse; at least not with any java.util.List, only the one implementing 
>>> type(s) that directly map (@JsType(isNative=true)) to a JS Array. More 
>>> precisely, that means using that specific JsType on setting (and on 
>>> getting, though possibly JsInterop could special-case it; I think that's 
>>> what you're asking for); specifically, a setter taking any java.util.List 
>>> wouldn't work, as you could pass, say, a LinkedList, and GWT would be 
>>> unable to simply "map" it to a JS Array: we're compiling to JS here, 
>>> there's no boundary like with a plugin.
>>> Currently, you could use elemental.util.ArrayOf, and I believe there 
>>> will be equivalents in due time (either GWT 2.8 proper, or Elemental 2). 
>>> This is more or less what Jens and Vassilis were talking about already.
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Vassilis Virvilis
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to