Burk is a long-time programmer and software architect, currently focused on the Java platform with an eye toward mobile platforms. In 2010, he was voted a JavaOne Rock Star for his talk on User Experience Anti-Patterns, and is a co-author of the books "97 Things Every Software Architect Should Know" and "97 Things Every Programmer Should Know". Burk is also a Sun Certified Programmer, Developer, and Enterprise Architect for JEE 5. Burk has posted 25 posts at DZone. View Full User Profile

JavaOne Day 4 - Part 2

06.15.2009
| 3697 views |
  • submit to reddit
Stephen Chin and Joshua Marinacci presented "Getting Started with WidgetFX: Open-Source Widget Desktop Platform with JavaFX™ Technology"; and it was an excellent introduction to WidgetFX, the open source platform for creating and deploying widgets (small utility apps) written in JavaFX. Stephen did a fine job of demonstrating both the WidgetFX framework and the Widget FX dock.

The widgets themselves are JavaFX applications that use the org.widgetfx.Widget class instead of the normal javafx.stage.Stage class to contain their user interface code. As an example of how easy it is to transform a JavaFX application into a WidgetFX component, Stephen showed us the WidgetFX version of Henry Zhang's Pac Man game written in JavaFX. The "conversion" was quick and the only tricky thing was making the screen resizable so it would fit in the WidgetFX dock. There were a couple of other interesting demos of existing widgets, but the most unusual involved a USB controlled rabbit. This was an informative and enjoyable session, and I recommend watching the video once it is available.

By the way, WidgetFX is currently running a contest and the top prize is a "year of books" from Apress. Go to the WidgetFX.org home page at http://widgetfx.org and click where it says, "WidgetFX Developer Contest Win a Year of Books" to find out more.

In presenting "Bulletproof User Interfaces: Applying Test-Driven Development to the UI," Jared MacDonald of The MathWorks, Inc. demonstrated that it is possible to use the Test Driven Development (TDD) approach when creating user interfaces. Jared started with a set of business requirements then followed the TDD process of creating a test that failed, writing just enough code to make it pass, refactoring any code that needed it, and then repeating the process until the requirements were met. He created a simple log-in dialog box as an example, and along the way demonstrated how using a TDD approach could find omissions and bugs in code that looks like it ought to work. Jared did an excellent job with this presentation and I look forward to seeing what he comes up with next year.

"Introduction to Google Guice: The Java™ Programming Language Is Fun Again!" presented by Bob Lee and Jesse Wilson from Google, was based on the premise that Dependency Injection is a Good Thing and that Google Guice is the best way to use it. Jesse began by showing us the code for a Twitter client that directly instantiated the objects it needed. He then showed us how using dependency injection made the code easier to test and to reuse in different applications. Jesse described the different types of dependency injection offered by Google Guice (constructor injection, method injection, and field injection), but strongly recommended using constructor injection whenever possible because it is the easiest and safest way.

Jesse gave us a quick look at Providers which allows for lazy construction for objects that may be expensive to create, getting multiple instances of the object, and accessing information from objects with different life-cycles and scopes. Moving on, he showed us how using Guice can help you take an existing application with many explicit dependencies and refactor it into a group independent modules.

Jess also gave us a quick look at GIN, which is a variant of Guice for GWT, that generates JavaScript from Guice modules. How to use Guice for Aspect Oriented Programming to provide crosscutting concerns like transactions, security, and performance monitoring. The last thing he talked about was that Guice 2.0 includes a new Introspection SPI for people building tools that need to access the internals of Guice.

Jesse covered a lot of ground in a short time and this is another time I'll recommend watching the video. There is a lot here and if you're interested in Google Guice, this session is a great place to start.

If you've been following my write-ups, I want to thank you for your time and attention. I am writing one more article on JavaOne 2009 for DZone and the intent is to take a step back and look at the conference as a whole. I’m also writing a review for a device that deserves much more attention than we’ve given it. I think you'll find both articles interesting.

Burk Hufnagel, reporting for DZone
Published at DZone with permission of its author, Burk Hufnagel.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

sub online replied on Fri, 2009/06/26 - 2:58am

Bullshit.links of londonNow you are scared aren't you!links of londonThinks one way but acts another. She's so hypocritical. She thinks one way but acts another.Slow as molasses.Whatever's convenient for you.You don't have the right. Who do you think you are? You don't have the right to say those things.Tiffany JewelleryDon't tell anyone that I did it.You're incompetent.Don't jinx it.Great minds think alike.Could you do me a favor?Why so mysterious!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.