In order to get some experience with jsinterop I started wiring some
libraries in a need to use basis. The libraries are requiring other
libraries so until now I have __partial__ bindings for the following
libraries:

1) jquery
2) DataTables
3) D3
4) Bootstrap - Modals
5) DateRangePicker
7) Moment

Here are the lessons learned so far.
1) you need to do it in order to get the handle of it. I can't imagine this
thing can be automated. There are too many pitfalls and way too many ways
to do it. Somebody need to balance the pluses and minuses of every approach
2) this forum is really valuable (thanks Thomas, Jens). Without it I
wouldn't have moved any further than the first 2-3 initial roadblocks.
3) There are still many rough spots and missing functionality. Some of the
top of my head are
  a) Casting is logical but weird. You have to fight at the IDE/java level
and then at the SDM level. It may produce difficult to understand runtime
errors. With chrome and --preety you can understand what's going on through.
  b) Integers are weird. Doubles and String are mostly working...
  c) JavaScriptObject and JSNI and some util functions are still required
for some functions
  d) Casting to/from JavaScriptObject is not obvious. Casting to other java
primitive types may work except some times doesn't.
  e) Some semantics may suprise you like @JsType(isNative = false)
requiring extra compile time flags. If you read the Q&A discussion it
actually makes sense
  f) Javascript this is not supported without hoops
  g) Creating config objects out of strings is not trivial like in js. Some
libraries are very keen to config objects DataTables being the prime
example.
 4) There is a question if we could somehow create a repository of
jsinterop bindings? Someone mentioned http://http://jsinterop.xyz
 5) Another question is how to use these bindings (that somebody else
created)? I mean - if I only need only js binding - should I pay the price
for several java js bindings just because they arepackaged together - or
they are ignored thanks to the GWT compiler?

  Just my 2cents

   Vassilis



On Tue, Nov 15, 2016 at 4:10 PM, Max Fromberger <[email protected]>
wrote:

> Hello GWT users,
>
> Status quo - correct me if I'm wrong:
> GWT has become even more awesome with JSInterop and Elemental. There are
> several wrappers for various JS libraries available, some up-to-date, even
> using JSInterop, while others being outdated (JSNI, compatibility only for
> older GWT versions) or abandoned.
>
> I was wondering if there is a best practise for using JS libraries in GWT.
> Does it always have to be a manual writing of JSInterop glue types, oder
> can it be automated as it is the case with Elemental (different case, I
> know)?
>
> As an example: I'm currently dealing with a 3D WebGL project. I am trying
> to migrate it from a widgets based GUI to a pure Elemental GUI. The
> application currently employs parallax3d (GWT 3D library incorporating
> three.js, i.e. a wrapper with some additional functionality and some lost
> functionality with respect to naked three.js). This migration requires
> stepping away from parallax3d, as this library is also widgets based. So
> I'd like to use pure three.js and wonder if I have to write my own
> JSInterop overlay types. Or there is a way of auto-generation these?
>
> This brings up another question: what is the recommended way of using
> widgets and the Elemental approach in one single GWT application? I end up
> getting and setting innerHTML()-Strings.
>
> Looking forward to a general discussion of this topics; thanks for any
> feedback and input.
>
> Kind regards,
> Max
>
>
>
>
> --
> 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.
>



-- 
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