GWT 2.7 final

Aus den Release-Notes: http://www.gwtproject.org/release-notes.html#Release_Notes_2_7_0 (nur Fixes, Neuerungen in den RC erklärt):

Highlights
  • Super Dev Mode is now the default. DevMode automatically starts Super Dev Mode and reloading a web page automatically runs the compiler when necessary. (The -noSuperDevMode flag may be used to revert to the old behavior.)

  • Compiling in Super Dev Mode is much faster after the first compile.

  • Experimental support for GSS, also known as Closure Stylesheets. (See below.)

Known Issues
  • gwttar files are incorrect. (Fixed in the next version.)
Deprecations
  • GWT Designer doesn’t work with 2.7 and is no longer supported. (Source code is available if someone wishes to revive this project.)

  • IFrameLinker and XSLinker are deprecated because they don’t work in Super Dev Mode. However, we don’t have suitable replacements for all use cases yet. For updates and possible workarounds, see issue 8997.

Compiler changes
  • In draft mode and Super Dev Mode, all compiler optimizations are turned off for better debugging. For example, null pointers are detected sooner.

  • JSNI references no longer require fully qualified class names when this wouldn’t be necessary in Java. (For example, imports work.)

  • We’ve started implementing JS Interop annotations, which will make it much easier to use GWT with JavaScript libraries. The specification is not final and there are bugs, so production GWT apps and libraries should continue to use JSNI for now. If you wish to experiment, you can enable JS Interop using the -XjsInteropMode flag, which is available for the compiler and Super Dev Mode. (It doesn’t work with old DevMode.)

  • The experimental -XmethodNameDisplayMode flag adds a displayName property to each JavaScript function containing the name of the Java method. This makes Java method names available in browser debuggers at the expense of code size. (Also available in Super Dev Mode.)

  • Boxed JavaScript strings (created in JavaScript using new String(...)) are no longer considered equivalent to Java strings. They should be unboxed before being passed to Java.

  • Many bugfixes.

Library Changes
JDK emulation
  • Significant performance improvements in String, ArrayList, HashMap, and Exception.

  • New emulated classes: Locale, NavigableSet, and NavigableMap.

  • New emulated methods in Class, String, Exception, RuntimeException, Logger, Arrays, Collections, and Map.Entry.

  • LinkedList extends Deque and handles incorrect usage better.

Logging and Stack Traces
  • Better wrapping of exceptions thrown from JavaScript.

  • GWT apps that inherit the com.google.gwt.logging.Logging module have different default behavior for messages logged using the java.util.logging package. The new default is to log messages at level SEVEREand above to the browser’s console. PopupLogHandler and SystemHandler are no longer enabled by default.

  • FirebugLogHandler and NullLoggingPopup have been removed. ()

Experimental GSS support

The CssResource.enableGss configuration property turns on GSS support.

  • When enabled, resource files with a ‚gss‘ extension are parsed as a Closure Stylesheet.

  • When enabled, GSS can be used in a UiBinder file by setting gss=true on a ui:style tag.

  • If the CssResource.legacy configuration property is set, .css resources and ui:style tags without gss=true will first be converted to GSS and then parsed as GSS.

UiBinder
  • The ui:data tag has new attributes: mimeType and doNotEmbed.
GWT-RPC
  • The rpc.XserializeFinalFields configuration property turns on experimental support for serializing final fields.

  • LinkedHashSet may be serialized without a serialization policy.

  • deRPC is removed.

RequestFactory
  • Support overridden methods and generics better.

  • Fix support for @SkipInterfaceValidation on RequestContext methods.

Internationalization
  • Upgraded to CLDR 25.
Browser API changes
  • Updated support for typed arrays.

  • Added History.replaceItem().

  • Fixed an issue with Window.addWindowScrollHandler on Chrome.

Widgets
  • The deprecated com.google.gwt.widgets package is removed.

  • Various bugfixes and minor improvements.

Developer Tool Changes
Dev Mode
  • The -noSuperDevMode flag may be used to turn off Super Dev Mode and revert to old Dev Mode. (However, most current browsers no longer support Dev Mode plugins.)

  • The -modulePathPrefix flag may be used to move DevMode’s output to a subdirectory of the war directory.

Super Dev Mode
  • Compiling is much faster after the first compile. (Compiling is skipped altogether if no files have changed.)

  • The first compile no longer happens at startup.

  • Chrome reloads the page faster while debugging. (Sourcemap file size is reduced.)

  • The -launcherDir flag may be used to avoid running the GWT compiler before starting Super Dev Mode. When enabled, Super Dev Mode writes stub .nocache.js files that automatically recompile the GWT app before loading it. Therefore the bookmarklets aren’t needed. (This feature is automatically enabled when launched via DevMode.)

  • The -logLevel flag may be used to adjust how compile errors are reported.

  • The Dev Mode On bookmarklet dialog shows whether Super Dev Mode is turned on for each module on the page.

  • Messages logged using java.util.logging at level SEVERE and above are written to the browser console by default.

  • Fixed a startup failure caused by locked directories on Windows.

Testing
  • Better error reporting for compile errors while running tests.

  • Messages logged using java.util.logging at level SEVERE and above are written to the browser console and test output by default.

  • -Dgwt.htmlunit.debug may be used to open a JavaScript debugger window when running a test using HtmlUnit.

  • Removed RunStyleRemoteWeb and the BrowserManager tool.

  • Removed flags: -standardsMode, -nostandardsMode, -quirksMode. (GWTTestCase tests are always run in an HTML page in standards mode.)

For even more detail, see the Issue Tracker.

Endlich passt auch das Google Eclipse Plugin direkt zur neuen Version, bei meinem GWT-Projekt gab es keine Fehler, ich konnte direkt die neue Version und das Plugin nutzen.

Noch etwas:

The 2015 GWT.create conference is happening on January 22-23 in Mountain View, California and on January 27-28 in Munich, Germany.

This year’s sessions will include coverage of new functionality in upcoming versions of GWT, including Java 8 support and better interoperability with Javascript and Web Components. We will also talk about how Inbox by Gmail was built, using GWT and j2objc together to run the same code on the web and mobile devices.

JBoss Tools 4.2 freigegeben

Es gibt viele Neuerungen, siehe http://tools.jboss.org/documentation/whatsnew/jbosstools/4.2.0.Final.html. Vieles dreht sich um Cordova. Die Hibernate Tools unterstützen JPA 2.1 und Hibernate 4.3. AngularJS wird erstmalig über einen Wizard zum Aufbau von HTML5-Anwendungen unterstützt sowie ist ein AngularJS Eclipse Plugin integriert. Auch node.js erkennt der JS-Editor bei der Vervollständigung, für JS-Funktionen gibt es nun auch eine API-Dokumentation aus der JS-ECMA-Spezifikation. HTML Preview ist ein WYSIWYG Plugin für HTML pages

Log4j 2.1 freigegeben

Ralph Goers hat die Freigabe von Apache Log4j 2.1 bekanntgegeben: https://mail-archives.apache.org/mod_mbox/www-announce/201410.mbox/%3CBC551B1B-6257-4DB1-B640-0858A400FC68@apache.org%3E.

Neuerungen sind unter anderem:

o LOG4J2-868:  Add ShutdownCallbackRegistry interface for customizable shutdown callback handling.
This is particularly
       useful for application servers that wish to integrate with Log4j 2. 
o LOG4J2-589:  Supported filtering on custom log levels in configuration. 
o LOG4J2-856:  Documentation: add sections on the JUL Adapter, IO Streams and NoSQL Appenders
to the Maven and Ivy page. 
o LOG4J2-848:  Add a Java lookup to provide nicely formatted runtime version information.

o LOG4J2-809:  Move reflection utility class to API's private utility classes. 
o LOG4J2-833:  Documentation: added Runtime Dependencies link to left nav-bar on site. 
o LOG4J2-816:  Documentation: added section on XInclude to user manual Configuration page.

o LOG4J2-547:  Add the Log4j IOStreams component. 
o LOG4J2-431:  Added Memory-Mapped File Appender. Thanks to Claude Mamo. 
o LOG4J2-827:  Support use of TypeConverter classes through the standard Plugin system. 
o LOG4J2-825:  Add simple validation constraint annotations for the Plugin system. 
o LOG4J2-428:  Implement a GELF layout. Thanks to Mark Paluch. 
o LOG4J2-608:  Add java.util.logging implementation based on log4j-api. See log4j-jul documentation
for more details. 
o LOG4J2-793:  Add support for custom SLF4J Markers in log4j-slf4j-impl module. 
o LOG4J2-771:  Add lookup for application main arguments. 
o LOG4J2-787:  Add lookup for JVM arguments. 

Apache Commons Logging Version 1.2

Kaum zu glauben, aber von Apache Commons Logging gibt es noch einmal ein Update. Version 1.2 bietet als “maintenance release containing bug fixes” nichts neues, fixed aber laut https://www.apache.org/dist/commons/logging/RELEASE-NOTES.txt:

o LOGGING-37:   Improve performance of LogFactory#getFactory() by calling
                Thread#currentThread()#getContextClassLoader() directly instead
                of using reflection. As a consequence support for JDK 1.1 has
                been dropped. Thanks to Matthias Ernst, Archie Cobbs.
o LOGGING-156:  Fix SecurityAllowedTestCase when executed with OpenJDK 1.7 due
                to an additional required RuntimePermission. Thanks to Mikolaj Izdebski.
o LOGGING-157:  Fix javadoc to comply with javadoc tool from jdk 1.8. Thanks to Ville Skyttä.

Gradle 2.0 freigegeben

Das auf Groovy basierende Build-Tool Gradle erklimmt eine neue Version: Gradle 2.0.  http://www.gradle.org/docs/current/release-notes zählen auf:

Gradle 2.0 is an important milestone in the evolution of Gradle. As explained in the Gradle 2.0 announcement, the change in major version number signals a new backwards compatibility baseline. Many deprecated features and API have been removed in this release, allowing the development team to simplify the codebase and implement new functionality. The “Potential Breaking Changes” section of these release notes list all of the breaking changes that have been made and all Gradle users are strongly encouraged to read the list.

FindBugs 3.0

Ein neues großes Release mit Java 8 Unterstützung, siehe Ankündigung unter https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2014-July/004029.html.

The primary changes are:
FindBugs supports Java 8 now (both as runtime and target platform). We don't recognize all of the new Java 8 features, or detect many Java 8 specific bug patterns, but we can analyze Java 8 code without getting runtime exceptions.
FindBugs requires minimum Java 7 as runtime environment!
FindBugs uses ASM 5 now which means that some 3rd party detectors based on FindBugs 2.x/ASM 3 has to be upgraded. See details in ASM documentation.

For people who need to run FindBugs using a Java 5 or 6 runtime, you should stick with the FindBugs 2.0 branch.

Weiter unter http://findbugs.sourceforge.net/.

asciidoctorj: asciidoc mit Java transformieren

http://asciidoctor.org/ ist laut Webseite “an open source Ruby processor for converting AsciiDoc markup into HTML 5, DocBook 4.5 and other formats”. Die Software ist in Ruby implementiert und so plattformunabhängig programmiert, dass auch eine Ausführung mit JRuby möglich ist. https://github.com/asciidoctor/asciidoctorj kapselt das in einem netten Projekt, sodass eine Konvertierung direkt mit einer Java-API möglich ist:

import static org.asciidoctor.Asciidoctor.Factory.create;
import org.asciidoctor.Asciidoctor;
...
Asciidoctor asciidoctor = create();

...

String rendered = asciidoctor.render("*This* is it.", Collections.EMPTY_MAP); System.out.println(rendered);

...
String rendered = asciidoctor.renderFile(new File("target/test-classes/rendersample.asciidoc"), Collections.EMPTY_MAP);
System.out.println(rendered);
...

Mit Optionen:

Map<String, Object> attributes = new HashMap<>();
attributes.put("backend", "docbook");

Map<String, Object> options = new HashMap<>();
options.put("in_place", true);
options.put("attributes", attributes);

String render = asciidoctor.renderFile("target/test-classes/rendersample.asciidoc", options);

DataNucleus 4.0

Unter der Apache Lizenz:

It is the most standards-compliant Open Source Java persistence product in existence. It is fully compliant with the JDO1, JDO2, JDO2.1, JDO2.2, JDO3, JDO3.1, JPA1, JPA2, JPA2.1 Java standards. It also complies with the OGC Simple Feature Specification for persistence of geospatial Java types to RDBMS. It utilises an OSGi-based plugin mechanism meaning that it is extremely extensible.

http://www.datanucleus.org/. Neues: http://www.datanucleus.org/documentation/news/access_platform_4_0_0_release.html:

  • Java 1.8 : Upgrade to ASM v5 to allow for Java 1.8 bytecode changes
  • Java 1.8 : support for the majority of java.time types
  • Changed the bytecode enhancement contract to use an internal definition rather than the JDO contract
  • JPA : no longer needs to have jdo-api.jar present
  • Cassandra : support for Cassandra 1.2+
  • Support for multicolumn TypeConverters (used by RDBMS, Cassandra, Excel, ODF, Neo4j, MongoDB, JSON, HBase)
  • SchemaTool : support for create/delete of a schema (where the datastore supports it)
  • RDBMS : support for HikariCP and DBCP2 connection pools
  • RDBMS : ability to use single connection per PM/EM (rather than 1 for transactional operations, and 1 for non-transactional operations)
  • RDBMS : removed the need to create JavaTypeMapping classes when the user type has a TypeConverter
  • JSON : support for embedded 1-1 relation fields/properties
  • Excel/ODF/JSON/MongoDB/Neo4j/HBase/Cassandra : move to using „core“ definition of table/columns meaning access to generalised features tested on other datastores

gwtbootstrap3 Version 0.7 fertig

https://github.com/gwtbootstrap3 ist eine GWT-Bibliothek mit hübschen Komponenten, einen Grid-System, siehe dazu auch https://gwtbootstrap3.github.io/gwtbootstrap3-demo/, alles ist optimiert auf Umfluss für mobile Endgeräte. Es basiert auf Twitter Bootstrap http://getbootstrap.com/. Änderungen in Version 0.7:

  • Added connivence methods to easily set margins/paddings on widgets.
  • Ensured removal of all handlers on the unLoad of widgets
  • Added methods to show/hide/toggle NavbarCollapse
  • Further styled GWT’s CellTable/DataGrid to reflect Bootstrap tables
  • Upped the dependency of GWT to 2.6.0
  • Added submit/reset methods to Form
  • Renamed all setTarget/setToggle methods to setDataTarget/setDataToggle, also any setter that referenced a data* attribute was renamed
  • Added in a check as to not load jQuery if it’s already present
  • Changed the parent of gwtbootstrap3-parent to oss-parent (org.sonatype.oss)

Was ich in meinem Code ändern musste war tatsächlich die *Data* Sache:

dismissButton.setDismiss( ButtonDismiss.MODAL ); –> dismissButton.setDataDismiss( ButtonDismiss.MODAL );

dialog.setKeyboard( true ); –> dialog.setDataKeyboard( true );

anchor.setTarget( "#" + title.hashCode() ); –> anchor.setDataTarget( "#" + title.hashCode() );

anchor.setToggle( Toggle.COLLAPSE ); –> anchor.setDataToggle( Toggle.COLLAPSE );

Real Time Kommunikation mit Animated GIFs

Ein ziemlich intelligenter Trick, um Daten vom Server zum Client zu senden sind Animated GIFs. Ein GIF kann beliebig viele Frames haben und der Client hält die Verbindung offen um noch “den Rest” zu lesen.

https://vimeo.com/49447841

https://github.com/videlalvaro/gifsockets ist eine JVM-Bibliothek in Java und Clojure, das genau das macht: Einen Server zu bauen, der Frame für Frame zum Client streamt. Es gibt ein Start-Frame, dann kann das Serverprogramm beliebig viele Frames senden und zum Schluss ein Abschluss-Frame – dafür gibt es eine API. Allerdings kodiert das Beispiel die Daten (hier Text) als Grafik “Graphics drawString()”; interessanter wäre es, Binärdaten über Farbwerte zu kodieren und auf dem Client dann auszulesen – hier ist also noch Platz für ein weiteres Open-Source-Projekt.

Natürlich brauch so etwas nicht wirklich, wenn man WebSockets nutzen kann. Doch es ist ein interessanter Hack.