Showing posts with label devoxx. Show all posts
Showing posts with label devoxx. Show all posts

Thursday, December 11, 2008

Java 7 Update from Mark Reinhold at Devoxx

This is a summary of Mark Reinhold's Java 7 update given at Devoxx, with a few comments from myself. Mark described his presentation as a provisional plan and not binding.

The changes in Java 7 will come from Sun and others.

Among the "Big" changes from Sun (with what looks like a prioritized ordering):

  • Modularization - 294 and project Jigsaw
  • 292 - JVM Support for dynamic languages
  • JSR 203 - More New I/O APIs which are nearly finished, includes true asynchronous I/O (not just non blocking I/O) and finally a real file system API
  • JSR TBD: Small language changes (following)
  • Safe rethrow - Allows a broad catch clause, with the compiler being smarter on what you're allowed to rethrow based on what is thrown from the try block. (I had not seen this before but it looks nice)
  • Null dereference expressions - Null checks with '?' syntax similar to Groovy... lettign developers avoid a nest of null checks.
  • Better type inference - Example around generics instantiations, but it was not clear how far the inference would be taken (the more the better in my opinion).
  • Multi-catch - (yes!) allows a comma seperated list of disjunctive exception types in catch clause.
  • Joe Darcy is leading effort in Open JDK and his blog was referenced: http://blogs.sun.com/darcy
  • JSR 296 - Swing application framework - It still needs to be easier to create Swing apps.
  • A forward port of 6u10 features (Java Kernal, QUickstarter, New Plug-in, etc.)
The "Small" Sun changes are:
  • SCTP (Stream Control Transmission Protocol) - Driven by big customers, probably proprietary
  • SDP (Sockets Direct Protocol) - Again, customer driven
  • Upgrade class loader architecture - Work started in Java 5 and continues to evolve. There are some deadlock issues today in classloader delegation that will be addressed.
  • Method to close a URLClassLoader - seems simple but actually tricky to implement.
  • Unicode 5.0 support - "just got to do it"
  • XRender pipeline for Java 2D - This was an Open JDK Integrators Challenge project,and is an analog to the OpenGL pipeline but much more portable across x11.
  • Swing Updates - JXLayer, DatePicker, CSS styling (maybe) that Ethan Nicholaus (sp?) has been working on
The "Fast" changes from Sun (apparently, this means performance improvements):
Hotspot run-time compiler enhancements
  • G1 Garbage collector (available in 6 experimentally soon) - Leads to much smaller pause times and hopes to replace CMS (Concurrent mark sweep) GC
  • Compressed pointer 64 bit VM
  • MVM-lite maybe - Multiple Virtual Machines will help you run isolated applications and allow a kill -9 on a Java application. Mark said it is not clear what problem would be solved, and original project was extremely ambitious, but desire to drag apps out of browser plugin presents a good usage and need for MVM.

Other's Features:
  • JSR 308 - Annotations on Java Types - Driven by Prof. Michael Ernst and Mahmood Ali. Encode more compile time assertions in code (like the @NotNull annotation), which is checked by the static checker. (yes!)
  • Concurrency and Collections Updated (JSR 166 continues). All the features announced on the concurrency interest mailing list by Doug Lea yesterday: Fork/Join, Phasers, LinkedTransferQueue, ConcurrentReferenceHashMap, and Fences
The featues not in 7 (some of them, anyway the list is actually infinite)
  • Closures - No consensus around single proposal
  • Reified generics
  • 1st class properties
  • Operator overloading
  • BigDecimal syntax
  • JSR 295 - Beans Binding
And finally the big news... a release date! "Java 7 in Early 2010" - Mark Reinhold

Wednesday, December 10, 2008

10 Things You Need to Know About JavaFX 1.0

Based on Danny's Coward's Devoxx keynote...

1. It's Here! The SDK, Netbeans 6.5 with JavaFX integration, the JavaFX Production Suite, and 75 sample applications can be downloaded. The sample applications range from useful to pedantic, and Josh Marinacci has promised more applications to come.

2. Cool New Language. It is purpose built for RIA, declarative, uses data binding, and contains triggers. It will look familiar to those who have seen the Groovy builders, such as the SwingBuilder, and the data binding looks superficially similar to that of Flex. However, the JavaFX Script looks much more modern than MXML, which is a win for JavaFX.

3. Beautiful Graphics. Danny said, "Beautiful graphics are an essential component of an RIA application." JavaFX uses graphics acceleration on some platforms and has a good integration with the scene graph of the graphics created by the designers.

4. Rich API Set. There is a scene graph API, media API, and Restful web service API... plus you can import any Java library you would like.

5. Great Developer Tool. In Netbeans, JavaFX has first class project support, JavaFX code editing support, code completion, compile on save, a debugger, graphics preview, and deployment helpers.

6. Integrates into Graphic Design Tools. The focus is on the developer/designer workflow. Designers use photoshop and illustrator, and a plugin to those apps can export graphics and the layers involved to a JavaFX addressable API. Very impressive to see the layer preserving exports from the design tools.

7. Runs on multiple devices. There is a common language and no subsets (yah!). It runs on today's mobile devices on top of Java ME.

8. Built on Java. The compiler, runtime, and documentation system are familiar and field tested, and recent upgrades to the Consumerm JRE have been driven by a need from JavaFX. The Java kernel (for faster download), Java Quickstart (for faster startup), and new, robust browser plugin were all driven by a JavaFX need. Here's a text diagram of the stack:

JavaFX Spplication
JavaFX Script
Media API / Scene Graph / Web Services
Java SE / Java ME

9. Encode Once, Play Anywhere Media. Support for Mac native and windows native media, plus support for a new cross platform media (JXM or JavaFX Media?)

10. Deploys Itself. Deploys on JRE as a JNLP application. The JRE is on 9 out of 10 new PCs, so Sun has confidence in the market penetration.

There were a variety of very cool demos, including media players in a few lines of code, integrating Desktop and Mobile applications, dragging browser apps outside the browser, and running apps on the desktop.

Cool stuff and there is surely more info to come.