Relation between fxgraph and fxml


I just saw some people coming to my blog from an article published on The Register where the author referenced e(fx)clipse.

The author there talks about FXGraph and that it limits the appeal of e(fx)clipse which is think is not correct because nobody is forced to use the DSL I’ve been working on (use what ever you want – Java, GrooveFX, ScalaFX, …). It’s true that I currently don’t provide good tooling support for FXML but I plan to work on an FXML tooling so that people who want to directly edit them get decent support for it.

I think an important fact when it comes to FXGraph is that the DSL is not translated into Java or JavaByte code but into FXML so you can think of FXGraph-Files as a nicer textual representation of the FXML files content. The advantage of spitting out FXML are in my opinion:

  • No lock in – you are not forced to work with FXGraph for ever because the generated FXML-File should be supported by e.g. Netbeans, IDEA, … you can switch to another IDE and continue with the work there
  • Tool exchange – My opinion is that FXML is designed as an interchange format between different tools and not really designed to be authored directly so all upcoming tools (e.g. Scene Builder) will use it as interchange format
  • No runtime layer – FXGraph-Files get translated automatically in FXML while coding and so you don’t need an extra library to make things work

Here’s a small diagram how I think FXML is designed to be used:

What’s missing at the moment is an FXML to FXGraph translator but this is something not really hard to implement so it’s already on my TODO-List for 0.0.10.

About these ads

6 Responses to “Relation between fxgraph and fxml”

  1. >> My opinion is that FXML is designed as an interchange format between different tools and not really designed to be authored directly …

    With the exception of in-line text links, I find that I’m able to produce virtually anything my mind conceives with FXML and CSS – without tooling. Coming from OpenLaszlo, FXML is a godsend and I plan to continue editing FXML files – directly – even when the best tooling is available.

    • I plan to ship an initial support for FXML-Editing in 0.0.10, combined with a bidirectional FXGraph FXML conversion this allows you to switch from on to the other without any problem.

  2. What about direct FXML support for your preview component? I’d like the idea that I could use the preview with FXML directly. This would probably require some kind of side car file to provide the extra information needed by the previewer.

    • I don’t think I need such an extra file – is that what namespaces are good for? I need test a bit. The first thing I need is a parser that makes up an in memory model of the file similar to what xtext does for the DSL (in fact my local git-repo already has a start of such a parser). Out of this memory model I can:

      • Provide an editor with autocompletion, refactor support, …
      • Provide an fxgraph-fxml converter
  3. Hello Tom,

    I’m using your release of e(fx)clipse version 0.0.8. Nice work you’ve done on this plugin. I’m going to use your plugin to make some javafx demo.
    I check out your git source and trying with the examples in your testcases.
    But I found that in MessageTest.fxgraph

    component CssTest styledwith [“test.css”] resourcefile “/translations/messages.properties”

    The Eclipse IDE show error icon at keyword “styledwith” with message: “Could not resolve reference to JvmType ‘stylewith'”. Also, the same error message for keyword “resourcefile” and “rstring”.

    Could you show me how to fix these errors or any workaround might have. Thanks in advance.

    • Thanks for testing. The test cases in the example are already running on the new codebase (there are some incompatible changes and new features). I plan to do a release 0.0.9 today in the afternoon so if you wait for tomorrow you’ll see all those examples working. I hope this helps to clarify the situation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 743 other followers

%d bloggers like this: