In light of the reflection performance hit, the approach dagger 2 has taken
with DI may be pretty interesting.
http://www.youtube.com/watch?v=oK_XtfXPkqw
On 24-11-2014 16:19, Manfred Karrer wrote:
I have a longtime backgroud in Flash and Flex development and a bit if iOS, so
I would like to add here my 5 cents.
My first impression and experience with Scene Builder was kind of: Is this meant serious? It cannot be that Oracle release such a product in year 2014 when other platform had shipped well working UI - WYSIWYG editors more then 10 years ago. Sorry I don't want to be rude, but that was my first reaction.
Beside that it is (at least on mac) pretty buggy and not 2 way compatible (if
you continue to edit in FXML you soon get to the point where you cannot open it
in Scenebuilder anymore because it does not support all what the compiler
supports). That leads either to a very cautious and restrictive usage of FXML
or that you use it just initially for the first UI prototype and then later
don't use it anymore and have the annoying workflow to compile and run the app
to see visual changes.
I know that a really well working WYSIWIG editor is a challenge, and so far the
only 2 which really worked well from my experience was the Flash IDE (I did not
use later versions anymore so no idea how it is today) and Xcode. The Flex
editor had more or less the same problems like Scene Builder (in the teams I
worked it was considered as a toy).
One general problem is as soon you have 2 development paths (visual and xml) it
tends that one gets lost behind from proper support of the vendor.
Xcode and early Flash IDE made the radical decision to have only an visual
editor, the workflow does not involve xml editing when you reach the limits of
the editor. That forced the visual editors that they need to make it all
possible, which worked for both platforms pretty well. Of course the Flash IDE
was too limited on the coding side and had another direction, but XCode
combined both worlds in a pretty good way.
I am not expecting to have support for animations. Thats another hard challenge
and I am not sure if that should not be left out to some external tools.
I just would be happy to have an visual editor that really represents correctly
what i will see when its compiled and which sticks in sync when the UI gets
more complex and integrated with the projects code base (here Scene Builder
lacks a lot!).
But beside that, another disappointment for me was (coming from Flex) that it is pretty slow (for a such a fast runtime like Java). It feels for me same slow like Flex was, but the Flash runtime used by Flex is a much, much slower then Java, so how can it be that a Java based UI framework is not min. 10 times faster?
Flex used code generation so all was compiled, otherwise it would have been
completely unusable (slow).
JavaFX use reflection and interprets FXML at runtime which introduces 2
performance penalties:
- The runtime loading (takes 50-200 ms depending on the size of the FXML)
- The parsing and reflection based interpretation which takes another 50-200 ms
(not so sure about that, as in that time the inclusion in the scene graph is
included as well, but if the layout or rendering is so slow, then that is
another question why).
Every delay larger then 50 ms is very clear visible to the user, resulting in
an UI which just does not feel snappy.
In my current app I use caching to avoid at least the slow loading (after the
initial load). I will probably convert all FXML when the UI is final to java
code to get rid of the second performance penalty. But that of course is not a
satisfying situation!
Hopefully some code generation projects gets mature enough to be really useful
in complex UIs or Oracle take JavaFX serious enough to put more effort on that.
Conclusion:
You can see in the UI how well the tools have supported the work process.
If its a pain and a lot of work to get simple stuff done the UI looks like that.
Flash was very good on that already back in 2002, you could create stunning
animations, effects, designs without pain, it was fun to work on that.
XCode is pretty good on that as well, Apple has a long tradition to take the
visual aspect and the usability very important. And you can see that.
Sorry again for the pretty critical and negative feedback. Actually I love to
work with JavaFX, it just feels it could do much better, specially as we are in
2014 (Flex become mature around 2006).
Kudos to all who are working hard on the platform. I am totally aware those are
not easy tasks and limited resources produce restrictions...
br,
Manfred Karrer
Am 24.11.2014 um 13:37 schrieb Tom Eugelink <t...@tbee.org>:
Oh, you are right, if the JavaFX team does not need to make choices on where to invest their
precious time, then all possible usages could be implemented immediately. Unfortunately they too
have to place priorities and then the most likely usage will get implemented first (since most
usages already have some existing platform, "alternative" or "replacement" for
an that platform comes to mind).
Apparently it is not animations, personally I'm still hoping 3rd party controls
support in SceneBuilder will get higher on the list, but I'm not getting my
hopes up. But as Mike pointed out; it is a missing functionality, go build it!
;-)
Tom
On 24-11-2014 13:18, Felix Bembrick wrote:
JavaFX should not be seen as a "replacement" for anything or an "alternative".
It has characteristics of both Flash and Flex along with Silverlight and especially Qt, (not to
mention even HTML5/CSS/JS), but is a separate and distinct product in its own class.
Just because the Flash visual editor may have "got in the way" of your desire
to code directly, that doesn't mean that JavaFX should not have such an editor for all
the same reasons and use cases that Flash had one.
Sure, for *your* purposes of "decorative effects", I am confident that coding
would suffice but for *my* purposes (and anyone who has worked in the animation industry
or worked creating visualisations) I really need a visual editor of the ilk I have
described.
Why just make one class of user happy but seriously limit the effectiveness of
another (and in doing so possibly significantly limit the market of JavaFX)?
I am sure at least one of the developers on the JavaFX team has at one point at
least envisaged JavaFX being used for complex animations, visualisations or
even non-trivial games. What they need to do now is make such use cases
feasible.
On 24 November 2014 at 22:04, Tom Eugelink <t...@tbee.org
<mailto:t...@tbee.org>> wrote:
I have no problems using JavaFX's animations for my purposes, which are
decorative effects. I do not need an editor for that, forced me to use it and
it probably will even get in my way. Which BTW was the case with the Flash
coding that I have done; I hated that Flash EDI, it was way too much focussed
on animation. Actually that is why Adobe created Flex, which basically was
flash-for-developers (instead of animators). JavaFX is more a alternative for
Flex than Flash.
Tom
On 24-11-2014 11:20, Felix Bembrick wrote:
Really? My point is, why have such good built-on classes to support the
building of everything from simple animations to complex visualisations if it
is practically impossible to do so?
On 24 November 2014 at 21:02, Tom Eugelink <t...@tbee.org
<mailto:t...@tbee.org>> wrote:
I do not think that JavaFX is aiming at replacing flash, HTML and
javascript are doing a great job there, hence animations are not equally
important as they were for flash.
Tom
On 24-11-2014 10:46, Felix Bembrick wrote:
I am surprised more people have not expressed an opinion on this.
To me,
it seems absolutely *vital* to the long term (or any term) success
of
JavaFX.
Haven't any of you ever programmed in Flash? Can you imagine
trying to
create any of those complex (or even the simple) animations and
visualisations *without* a visual editor and by doing it code
alone? It
wouldn't have been practical (read possible) and similarly, and
with JavaFX
having even richer features, to do this "by hand".
To me, this is the reason why we haven't seen any great
animations/visualisations/applications using JavaFX and we probably
never
will until a visual animation editor is available. Specifying and
controlling the motion and appearance of numerous complex objects
and their
transitions relying exclusively on code would not be possible for
even the
"gunnest" JFX coder...
On 18 November 2014 at 02:48, Richard Bair <richard.b...@oracle.com
<mailto:richard.b...@oracle.com>> wrote:
I’m afraid at this time there are no plans for adding an
animation/transition effect editor to Scene Builder, certainly
not in the
short-term.
Thanks
Richard
On Nov 13, 2014, at 7:34 PM, Felix Bembrick
<felix.bembr...@gmail.com <mailto:felix.bembr...@gmail.com>>
wrote:
Java applets were the first "programs" to run inside a web
browser and
for
a (little) while they were flavour of the month.
But then along came Flash which had several advantages such
as faster
load
times, consistent loads and antialiased fonts/graphics and
soon
completely
surpassed applets.
But the MAIN reason why Flash was initially so successful
and went on for
years and years of domination is that the Flash tools had an
Animation/Timeline Editor pretty much from the beginning.
This enabled
even a novice to drag images around and draw the path they
wanted them to
move along, add all sorts of bouncing effects and sounds
and the result
was
the birth of the online greeting card company.
But Flash soon went on to be so much more. As the Adobe
tools improved,
so
did the SWFs and soon entire websites were written in Flash.
Meanwhile, applet programmers had absolutely nothing
remotely similar and
had to try (and I stress try) to tediously hand code any
animations and
transitions and effects and I don't think it ever worked.
Fast forward 15-20 years and now we have JavaFX which
doesn't need to run
in the browser, has even more features than Flash, uses
hardware
acceleration for superior performance, has a wide range of
built-in
animations, transitions and effects but STILL we have to
hand code any
animation/transitions.
This is INCREDIBLY inefficient and unless Scene Builder
incorporates a
powerful, sophisticated animation/transition and effect
editor VERY, VERY
SOON I fear that the advanced graphics features are never
going to be
used
to their full potential (much to the detriment of JavaFX
itself).
Does anyone know if one is in the pipeline? I see this as
one of the
most
vital features for the JavaFX ecosystem to achieve more
penetration and,
eventually, survive.
Felix