Monday, October 26, 2015

Re: GWT as a "thin" layer over JavaScript?

I think the key to remember is that when working on the client side code for GWT is that, even though you are writing in Java, your are ultimately writing Javascript.  It's a key mindset, there is nothing that you can't do in Javascript that you can't do in GWT with the right mindset.  Typescript is even just javascript once its boiled down and sent to the browser.

The GWT compiler can even offer you some optimizations and performance gains over regular Javascript.

If you find that you don't need some of the things at runtime that GWT enables, like type casting, class checking, etc, you can turn them off via a compiler flag.  Maybe you only use those flags during development and testing, but turn them off in production to reduce code size and speed things up.

GWT client side code isn't a wrapper around Javascript, it IS javascript, highly optimized and transpiled from Java.  "Wrappers" of common Javascript projects are simply thin facades over the javascript, if they are written correctly, according to my standards.

GWT doesn't preclude the usage of other Javascript libraries either and there are very few instances where you would find GWT incompatible with any particular Javascript project.

On Monday, October 26, 2015 at 8:29:35 AM UTC-7, negora wrote:
That information is interesting. I had read about JSNI, but not about JavaScript overlays. The tool from Vaadin also looks like useful. Thank you.

I guess I'll have to read the entire tutorials and documentation from the GWT website to know if I'm going to feel comfortable in this new scenario. I'm so used to do all these things with JavaScript, that I'm a little afraid :S .


On 26/10/15 14:57, JonL wrote:
There are multiple ways to do this.  

See these pages:


GWT 2.8, if I remember correctly, will also introduce a new Elemental generator, so the Elemental jar will always be up to date.

Vaadin also has an api generator for GWT.

https://github.com/vaadin/gwt-api-generator

On Monday, October 26, 2015 at 2:51:18 AM UTC-7, negora wrote:
Hello:

I code in both JavaScript and Java. I make my back-ends with Java whereas I use JavaScript for the front-ends. Nothing new. However, for the last years I aimed my career so much to Java, that I missed out many important JavaScript libraries and projects. Instead, I always used my old custom JavaScript libraries. Now I want to change that, but I got a little tired of the dynamic typing, among other ugly things of JavaScript. That's why I'm considering to move either to TypeScript or to GWT.

In the case of GWT, I know that I'm "arriving" very late. There are some people that even told me to stay away from it. However, I also want to hear directly from people who still use GWT.

I don't want too much abstraction of the DOM. Indeed, I want to have absolute control over it if necessary. Could be GWT used that way, as a "thin" layer over JavaScript? I read about Elemental, but it seems to be very tied to WebKit and experimental. I also have read about GwtQuery. Would it be what I need to manipulate the DOM, instead of Elemental? Is it still maintained? Does it still receive new features?

With this I don't mean that I'm not interested in using the GWT widgets. It's the opposite really. But I want to be sure that, if I need it, I still can do things at a lower level.

Thank you.

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment