09 June 2009

Exploring JavaFX: creating charts for pubmed

The JavaFX SDK, a scripting language for Java, is now available for Linux. The API is said to be a new and simplier way to write a graphical interface and it have some nice data bindings to create an immediate and direct relationship between two variables. But it comes after Flash, Air, SVG , Processing, so isn't it already too late for this new language ?
However, JavaFX contains a chart API and I've generated some JavaFX code from XML/Pubmed and the following XSL stylesheet:
.
I worked with the following pubmed query: ontology[ti] “Database Management Systems”[mesh].
The XML Document was transformed into a JavaFX code with XSLT
xsltproc pubmed2fx01.xsl pubmed_result.txt > code.fx

The source code was then compiled to a java class with the javafx compiler:
javafxc code.fx

And the java code was executed with javafx:
javafx code

The exectuable creates to charts:




That's it.
Pierre

2 comments:

  1. So Pierre, what is your opinion? Do you think that JavaFX is coming too late?

    ReplyDelete
  2. Well I don't know... :-) I would answer if I had a good knowledge of all those alternate solutions. However, I didn't like this feeling of re-learning something I know, but with a complete different syntax....

    ReplyDelete