I second the opinions of others that JavaFX is too closed which, I think,
hinders the work of library and app developers.

I wonder if the reasons that were used to make this design decision back
when JavaFX was being created still hold true. Back in the beginning there
were more developers involved in developing JavaFX, significant features
were added at a fast pace so the fact that it was closed wasn't such a big
drawback as things were changing quickly and missing features that were
spotted could be added relatively quick.

Commenting more specifically on your question... I think Skins could
benefit generally from being easier to extend. The promise of skins is that
you could easily replace a control behavior and visuals without changing
its model (the model being the part of the control that developers usually
interact with) but the problem is that the JavaFX SDK control's skins are
very difficult to extend. Say, if you only want to add a specific visual
feature (something that CSS can't do) it takes a significant effort.
What you usually see is that developers opt to create completely new
controls rather than just new skins.
My attempt at providing new skins for existing javafx sdk controls is here:
https://github.com/dukke/FXSkins
Still it required quite a bit of effort.. at least more than it could
ideally take (I think).
The advantage of this kind of approach (providing new Skins) and the
library I created "FXSkins" is that you can enhance the controls of your
existing app very easily by setting new skins in the CSS stylesheet. You
won't need to change anything directly in the code.

Regarding the current state of the JavaFX SDK Skins, there isn't a clear
MVC separation, the skin does the Controller and View part at the same
time. Perhaps ideally there would be a clear View part that could easily be
extended to add different advanced visuals to the control (by advanced I
mean, anything that can't be done with CSS). And then perhaps also the
Behavior part where you can easily change the control's functionality. I
remember at some point Richard Bair saying that it was a goal to make
Behaviors public.

Thanks!
-- 
Pedro Duque Vieira - https://www.pixelduke.com

Reply via email to