Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Chris Oliver's Weblog

F3, JavaFX, Programming. RSS feed

F3 Visual Tools

So far I haven't spent time trying to develop serious visual tools to support F3 development, however once the language and API's have stabilized that's definitely something I want to do.

Useful visual tools include simple color choosers, linear and radial gradient editors, widget layout editors like Matisse, vector drawing tools like Inkscape and Illustrator, and image processing tools like Photoshop.



Read more ...

 

More about F3

This was going to be a comment to a posting about F3 on Lambda the Ultimate, but got a little too big so I'm posting it here.

But I am posting this in the spirit of LtU as expressed by Ehud Lamm (the originator of LtU)

Note that from the perspective of LtU the expressiveness of the language constructs is the main thing, implementing them as efficiently as possible comes second: efficient implementation should be possible, but might still not exist in the marketplace.

Read more ...
 

Heroes

My wife thought this flash application was cool, so I spent the afternoon trying to recreate it in F3.

The F3 version isn't complete and differs in some details but seems like a reasonable approximation.



Read more ...

 

More on Quality

Sun's CEO, Jonathan Schwartz, also has a definition of quality. And as he mentions in that post, he's also a big believer in simplicity and efficiency. So am I.

He provides a dead-simple measure of quality for Sun which consists of asking a customer one question: "Would you recommend Sun?".

As a programmer I can apply the same measurement to determine the quality of my program, by asking a user of my program if he would recommend using my program to others.



Read more ...

 

Quality Software

What is Quality?

I've always recalled the following quote from E.W Dijkstra (in fact it's actually posted on the door to my office in his handwriting).

"Being a better programmer means being able to design more effective and trustworthy programs and knowing how to do that efficiently"

My interpretation: Quality means efficiency. Quality software is efficent for the user of that software. Quality programmming is efficency in developing the software. I believe both can be objectively measured.



Read more ...

 

F3 Tutorial

My colleague, Ricardo Rocha, has written an in depth explanation of one of the demos I posted earlier.

Here's his tutorial.

 

Open Source F3: Where and When?

There have been quite a few comments to my postings asking when F3 will be publicly available.

For the record, I actually inadvertently made F3 public. I was just testing out my weblog. I thought it would reside in obscurity for the time being.

Since it was noticed I've tried to provide as much information about F3 as was feasible in the context of a weblog.

I can definitely tell you where you'll find open source F3 development, namely here: https://f3.dev.java.net. This project exists, however it's still private and doesn't contain the source code yet.



Read more ...

 

F3 and HTML

Although I'm not a fan of XML, I do consider HTML+CSS the most useful tool available for composing styled text. We plan on incorporating the Flying Saucer Java XHTML renderer into F3 eventually.

One of the things I dislike about HTML is the total lack of error reporting. If you have mistakes the output just looks funny and it's a nightmare to debug.



Read more ...

 

F3 Reflection and Query operators

A friend of mine who works at MIT libraries recently showed me a neat little AJAX data visualization program they developed called Exhibit.

This seemed like a good test case for F3 reflection and for its query operators, so I decided to try to see how hard it would be to do the same kind of thing in F3.

Below is a (partial) F3 equivalent of this Exhibit example.



Read more ...

 

Poor man's Multi-VM

The most recent demos on my weblog are run as separate applications in the same JVM. In addition to its own F3 interpreter, each individual demo gets its own class loader, thread-group, and AWT event-dispatch thread. This is accomplished by using features also used in the applet plugin. Note that this approach isn't specific to F3, but could be used with any Swing application. You can manually kill the applications (which is implemented in the same way that applets are destroyed when you leave a web page). In addition, it installs a security manager that traps System.exit() and destroys

Read more ...
 

More F3 Demos

Here are a few more F3 demos.

Several are replicas of Flash programs:

  1. Bentley Continental Flying Spur
  2. Lotus Cars USA
  3. Nike 2005 Home Page

Others are replicas of Java programs written by Romain Guy:

  1. Painter
  2. Spline Editor



Read more ...

 

F3 Deployment

One of the comments to my earlier posts expressed some concern that a lot of demo code seemed to be all in one file.

That's just because they were quick demos.

F3 supports packages and imports as in Java. So you can divide your application into as many separate files as you like.

The F3 interpreter actually loads F3 classes by means of the Java class loader. So to deploy F3 code you simply archive it in JAR files as in Java and then make such archives accessible to the Java class loader.



Read more ...

 

F3 and JSR-223

F3 provides a JSR-223 (Scripting for the Java Platform) compliant interface in order to interact with F3 from Java code.

Here's a very simple example:


import javax.script.Bindings;
import javax.script.ScriptContext;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import java.util.Date;

...

    ScriptEngineManager manager = new ScriptEngineManager();
    ScriptEngine engine = manager.getEngineByExtension("f3");
    ScriptContext context = engine.getContext(); 

Read more ...
 

F3 and XML

Quite a few people have asked me why I didn't use XML markup for F3, or even whether F3 could be "translated" into XML.

Well, let me first tell you that it was intentional.

F3 is based on the idea that XML is not an effective syntax for a programming language that's supposed to be used by human programmers. Nevertheless, F3 provides the primary benefits other systems derive from XML and its supporting technologies, namely:

  • Declarative Syntax
  • Expression/Query Language with all of the power of XPath and XQuery



Read more ...

 

F3 and Swing

In addition to declarative 2D graphics, F3 also provides a declarative interface to standard Swing components and layout managers. The F3 Canvas is itself a Swing JComponent. So it's possible to both embed Swing components in a Canvas, and to embed a Canvas in other Swing components.

F3 Swing Tutorial

Here is a (non-interactive) tutorial on using Swing components in F3.

 
Syndicate content