Making JavaFX Development Faster
Richard Bair
richard.bair at oracle.com
Fri Oct 26 06:46:59 PDT 2012
> On 22.10.2012 17:38, Richard Bair wrote:
>> MyObject obj = new MyObject();
>> obj = BlackMagic.makeObservable(obj);
>
> I'd like to see the implementation of BlackMagic ;-) (cglib stuff?)
I'm thinking basic byte code rewriting. I can't remember the name of the project off the top of my head, but I think it is an apache project. Somebody help me out :-)
>> However, the javafx beans package and collections and such are part
>> of the "base" module -- ie: they could be separated from the rest of
>> javafx and safely used on the server side or elsewhere. Why not just
>> use properties and such on the server side definition of classes? Or
>> are those classes being auto-generated and thus not taking observable
>> properties into account?
>
> Currently I want to avoid requiring customers to install the FX runtime serverside. That will be a moot point with JRE 7+. Which does not help the 6.x customers, especially if they are on WebLogic which is usually tied to a specific major version.
>
> Another aspect is the footprint regarding memory and bandwidth. Obviously a StringProperty requires more bytes than a String. This is not an issue (usually) when I want to display a relatively short list of beans in the UI. It gets noticeable when the server suddenly needs +X megabytes, the instantion of objects needs +Y ms (also affects deserialization), and sending them over the network takes +Z ms...
If only we had properties in the language!! Goetz, I'm looking at you :-)
There are some other options in how you define your properties though. For example, the property object can be created lazily, such that on the server side you don't ever instantiate it. Having properties in the language makes it so that it can do this sort of optimization for free, whereas you'd have to write the boilerplate (or use black magic).
Richard
More information about the openjfx-dev
mailing list