I agree about preferring "bean" style properties.  It's not a clear choice, 
but using bean style properties is more familiar to java programmers and 
makes the library fit in much better with the wider java ecosystem.  Also 
it would make conversions from elemental 1 much easier (though that is 
probably a very small group of users).

On Wednesday, February 15, 2017 at 3:05:01 PM UTC-6, Ming-Yee Iu wrote:
>
> Well, ok. Thanks.
>
> Just in terms of general feedback on Elemental2:
>
> 1. I'm not sure whether the conversion of JavaScript properties to Java 
> fields is the best choice. Sure, it "feels" more like the original 
> JavaScript, but a) it's inconsistent with Java semantics, b) I'd be afraid 
> that a Java compiler might apply some unexpected optimization there as a 
> result, c) it's harder to mock the behavior of the classes for unit tests 
> and d) alternate implementations of Elemental2 aren't possible (for 
> example, I couldn't make a DevMode-like JavaFx version of Elemental2 like I 
> did with Elemental 1).
>
> 2. Personally, I would prefer if Elemental 2 used interfaces over classes 
> (for similar reason as above), though I understand that being able to use 
> "new ...()" syntax on things is nice too.
>
> 3. The number of callback classes is out-of-control. Can they be 
> consolidated somehow? 
>
> 4. Also, is it possible to supplement the typing information for some of 
> those callbacks from Typescript? Everyone knows that "onclick" handlers 
> pass a MouseEvent. I'm not sure if Closure has a rich enough type system or 
> is sufficiently well-developed to generate the best API there.
>
> 5. Can there be some magic that makes elemental2.Iterable<T> a real Java 
> Iterable?
>
> Otherwise, it seems nice. I like that there's a NodeList<T> now!
>

-- 
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/10a89130-7d9a-4f48-8ab8-3387eefcab49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to