Future direction for common JS api's

閲覧: 241 回
最初の未読メッセージにスキップ

Paul Stockley

未読、
2016/05/18 9:25:142016/05/18
To: GWT Contributors
I am at the point in my GWT-React project where I need to come up with a future proof way of handling low level server communication. I was contemplating implementing the new Fetch API (with polyfills for older browsers). This would also need the promise API.

The question I have is what will the scope of elemental 2 be? Would it cover these API's? If it doesn't we should consider a standard implementation otherwise everyone will go off and implement their own versions which seems such a waste of time.

Jens

未読、
2016/05/18 9:50:282016/05/18
To: GWT Contributors
Given that Elemental 2 is developed behind closed doors, I would guess it can take TypeScript definition files and/or some IDL input to generate JS APIs for GWT / J2CL. That should cover nearly all Web APIs. IMHO TypeScript definition files would be preferred because there are tons of them on https://github.com/DefinitelyTyped/DefinitelyTyped for all kinds of JS libraries and Web APIs. It also has a definition for the Fetch API: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/whatwg-fetch 

It would be a shame if Elemental 2 would not understand them to generate APIs. These files are basically what JSweet uses to generate their Candies (http://www.jsweet.org/candies-releases/). But even if Elemental 2 only takes IDL input or html5index.org as input it should cover all standard web APIs.

-- J.

Stephen Haberman

未読、
2016/05/18 14:22:502016/05/18
To: GWT Contributors
Interesting; I had not seen JSweet before.

The javac -> TypeScript -> JS approach is surprisingly parallel (albeit with different selections) to J2CL's ecj -> closure -> JS.

- Stephen



--
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-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/c72a2088-bc6a-4836-9312-518ec56507cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ray Cromwell

未読、
2016/06/16 16:25:422016/06/16
To: GWT Contributors
Elemental2 uses typescript as it's intermediate representation, so you can do Closure Externs -> TypeScript -> JsInterop or WebIDL -> TypeScript -> JsInterop or (insert favorite syntax here) -> TypeScript -> JsInterop.

BTW, Note that JSweet really punts on most JLS semantics, so it's problematic for compiling shared or existing Java code bases.


全員に返信
投稿者に返信
転送
新着メール 0 件