« Want to Take a Deep Dive into some JavaFX Script UI Widgets? | Main | Your Second JavaFX Script Program - The Wonders of Binding to a Model »

October 28, 2007

Spotting JavaFX Apps in the Wild - A Freebase Browser

Occasionally I'll showcase a JavaFX Script app in this blog that I've found on the net.  This one is an app that I'm developing to serve as a browser for the Freebase database.  Freebase is a structured data approach similar to the Wikipedia concept, where the public contributes facts into a database (see freebase.com).

As
Doctor Emmett Brown said in the movie Back to the Future, "please excuse the crudity of this model, I didn't have time to build it to scale or to paint it".  In other words, this app is still under development, but it's functional.  I'll be the first to admit that I'm graphically challenged, so it's not "pretty" (I'll showcase some apps with cool graphics in future posts, and you'll know that I didn't create them). Anyway, here's the Java Web Start (jnlp) link.  You'll need JRE 1.5 or later to run JavaFX Script applications.

Freebase_browser_2

When you start the Freebase Browser, the Freebase ID for the band U2 is preloaded into the Freebase Object ID text field.  Click the Go button (or just press Enter because it's the default button).  You can then click and expand items in the tree in the left pane, or click links in the right pane, navigating to related topics.  In the upper left hand corner are Back and Forward buttons, similar to a browser. In addition to clicking links, you can type Freebase object IDs in the text field (e.g. /topic/en/james_gosling or /topic/en/star_wars) and click Go.

If you're interested in the application architecture, here's a high level diagram that shows how the UI, application layer, and data layers are related.  JavaFX Script very naturally implements the model-view-controller pattern.

Freebasebrowser_diagram_3

By the way, the JavaFX InfiniteProgressPanel that you'll see when clicking links is part of the JavaFX UI library, and was originated by Romain Guy, the coauthor of the book Filthy Rich Clients.

Enjoy,
James L. (Jim) Weaver
JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e54f133d69883400e54f009e7b8833

Listed below are links to weblogs that reference Spotting JavaFX Apps in the Wild - A Freebase Browser:

Comments

Can you help me any code example about use trigger? Because new version of javafx do not support as old version. Why ask "trigger as setter/getter in java bean"?
Thank

hi james weaver what is the difference between custom node and custum swing component...

Sarah,

To see my attempt at answering your question, see the blog post at:
http://learnjavafx.typepad.com/weblog/2009/03/answering-reader-mail-about-the-javafx-reflection-api.html

Thanks,
Jim Weaver

Hi again,

you said "Also, JavaFX has reflection."
sorry,but i didn't understand very well..can u make it a little bit more clear ?
besides is there something similar to "Class.forName(str).getInstance();" but in JavaFX ? and who can also handel the properties like for example in the case of a SwingButton(text,action..)

Thanks


"in the example of freebase browser,the data is dynamically supported by a server(XML,JSON,Http..)but the components of the browser are static,can't i have some dynamic generation of the component it self in a such aplication ?
i mean,i click on a button,so i will have a "generation" of a textfield for example(a query will be sent to the server calling for example for a "textfield",and i suppose that in the server there is a class components implemented ) and i will have in my desktop application a textfield that appears .
Is javafx support such a dynamic generation?"

Sarah,

Yes, that capability is available. The Scene in a JavaFX program contains a sequence of nodes (e.g. text fields, rectangles, images). You can dynamically add to this sequence. Also, JavaFX has reflection.

Thanks,
Jim Weaver

Hello ,

in the example of freebase browser,the data is dynamically supported by a server(XML,JSON,Http..)but the components of the browser are static,can't i have some dynamic generation of the component it self in a such aplication ?
i mean,i click on a button,so i will have a "generation" of a textfield for example(a query will be sent to the server calling for example for a "textfield",and i suppose that in the server there is a class components implemented ) and i will have in my desktop application a textfield that appears .
Is javafx support such a dynamic generation ?
thanks in advance

I spotted this nice example of javafx with jdbc

http://java.dzone.com/tips/javafx-and-jdbc

"I have a doubt over the javaFx.That is by the javaFx scripting we can create Applets.Can we use it in the webdevelopment means how i can use the javaFx in my front -end..."

jayavardhan,

I think that JavaFX will work very nicely as the client in an enterprise application. I usually use Java Web Start to deploy the client, and there are HTTP, JSON and XML related classes in the JavaFX SDK 1.0 for communicating in JavaFX with servers. You can also instantiate and use any Java class with JavaFX, so virtually any client/server protocol (e.g. RMI) is supported.

Thanks,
Jim Weaver

Hi james..
I have a doubt over the javaFx.That is by the javaFx scripting we can create Applets.Can we use it in the webdevelopment means how i can use the javaFx in my front -end...

thanks..

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

My Photo

Upcoming Speaking Engagements:


  • Stephen Chin and Jim Weaver speaking about JavaFX Platform

  • Speaking on JavaFX and Java at Øredev in Malmö, Sweden on 2-6 November, 2009

Upcoming JavaFX Training:


  • Developing Secure, Rich Internet Applications Hosted on a Variety of Clients Using JavaFX Technology

Enter your email address:

Delivered by FeedBurner

Available now as early access eBook


  • Click book image above to obtain eBook

Twitter Updates

    follow me on Twitter

    Affiliations:

    DZone Links:


    July 2009

    Sun Mon Tue Wed Thu Fri Sat
          1 2 3 4
    5 6 7 8 9 10 11
    12 13 14 15 16 17 18
    19 20 21 22 23 24 25
    26 27 28 29 30 31  

    Disclaimer:

    • By reading this site, you are agreeing that under no circumstances will Veriana Networks, Inc. or its affiliates be responsible for (1) any information contained on or omitted from the site, (2) any person's reliance on any such information, whether or not the information is correct, current or complete, (3) the consequences of any action you or any other person takes or fails to take, whether or not based on information provided by or as a result of the use of the sites.