Re: [gwt-contrib] Re: The elusive J2CL

2018-06-09 Thread Ming-Yee Iu
Wow! It's great to see all that progress being made on GWT 3. That's a lot 
more backwards compatibility than I was expecting.

Still, it would be nice to have J2CL released separately as soon as it is 
ready to do so because

   1. Based on past experience, it will take 1-2 years or more before GWT 3 
   is released
   2. J2CL is useful independent of GWT 3. Just recently, I wanted to 
   package up some Java code as node.js NPM packages for others to use, but 
   doing that really requires something like J2CL instead of GWT
   3. It's good to have some time for people to develop best practices for 
   how J2CL code can be mixed with JS. Google's JS code style is very clean, 
   well-typed, and Java-like, so it will naturally work well with J2CL. Much 
   real-world JS code is ugly and makes use of horrible JS corner cases and 
   hacks, so it might take a while to figure out best practices for how to 
   deal with those.
   

-- 
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/9d3f3a96-5c35-441b-853f-2f17c9f89656%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: Experimental release of Elemental2

2017-02-15 Thread Ming-Yee Iu
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 a real Java 
Iterable?

Otherwise, it seems nice. I like that there's a NodeList 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/cb2a997b-2d25-43c0-911a-ba13a448e14e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: Experimental release of Elemental2

2017-02-11 Thread Ming-Yee Iu
It's a little unfortunate that Elemental is being developed privately since 
it's the one part of GWT that's self-contained enough that I am able and 
willing to contribute to it. But is it possible to get an early, 
unofficial, unsupported code drop of the current Elemental code generator?

I'm a big user of Elemental 1, and I'm thinking about custom generating my 
own framework instead of using Elemental 2 so that I can have an API that 
works better with my own workflow. Being able to see the existing code 
generator would help me in knowing how much work would be involved and 
would allow me to avoid duplicating effort. 

If that's not possible, would it be possible to at least get some details 
about the implementation? Is it written in Python like Elemental 1 was or 
is it written in Java? What data sources does it consume? Does it take 
Typescript or Web IDL as input or something else?

Thanks
-Ming

-- 
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/507ab806-d365-4889-81ce-ece6c0e7885a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: Elemental 2?

2016-05-19 Thread Ming-Yee Iu
Wow, that's great! I noticed yesterday that Firefox finally added support 
for stuff like clientX and pageX too. For years, they refused to implement 
stuff like that.

Oh, mighty Apple web developers! Your absolute refusal to test your code on 
anything except Safari has finally felled even the mighty Mozilla! Despite 
its limited market share, Safari truly is the new IE6 of Internet.

Nevertheless, having easy knockouts of API functionality would be nice. In 
fact, my dream API would be to have something like @Deprecated. There would 
be annotations on the APIs with the browser compliance level of each 
method. Then, you could get the compiler to automatically analyze your code 
and issue warnings about what browsers your code works on. Of course, then 
you would need additional annotations to suppress some of those warnings. 
And then there would be another layer to detect when your warning 
suppression annotation is, itself, no longer valid. Something like that is 
probably beyond the scope of Elemental though.

-- 
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/522eac8b-51d8-4782-bf74-198bfb952fc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: Elemental 2?

2016-05-18 Thread Ming-Yee Iu
It would also be nice if Elemental 2 also has an easy way to selectively 
knock out certain fields/methods in the code generator. I don't know how 
many times I'll be using code completion and accidentally end up writing 
something like 

   div.setInnerText("click me")

because innerText is available in WebKit when I should have been using

   div.setTextContent("click me")

which is cross-platform. I would like to be able to easily go in and 
regenerate my own Elemental with innerText (among others) removed so that I 
can't accidentally do that.

There's also the issue of dealing with variants like 
webkitRequestAnimationFrame(), mozRequestAnimationFrame(), 
msRequestAnimationFrame(), and requestAnimationFrame() without having four 
different methods. I guess I can just polyfill stuff like that though.

-- 
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/01214f04-0b6a-48bc-bb57-530b29c539ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: Elemental 2?

2016-05-18 Thread Ming-Yee Iu
Is it possible to get some hints about what's cooking for Elemental 2?

Is the code generator still going to be Python or is it going to be 
rewritten in Java? I found modifying the Python code generator when I 
wanted to change Elemental 1 to be annoying.

Is the output going to be a direct remapping of JS APIs to Java or are some 
of the more common APIs going to be massaged to be more Java-like? With 
Elemental 1, I found that the JS APIs were cumbersome to use in Java 
because they were designed for use in JavaScript.  A lot of type casting 
was required to use the APIs, a lot of potential opportunities for 
compile-time type safety were missed, lots of strings used as parameters 
etc.

e.g.
CanvasRenderingContext2D ctx = 
(CanvasRenderingContext2D)canvas.getContext("2d");

(I often forget whether it's "2d" or "2D", and that type cast is gross)

e.g.
div.addEventListener(Events.CLICK, new EventListener() {
   void handleEvent(Event evt) {
  MouseEvent e = (MouseEvent)evt;
  ...
   }
});

(that would work so much better as something like 

 EventRemover addEventListener( EventType type, 
EventListener listener )

so that it would be possible to do a 

div.addEventListener(Events.CLICK, (MouseEvent e) -> {...});

-- 
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/e4eeefd6-cfdf-462d-8ae7-000fa8969d07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.