Hello Jon:
By a chance, that is the way I've been trying to model my mind
towards GWT. I don't want to abstract the essence of _javascript_. I
just want a better syntax and organization for my code. Something
that allows me to use static types, put my code in packages or
modules, refactor easily, re-use some code from the back-end in the
front-end... Indeed, TypeScript, which you also mention, is another
alternative right now, because it meets that criteria.
In my opinion, there are issues with _javascript_ that can't be
abstracted, and that any programmer coming from pure Java should be
aware of. Such as the fact that the events in a single window happen
in a single thread. In an higher level of abstraction (Vaadin, JSF)
this wouldn't matter much. But when you work directly with the DOM,
it's important to know such things.
The problem is that reading the tutorials of GWT in the official
site, it isn't clear if it acts just as a wrapper, or if it's a
whole abstraction of the DOM. I guess that, as Ed has suggested me,
at the beginning GWT tried to be the later but now it's being
transformed to be the other. I hope that for the version 3.0 the
documentation is more explicit about that.
Thank you.
On 26/10/15 16:49, JonL wrote:
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+[email protected].
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 [email protected].
To post to this group, send email to [email protected].
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
|