Jun 13 2007

JavaOne 2007 Conference Notes

Here are all my notes taken at CommunityOne and JavaOne 2007. I was in San Francisco for 5 days and attended over 40 technical and birds of a feather sessions and managed to put together this 30 page document. For you download pleasure you can find a PDF version of all my conference notes.

CommunityOne 2007: Monday
Welcome to CommunityOne 2007
Getting Started and what’s New in GlassFish v2
Lunch with the Java Posse
Ajax Applications Made Easy with jMaki and Scripting
Swing GUI Building with Matisse: Chapter II
JRuby: Understanding the Fuss
Up the Stack
G2One

JavaOne 2007: Tuesday
Tuesday General Session
JRuby on Rails – Agility for the Enterprise
Evolutionary Java – General Session
Java Puzzlers
Using jMaki in a Visual Development Environment
Java Persistence API – Best Practices and Tips
Developing a Real-World Web Application with NetBeans 5.5 Visual Web Pack
Grails, Sails, and Trails – Rails Through a Coffee Filter
Rapid Seam Application Development with the NetBeans IDE

JavaOne 2007: Wednesday
Wednesday General Session
Swing Vector Graphics
Effective Java Reloaded – This Time It’s for Real
Building JavaServer Faces Applications with Spring and Hibernate
Extreme GUI Makeover 2007
Anatomy of an Eclipse RCP Application
Tricks and Tips with NIO
Dive into the GlassFish Aquarium
Seamless Web Browser Integration
Putting a Swing Front End on a Web Application

JavaOne 2007: Thursday
Thursday General Session
Being Productive with Swing
Technical Overview of GlassFish v2
JavaScript FX
Why Spaghetti is Not Tasty
Beans Binding
Write a 3D Game in Java
Web 3.0 – This is the Semantic Web
The Java 3D API and Java Binding for OpenGL
Glossitope – An Open-Source Java-based Widget Container

JavaOne 2007: Friday
Friday General Session
Bringing Life to Swing Desktop Applications
Ajax and JavaServer Faces Tooling in Eclipse
Bytecode Manipulation Techniques for Dynamic Applications for the JVM
Filthy-Rich Clients – Talk Dirty to Me
Writing Games with Project Darkstar

Technorati Tags: , , , , , , , , , ,


Jun 12 2007

Writing Games with Project Darkstar

For the last session of JavaOne 2007, I attended the Writing Games with Porject Darkstar technical session presented by Chris Melissinos, Sun’s Chief Gaming Officer, and Jeffrey Kesselman, Chief Darkstar Architect. Project Darkstart is Sun’s Gaming Server (SGS). Chris told the crowd of gamers that there is a huge demand for online game develop to lower costs. He also described how it is easier to make 15 games that generate $1M than to develop one game that will generate $15M. With that said, Chris elaborated that the purpose of Project Darkstar is to make practical, massively multi-player online (MMO) games. Current MMO games scale only by zoning users into different shards. The design goals for Darkstar are similar to those of GlassFish, Darkstar is to be a distributed, persistent, fault-tolerant server that is economical to develop for and administer.

There was also time for a quick discussion on how to develop a game on Darkstar. Someone spoke about their experience writing Bunny Hunter Online, a 2D multiplayer action game.

Technorati Tags: , , , , , ,


Jun 12 2007

Filthy-Rich Clients – Talk Dirty to Me

Romain Guy, of Google, and Chet Hasse, of Sun, presented on their forth coming book Filthy Rich Clients which is based on a previous JavaOne technical session of the same name. They described this session as “the presentation based on the book based on the presentation.”

The session began with a slide listing Data Binding as a goal for the talk. Romain then said, “Data Binding is the most critical development of Swing today, but is it not here yet.” The next slide crossed out Data Binding and listed Applications Framework which is subsequently scratched out for ‘Cooler Applications.’

The ingredients, or agenda, for developing cooler applications according to these filthy rich engineers is based on graphics, performance, animation, and effects. Romain suggested that you override the paintComponent method instead of the paint method for custom components. Overriding the paint method may clobber some painting code that should really happen, like appropriately calling paintBorder, paintChildren, etc. The session titled Bring Life to Swing Desktop Applications talked about overriding the paint method.

For the performance portion of the talk, Romain was mostly concerned with the performance of scaling images, such as creating thumbnails, applying effects, etc. For these types of image operations quality and performance matter. Romain explain how there are simply to many options to scale images in Java. The best performing methods to scale an image down is to use the drawImage method using the default interpolation (NEAREST), the second best method is to use drawImage with BILINEAR, followed with BICUBIC.

Another common sense piece of advice offered here was to request repaints only for the area where the UI has changed, this is generally known as clipping. To repaint just what you need you can use the repaint(x, y, w, h) method on the component.

In regards to animating your Swing application, Romain and Chet recommend you use the Timing Framework from the SwingLabs for scheduling and running animations. The Timing framework has an Animator class that can run a instance of a TimingTarget which has the animating code.

For effects they recommend the blur, drop shadow, spring (ghost effect), morphing, and animated transitions. The SwingLabs has a GaussianBlurFilter, ShadowRenderer, Morphing2D class to achieve blurs, drop shadows, and morphings.

The idea of using animated transitions such as fading in and out is to lead your users, not leave them. Romain and Chet are working on an Animated Transitions project related to the book.

Technorati Tags: , , , , , ,


Jun 12 2007

Bytecode Manipulation Techniques for Dynamic Applications for the JVM

This JavaOne 2007 technical session seemed like a panel discussion between Eugene Kuleshov and Tim Eck of Terracotta, Tom Ware of Oracle/TopLink, and Charles Nutter of Sun/JRuby. The session started off by describing the Java Virtual Machine, the Java bytecode, and the ASM framework. The Java Virtual Machine (JVM) is a proven and reliable platform aimed at high-performing applications. The JVM is designed for statically-typed languages but provides class loading and a reflection API for dynamic languages. The discussion also delved into the class file format. The class file format simply consists of field and method names, string literals and constants, and debug information.

The ASM bytecode framework is a simple, small, and fast library for adding dynamism to your Java application. The ASM framework is useful for Java code generation and modification. Terracotta, TopLink, and JRuby use ASM to dynamically inject code into an existing class.

Charles Nutter described how the JRuby team is using the ASM framework to support Ruby’s dynamic and open class nature. Speaking of JRuby’s move to ASM Charles said, “To be slower than one of the slowest dynamic languages was embarrassing.” Using ASM, recent version of JRuby are performing better than the C implementation of Ruby in some cases.

As a word of warning, you should always document use of code generation because it is hard to debug and maintain if you don’t know what is going on.

Technorati Tags: , , , , , ,


Jun 11 2007

Ajax and JavaServer Faces Tooling in Eclipse

This JavaOne 2007 technical session started off with Cameron Bateman describing how to use the Eclipse Web Tools Platform (WTP) Project to create JavaServer Faces (JSF) applications and custom tools for Eclipse. This was a discussion better suited for JSF component developers. Eclipse web tools provides a web page editor, JSF configuration model, editor, and wizards. Eclipse and the WTP project are extensible, the WTP in particular allows developers to leverage design-time tag rendering, expression language support, and the meta-data framework. Customizing Eclipse and the WTP project allows you to provide design-time support for your custom tag libraries in the Eclipse IDE.

This was like two sessions in one because Philippe Ombredanne then presented on the Ajax Toolkit Framework (ATF) tools in Eclipse. The ATF project can help to develop AJAX applications in Eclipse. The most interesting aspect of the ATF project is the Eclipse Mozilla mashup. The ATF project embeds Mozilla in Eclipse via XULRunner and JavaXPCOM. In addition to embedding a browser in the Eclipse IDE, the ATF also provide a rich feature set for AJAX developer such as a JavaScript editor and debugger, DOM and XMLHttpRequst inspector, and plain simply faster AJAX development. You can debug a remote website in Eclipse with the ATF project similarly how you would step through a Java project in the debug perspective. Embedding the Mozilla “enables web browser integration beyond the capabilities of the standard SWT browser widget” and brings AJAX applications to the rich client desktop.

Technorati Tags: , , , , , , , , , ,


Jun 11 2007

Bringing Life to Swing Desktop Applications

Kirill Grouchnikov and Alexander Potochkin presented on advance Swing techniques at this JavaOne 2007 technical session. They talked about advanced painting and effects such as non-rectangular components, translucency, layering, image filtering and animation.

Custom components, especially non-rectangular components, should override the contains and paint methods. You can implement any effect on custom components by overriding these methods. By default, components are opaque. You can use opacity for transition effects, such as fading in and out of a container when tabs as selected. The reason you want to use visual effects is to indicate to the user a change in state, by nature Swing changes the UI immediately on an event.

In addition to adding effects to custom components and playing with opacity, Kirill talked about using a custom RepaintManager, and drawing on the glass pane. Customizing the RepaintManager allows you to control Swing’s component painting, for example to force a container to repaint child components. Drawing on the glass pane allows you to paint over all components. Kirill also suggested using JXPanel and JXLayer of the SwingX project from SwingLabs, these containers supports translucency, Painters API, image filtering, and non-rectangular components.

Kirill and Alexandar also talked about layering with UI delegates. Swing UI delegates are the classes responsible for painting Swing components, there exists one UI delegate for each component. As of current Java versions there are 41 UI delegates.

Kirill demoed some eye candy Swing effects, something he calls the ghost effects. Kirill has made available Rainbow, a SVG explorer application that demonstrates many of the techniques discussed in this session.

Technorati Tags: , , , , ,