Archives for posts tagged ‘ria’

Browsers will Rule Mobile Devices

Five years ago, when prototyping some apps for PDAs, I’d never consider HTML + javascript. This is because there are enough form factor issues as well as browser incompatibilities to keep one awake all night.
Things have changed.
WebKit seems to have gained ground in the mobile space, giving compatibility a much needed shot in the [...]

A concrete proposal for inlining JavaFX

Jan Erik calls me the “high IQ” type. Unfortunately, I think he means “impractical” and “living in an invory tower”.
The idea of a inlining JavaFX script is actually a smaller and incremental goal. It is practical and is achievable. It will allow people who don’t have the JavaFX SDK to experiment with the technology, within [...]

JavaFX and Disembodied Reality

Jan Erik opined insightfully about JavaFX’s prospect:
Java.net is disconnected with reality. For every guy who knows Swing/Java there are a 1000 guys who know HTML/DOM/CSS/Javascript. Silverlight is only marginally important because Microsoft controls 90 percent of the desktop marked and is the company behind C#.
JavaFX will ride the JRE in the same way AIR is [...]

JavaFX Coverflow Part 2

Continuing with our previous example, we now create a CustomNode Coverflows, which contain 11 covers.
A new function called positiveOrZero is introduced so that the tilt angle can be negative.
A fill attribute is introduced to the Cover class and it is bound to the Rectangle.

/**
* Coverflow.fx
**/
package coverflow;

import javafx.application.*;
import javafx.animation.*;
import javafx.input.*;
import javafx.scene.geometry.*;
import javafx.scene.*;
import javafx.scene.paint.*;
import [...]

JavaFX and Unicode source files

The JavaFX compiler supports unicode source files, just as Java compiler does. To use them you need to

make sure the source does not include the three-byte byte-order-mark
call javafxc with the -encoding parameter

javafxc -encoding UTF-8 Chinese.fx
javafx Chinese

And now for the example

import javafx.application.*;
import javafx.scene.Font;
import javafx.scene.text.Text;
import javafx.scene.paint.Color;

Frame {
title: "JavaFX Unicode Example"
width: 400 height: 300
stage: [...]

JavaFX Coverflow Part 1

Warning: Apple Inc apparently has a patent on this. I’m merely doing this for performance comparison purposes and for self-education only.
It’s been about 2 weeks since my first JavaFX session. My initial distaste for the YAML syntax is largely gone. I have avoided using Netbeans, as vim is sufficient. The absence of closing tags in [...]

Why JavaFX should be inlineable with HTML

I was disappointed when I found out JavaFX interpreter is not shipping in the final Java runtime. Shipping the interpreter is key to inlining script with HTML, and will accelerate adoption of this shiny cross-browser platform.

There are tens of millions of web developers who have already been trained to edit text in a file and [...]

Chaining JavaFX effects

Unfortunately, it appears that the only way to chain JavaFX effects together is by using a Group control. (There is a Effect(input1, input2) constructor, but I can’t seem to access it from JavaFX Script, while the Blend effect doesn’t chain effects, but instead applies them in parallel).
To achieve a Coverflow-like look, we apply a reflection [...]

JavaFX Questions

Sun has released a JavaFX preview. Having played around with it, here are my questions:

Will using the scenegraph api consume less resources than a comparable app developed using DHTML? In Meebo is what’s wrong with the web (cached), Uncov writes that Meebo consumes 39Mb RAM over-and-above that of Firefox. Running a basic JavaFX app (JRE1.6u7) consumes [...]

JavaFX API documentation

Since JavaFX is still under active development, the JavaFX API docs could do with some serious link-love. Currently, version 0.2 of JavaFX docs ranks in Google.

JavaFX Type Casting

I have been playing a little bit more with JavaFX. Unfortunately the language reference isn’t particularly complete, and it turns out that type casting in JavaFX is via the as keyword. (Thanks Andres Almiray for the tip!)
For example,

var myWidth = (e.node as Rectangle).width

Incidentally, the performance of the drop shadow effect leaves much to be [...]

JavaFX for Experienced Programmers

What JavaFX is not
JavaFX is not Java. It is a brand new language that builds on top of the JVM and the runtime libraries.  There is a new syntax, and a lot of new syntactic sugar aimed that reducing the quantity of code needed to

create and animate user interfaces
update user interfaces as model data changes
update [...]