Java 7 gut in der Zeit

Nach dem Beitrag von http://mail.openjdk.java.net/pipermail/jdk7-dev/2011-May/002124.html und dem Kalender http://openjdk.java.net/projects/jdk7/ kann man sagen, dass das JDK-Team gut in der Zeit liegt und Java 7 vermutlich punktgenau am 28.7.2011 landen wird.

2010/12/23    Feature Complete (M11)
2011/02/17    Developer Preview (M12)
2011/04/12    Rampdown start: P1-P3 bugs only
2011/04/28    API/interface changes: Showstoppers only
2011/05/11    All targeted bugs addressed
2011/05/18    Bug fixes: Showstoppers only
2011/06/02    Last scheduled build (M13)
Final test cycle starts
2011/07/28    General Availability

Allerdings führt http://mail.openjdk.java.net/pipermail/jdk7-dev/2011-May/002124.html auch auf:

  - The Gervill sound synthesizer was integrated early in JDK 7 but
    due to a clerical error never made it onto the feature list; and

  - The "Enhanced JMX Agent and MBeans" feature has been reduced to
    "Enhanced MBeans"; the JMX Agent work was not completed in time.

Groovy 1.8 ist fertig

Die News unter http://docs.codehaus.org/display/GROOVY/Groovy+1.8+release+notes. Interessante Änderungen sind:

  • Bessere Performance bei nicht-gemischten Typen (Ganzzahlen bleiben intern int)
  • In DSLs waren Punkte, Klammern beim Zugriff auf Eigenschaften immer etwas hinderlich. In der neuen Version kann man auf sie verzichten. So steht “turn left then right” etwa für “turn(left).then(right)”. Das nennt sich Command-Chain
  • Die Parallel-Bibliothek http://gpars.codehaus.org/ ist standardmäßig mit dabei, Tutorial unter http://gpars.org/guide/index.html.
  • Closures als Argumente für Annotationen. Das macht etwa @Invariant({ number >= 0 }) möglich.
  • Neuer JSON-Builder wie XML-Builder
  • Neue AST-Transformationen für injizierte Logger, automatische toString()/equals()/hashCode()/clone()-Methode, Prüfung auf Thread-Blockierer, …
  • Diamanten-Operator wie aus Java 7

Guice 3 mit @PostConstruct = Mycila

Von Spring habe ich mich schon länger verabschiedet und bin für meine clientseitigen Programme auf Guice gewechselt. Bis auf die Tatsache das es keinen automatischen Autoscan gibt, hat mir nichts wirklich gefehlt. Guice unterstützt auch standardmäßig nicht die Common Annotions, aber bei Guice 2 hatte ich http://code.google.com/p/guiceyfruit/ im Einsatz, da das jedoch auf intern Datenstrukturen von Guice 2 zurückgriff, konnte ich nicht auf die neue Version Guice 3 migrieren. Also schmiss ich GuiceFruit raus und suchte eine Alternative. Die gibt es mit dem Projekt http://code.google.com/p/mycila/:

http://code.mycila.com/wiki/MycilaGuice

Google Guice contributions:

  • ServiceLoader plugin (enables injection into loaded services)
  • JSR250 supports improved from GuicyFruit
  • Custom Injector with more useful methods which consider the whole Injector hierarchy
  • CachedScope to cache your binding for a specific duration

Neben Mycila Guice gibt es auch noch andere tolle Dinge:

  • Mycila Event
  • Mycila JMX

Insubstantial 6.2

Nach dem Kirill Grouchnikov in sein Substantial keine Zeit mehr investiert, gibt es vom Nachfolgeprojekt ein erstes ernsthaftes Update: http://shemnon.com/speling/2011/04/insubstantial-62-release.html. Unter anderen gehört Maven dazu, Änderungen laut Webseite:

  • Gradle – the codebase has been adjusted to use Gradle as the build system. This has allowed for seampless deployment into the maven repositories. For Trident, laf-plugin, and substance-swingx this represents the entirity of the changes
  • Maven Distribution – this deserves it’s own bullet point. The jars are available from day one in the maven repositories.
  • NPE Bugs – most of the code changes are to deal with possible null pointer exceptions. No one in their right mind would use a JTable as a table cell renderer, but it does happen in the wild.
  • Flamingo API addition – a patch from Jonathan Gileswas applied to allow commands to be removed from the ribbon.
  • Java 7 fixes – there is a bug fix in Java’s Color Choosers that broke substance 6.1. This is fixed in Substance 6.2, so it should run on Java 7 now!

Twitter steigt auf Java um

Das führt zu einer deutlichen Performance-Verbesserung und Hardware kann wieder abgebaut werden. Weiterhin werden Entwickler langsame Programme schreiben können (was ebenfalls in allen anderen Programmiersprachen gelingt), aber zumindest zeigt Twitter (neben so hoch skalierten Systemen wie eBay oder Facebook), dass Java grundsätzlich eine exzellente Performance bietet. Ein paar Details unter http://engineering.twitter.com/2011/04/twitter-search-is-now-3x-faster_1656.html. Die Kernbausteine der Lösung (Blender genannt) sind Apache Thrift, Apache Lucene und JBoss Netty.

Google App Engine 1.4.3 veröffentlicht

Siehe http://googleappengine.blogspot.com/2011/03/announcing-app-engine-143-release_30.html. Änderungen in Java:

Java

  • Concurrent Requests: Until now, Java applications relied on starting additional instances to dynamically scale up for higher traffic levels. Now with support for concurrent requests, each application instance may serve multiple user requests at the same time. To start, ensure your application’s code is threadsafe, then enable concurrent requests by adding the <threadsafe> flag to your appengine-web.xml.
  • Java Remote API and Deferred API support: The Remote API andDeferred API libraries have been supported in Python for awhile, and now they can be used with Java, too! The Remote API allows you to perform operations on your application’s datastore from your local machine. This is particularly useful for work that is not well-suited to App Engine’s request/response model. The Deferred API allows users to more easily write and execute ad hoc tasks. Our docs contain more information and examples on how to use the Remote API and Deferred API in Java App Engine.
New and changed APIs
  • Files API: The new Files API in Python and Java allow you to pragmatically read and write data using Blobstore. This API can be used to generate reports, export data, or do anything that your heart desires that requires large, binary objects.

 

File-IO finde ich spannend, noch toller wäre es gewesen, wenn sich Google an NIO2 halten würde.