F3: Sun’s new declarative Java scripting language

Written by admin on November 10th, 2006 in Ajax News.

Chris Oliver, now at Sun via SeeBeyond, has posted about a new declarative Java scripting framework that Sun will be open sourcing shortly.

My project is called F3 which stands for “Form follows function”, and its purpose was to explore making GUI programming easier in general.

F3 is actually a declarative Java scripting language with static typing for good IDE support and compile-time error reporting (unlike JavaScript…), type-inference, declarative syntax, and automatic data-binding with full support for 2d graphics and standard Swing components as well as declarative animation. You can also import java classes, create new Java objects, call their methods, and implement Java interfaces.

We have IDE plugins for both Netbeans and Eclipse Both plugins support as-you-type validation, code-completion, syntax highlighting, and hyperlink navigation (with control-mouse-over).

F3 attempts to demonstrate that we’re not exploiting the full capabilities of the Java platform for GUI development and that together with supporting tools like F3, the Java platform is highly competitive with or superior to competing GUI development platforms such as Macromedia Flash/Flex/Open Laszlo, Adobe Apollo, Microsoft WPF/XAML, Mozilla XUL, AJAX/DHMTL.

Example

import f3.ui.*;
import f3.ui.canvas.*;
import f3.ui.filter.*;Canvas {
content: Text {
x: 20
y: 20
content: “Welcome to F3″
font: Font { face: VERDANA, style: [ITALIC, BOLD], size: 80 }
fill: LinearGradient {
x1: 0, y1: 0, x2: 0, y2: 1
stops:
[Stop {
offset: 0
color: blue
},
Stop {
offset: 0.5
color: dodgerblue
},
Stop {
offset: 1
color: blue
}]
}
filter: [Glow {amount: 0.1}, Noise {monochrome: true, distribution: 0}]
}
}

would produce:

And then a demo of a flash port that took a couple of days:

I think that we all feel that GUI work could be easier than Swing currently is. I wonder if a new language that is a hybrid of Java and JavaScript makes sense, or if they could use the latest ECMAScript?

Source: Ajaxian
Original Article: http://ajaxian.com/archives/f3-suns-new-declarative-java-scripting-language

Leave a Reply

You must be logged in to post a comment.



Site Navigation