Tuesday Sep 01, 2009

The folks over at JFXStudio have started a new coding challenge: "Small is the New Big". This time they are going to try something different. Harkening back to the demo scene of old, this month’s challenge is to build something interesting with a very small amount of code: 30 lines in a single file!.

The challenge starts on September 8th when the secret theme will be revealed, and the last date to send in your entry is September 30th. See the rules for more details.

Tuesday Jul 28, 2009

Terrance has a great blog covering the new JavaFX Mobile 1.2 Early Access for Windows Mobile. Read it here.

Terrance's blog includes a screencast demonstrating how to get started and how to run a sample application (Mosaic) on the HTC Diamond, including using the deploy-via-USB feature.

Wednesday Jun 10, 2009

First look - download JavaFX 1.2 to preview. Test this newest version of the JavaFX 1.2 SDK for yourself and tell the world what you think. Post a blog about the features you like most or describing your experience using JavaFX and enter for a chance to win $500 or a $25 amazon.com gift certificate. 


Tuesday Jun 09, 2009

Technically I'm on vacation this week so don't mention this post to my boss. I simply couldn't wait to blog about cool stuff we put into JavaFX 1.2. Shhhhh!

Lots of JavaFX related things were announced at JavaOne, many of them concerning future products and other bits that aren't released yet. This post won't cover any of those. There were so many things discussed at JavaOne that I'm afraid some of the key points of the new JavaFX might have been missed. In this post I'm only going to cover the things that you can actually download and work with today. I'm talking only about the new version of JavaFX, previously codenamed Marina, and now called JavaFX 1.2. Without further ado, here is my personal list of the most important features.

Top 5 Most Important Features in JavaFX 1.2

Linux and Solaris support

Support for JavaFX under Linux and Solaris has been a long time coming. It's always been in our continuous build system and we really wanted to ship it with the 1.0 release, but too many things were broken. Finally, after much hard work, we have a beta release. Our goal is to make Solaris and Linux equal platforms with Windows and Mac in the JavaFX world. JavaFX is about having one Java across all of the screens (Desktop/Mobile/TV) as well as all of the OSes (Mac/Win/Linux/Solaris). This is one more step towards that goal.

Some features still don't work, which is why we are calling it a beta release, but it's a good starting point. We are now using GStreamer for the video support, which was one of the key features previously missing. You will get some graphics hardware acceleration depending on your distro and configuration. Shaped windows do not work yet. This is due to a bug in the underlying JRE. The graphics guys say they have a fix which will be rolled out into Java 6 and OpenJDK soon, so you won't have to wait until the next release of JavaFX for cool rounded windows.

[screenshot]

Controls and Layout

JavaFX has had great graphics but at the 1.0 release had only a single native UI control, TextBox. It's kinda hard to make a real business oriented application using only text controls. That's all changed now. JavaFX 1.2 has real UI controls, designed for the 21st century. We looked at everything we always loved and hated about Swing, and considered long term UI toolkit trends. Then we build a new control and layout API that addresses the kinds of applications people need to build today. Here's just a taste of what's in the new controls:

  • All controls are skinnable with CSS, so a designer can create a common look across all of your applications.
  • There is a new modern default look and feel, Caspian, designed to look at home across OSes and on mobile devices
  • Controls are in the common profile, meaning they will work on all devices, not just desktops.
  • New controls for standard features like progress indicators and the hyper link
  • All built on top of the JavaFX scene graph, so there are no remnants of AWT.

Along with the controls is a new layout system that addresses the biggest problems with the AWT layouts. It is now super easy to mix layout with animation, and to create custom layouts using only a few lines of code. With controls we can build real business applications that run across multiple screens.

There are a few controls missing from the current list. In particular you will notice the absence of Table and Tree. It's not that we don't have plans for them. There simply wasn't enough time and we didn't want to hold back the release. Rest assured they are coming.

PreviewScreenSnapz001.png
PreviewScreenSnapz002.png

Charts

Along with controls the most important feature for building business applications is charts. Charts are such a common request that we built them into JavaFX. All of the standard chart types are there, including pie, scatter, and bar charts. They are very easy to use and customize. You can also create your own chart types using a few lines of code. Here's a few examples.


Data: Persistence, RSS/Atom, and Tasks

Previously you could work with data only by dropping down to Java code. This would be fine except for the fact that mobile Java code is different than desktop Java code. In addition, every form of Java has it's own special API for persisting data. To fix this problem we've added new support to JavaFX common profile to hide these kinds of platform differences and let you get back to coding great apps. Here's a quick list of the new stuff:

  • javafx.io.Storage for persisting data locally on any client platform
  • javafx.data.feed.* built in support for RSS and Atom data feeds
  • DateTime, Math, and Properties as JavaFX classes
  • javafx.async.* base classes for all asynchronous operations in JavaFX, including a clean way to implement Java based tasks

Speeeeeeed

Our goal is for every updated to JavaFX to be faster, and I think we definitely hit that goal. Across the board you will find JavaFX 1.2 to be faster than 1.1 and 1.0. In terms of startup time, memory usage, and graphics performance we have improved every part of the JavaFX user experience. For certain tasks you will see as much as a 3x improvement over the previous release.

To achieve this speed improvement we revisited almost every part of the platform. The compiler switched from using true multiple inheritance to mixins. This eliminates most of the nasty corner cases that gave multiple inheritance a bad name while providing what developers want 90% of the time. As a side benefit the underlying compiled bytecode is smaller and faster.

The graphics team did a lot of work redesigning the scenegraph to handle updates to the scene more intelligently. The result is fewer repaints and a more responsive user interface.

There were also bug fixes across the board to the video & audio stack and the underlying graphics pipeline. In addition, we put a lot of work into JavaSE 6 update 14 to reduce startup time and improve webstart performance. Over all you will find JavaFX 1.2 to be faster and smoother than the previous releases.

SafariScreenSnapz021.png

Just the beginning

The five features I listed above are just a small part of the many improvements in JavaFX 1.2. What's most important is this is part of a larger plan to have regular smaller releases of the JavaFX platform rather than the huge 2+ year release cycles of the JRE. Faster and smaller releases ensure that we ship high quality software to you faster, and lets us better incorporate your feedback. If there is any feature you feel is missing please send us a note or file a bug at javafx-jira.kenai.com.

Back to vacation for the week and then time to dive into the next release. Please let us know how you like JavaFX 1.2 and what you are are building with it.

Thursday May 07, 2009

I recently did an interview with the excellent web technologist, Scott Hanselman, on his podcast Hanselminutes. He happened to be in Eugene, Oregon (where I live) presenting to our local .NET user group so I invited him to a local pub for burgers and beer. Afterwards we sat down to chat about RIAs, JavaFX, and the battle to be The VM on the web. You can find the interview on his website or iTunes.

Tuesday Mar 31, 2009

JavaFX 1.1.1 was released last week. There are no new apis, but some good video related bug fixes. The full release notes are here.

Also of note, two new samples were added to the samples page: Solar System and BookPanel.

FirefoxScreenSnapz001.png

Monday Mar 23, 2009

 Its never been a better time to be a developer. Code JavaFX and earn some sweet moolah. 

  • Go here: http://javafx.com/challenge/
  • Be creative and code javafx
  • Win
    • 1st Place: $25,000
    • 2nd Place: $10,000
    • 3rd Place: $5,000
    • Student category: We will award three prizes at $1,500 each to the top three applications submitted by students. Student submissions will compete for the larger prize amounts as well, but only one prize per entry will be awarded.
    • Up to 100 honorable mention prizes of a $25 Amazon Gift certificate will be rewarded. (Restrictions apply for international users.)

Get busy coding! The contest starts today!

Happy JavaFXing. 

Thursday Mar 19, 2009

Here's a trick to improve the start up performance of JavaFX apps.

All you need to do is one line addition to your JNLP files.

<update check="background"/>

The update element is used to indicate the preferences for how application updates should be handled by Java Web Start is not set right. The update element can contain the following optional attribute:

check attribute: The check attribute indicates the preference for when the JNLP Client should check for updates, and can have one of the three values:

  1. "always": always check for updates before launching the application.
  2. "timeout" (default): check for updates until timeout before launching the application. If the update check is not completed before the timeout, the application is launched, and the update check will continue in the background.
  3. "background": launch the application while checking for updates in the background.

option 3 will improve the JavaFX app startup time.  

Happy JavaFXing!

Friday Feb 20, 2009

The SDN Channel has posted an interview with Jacob Lehrbaum, senior Product Line Manager for JavaFX Marketing. Jacob discusses JavaFX and the recent mobile announcements with Ed Ort from SDN.

Tuesday Feb 17, 2009

The JavaFX Runtime has been downloaded over 100 Million times since launch on 12/4, making it the fastest growing RIA platform on the market. More information and discussion at Sun CEO, Jonathan Schwartz's blog

Thursday Feb 12, 2009

JavaFX 1.1 has just been released with full mobile support. Several partners have also just announced their support for JavaFX, including LG and Sony Ericsson. You can get the new version of JavaFX and read about the partners at JavaFX.com.

Wednesday Feb 11, 2009

Kaesar has launched a new blog on the world of JavaFX with Linux, including installation, basics, and more.

Nouveau Blog sur le monde merveilleux de JavaFX sur Linux, installation, bases, astuces, et plus.

Friday Feb 06, 2009

In this JavaFX article from a mobile developer perspective, Bruce Hopkins walks you through three source-code samples to demonstrate JavaFX's usefulness to Java ME developers creating apps for mobile devices. Developers can call methods on objects and instantiate objects within libraries that already exist in Java ME and Java SE -- in this case, the APIs in JSRs 82, 135, and 180. Plus, JavaFX let you bind the value of an object to another variable.

Lots of people are playing around with JavaFX now and trying out new and different things. Here are some great blogs with interesting JavaFX experiments.

Monday Feb 02, 2009

Vaibhav has just updated his blog to include webstart links for all of his samples. If you haven't seen is blog before you should go check it out. He's got lots of cool examples with full code, including Spring Motion with a real spring, 3D buttons, and a pendulum with gravity effects.

com.sun.javaws.MainScreenSnapz006.png