Tuesday, December 1, 2015

Re: Teavm

We are using TeaVM for the javascript port of Codename One and have been very happy with the results.  One thing that TeaVM offers that nobody else in the Java->Javascript realm is thread support.  Performance is also very good, and the creator (Alexey) is quite responsive to support requests.

Steve

On Tue, Dec 1, 2015 at 7:43 AM, Satguru Srivastava <ssatguru@gmail.com> wrote:
So, I recently came across TeaVM (http://teavm.org/)
Similar to GWT but unlike GWT, which compiles Java Source Code to JavaScript, TeaVM compiles Java Byte Code to JavaScript.
It is an interesting approach.
The big advantage to this approach is that you do not have to create and maintain your own compiler.
You ride on the back of the JavaC compiler and can take advantage of the optimizations, latest changes and updates made to the compiler.
So while GWT is working on supporting Java 8 , TeaVM already provides support for that.

What do you guys think?
What are the pros/cons of this approach ?





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



--
Steve Hannah
Web Lite Solutions Corp.

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

Teavm

So, I recently came across TeaVM (http://teavm.org/)
Similar to GWT but unlike GWT, which compiles Java Source Code to JavaScript, TeaVM compiles Java Byte Code to JavaScript.
It is an interesting approach.
The big advantage to this approach is that you do not have to create and maintain your own compiler.
You ride on the back of the JavaC compiler and can take advantage of the optimizations, latest changes and updates made to the compiler.
So while GWT is working on supporting Java 8 , TeaVM already provides support for that.

What do you guys think?
What are the pros/cons of this approach ?





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

Re: GoogleBot is using the wrong permutation?

@Jens: I am already using the fallback user agent. That is not the problem (I had that before). It occurs after that during crawling the website.
@ Vassilis: Thanks, I am aware of the forum discussion your refer to, I was the one that started it ;)... I am not getting any 4XX errors, all files can be found.

Any more ideas?
- Ed

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

Re: GoogleBot is using the wrong permutation?

Good to know.

thanks for the tip


On Tue, Dec 1, 2015 at 12:05 PM, Jens <jens.nehlmeier@gmail.com> wrote:
You can use <set-property-fallback> to define a fallback value in case the user.agent is not recognized. That way you can serve a default permutation for unknown user.agents. By default the fallback value is "unknown" and thats why GWT tries to load a permutation file called "unknown.cache.js". So it should be fine if you use webkit or gecko1_8 as fallback value.

-- J.

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



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

Re: GoogleBot is using the wrong permutation?

You can use <set-property-fallback> to define a fallback value in case the user.agent is not recognized. That way you can serve a default permutation for unknown user.agents. By default the fallback value is "unknown" and thats why GWT tries to load a permutation file called "unknown.cache.js". So it should be fine if you use webkit or gecko1_8 as fallback value.

-- J.

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

Re: GoogleBot is using the wrong permutation?

Hi Ed,

Looks like the googlebot user agent is not handled by GWT permutations. I have collapsed all permutations and I am still getting 404 in my web server logs where the google bot is trying to get the undefined.cache.js

An interim solution / workaround until the GWT crew can fix this is mentioned here in the previous conversation we had at https://groups.google.com/forum/#!msg/google-web-toolkit/tmUeYATU2kA/6F8OjCH1CgAJ

The fix was to
$sudo ln -s /var/lib/tomcat7/webapps/myapp/myapp/D44347868....cache.js /var/lib/tomcat7/webapps/myapp/myappundefined.nocache.js

after every deployment.

Here is the script version
sudo ln -s `ls /var/lib/tomcat7/webapps/myapp/myapp/*.cache.js | head -n 1` /var/lib/tomcat7/webapps/myapp/myapp/undefined.nocache.js
after every deployment.

I was already doing
$sudo touch /var/lib/tomcat7/webapps/myapp/myapp/myapp.nocache.js

after every deployment, so it's one more line that shouldn't exist in the first place in the deployment script.


On Tue, Dec 1, 2015 at 1:30 AM, Ed <post2edbras@gmail.com> wrote:
Has anybody experiences the following situation?
GoogleBot is using a permutation that doesn't exists (anymore)? :(

Details:
Googlebot (GB) comes by to crawl the site (build with GWT 2.7.0: leuker.nl) and generates some exception on some page, namely leuker.nl/zorgtoeslag/acties), this only occurs when GB accesses the site. The exception looks like:

---

Cannot call method 'xg' of null

        at Unknown.NOb(https://leuker.nl/aangifte/acties) ~[na:na]

        at Unknown.Mrd(https://leuker.nl/aangifte/acties) ~[na:na] 
        .....
----

The deObfuscator in the backend complaints that it's receiving a permutation from the frontend, that doesn't exists, and checking it manually, it really doesn't exists... It had that already a few times when deploying new versions.
So:
1) What permutation is GB using ? I could it be a cashed one (old one) ?
2) I can't solve this issue without deObfuscating (I don't want to put a pretty-version online, it's too big).

Any idea ?
- Ed 

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



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

Re: Is there any GWT equivalent to Class.getDeclaredField?

It is effectively not possible to use reflection in GWT (well, not entirely true, some people have made libraries to make it somehow possible); see notes in http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsCompatibility.html and http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsDeferred.html#benefits (returned by a search on "reflection" in the website).
Note however that GWT Generators are likely to go away in the so-called "GWT 3.0" and you're invited to use annotation processors instead. In any case, the idea is the same: to cut down on boilerplate, have it generated for you rather than relying on reflection; in other words, do your meta-programming at compilation-time rather than at runtime.

On Tuesday, December 1, 2015 at 10:25:23 AM UTC+1, Jonathan Fischer wrote:
Basically, I want to cut down on a bunch of boilerplate code (needing to check if a list of boolean fields are true/false across a collection of objects). In normal Java, I can use Class.getDeclaredField and Field.getBoolean to do that, something like:


public static boolean allTrue(Class<? extends Object> cls, List<? extends Object> things, String fieldName) {
 
try {
 
Field field = cls.getDeclaredField(fieldName);
 
boolean val = true;
 
for (Object o : things) {
   val
= val && field.getBoolean(o);
 
}

 
return val;
 
} catch (Exception e) {
 
return false;
 
}
}


I don't see any way to accomplish the same thing in GWT code, at least not in the GWT site. Is this just not an option under GWT?

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