GraphicsContext and export to vector format files

Pedro Duque Vieira pedro.duquevieira at gmail.com
Tue Nov 3 12:40:22 UTC 2020


One thing I've always felt is a downfall of JavaFX is that it's too closed
for extension. Don't get me wrong I love JavaFX and a lot of stuff you guys
did but nothing is perfect and there is always room for improvement.
This lack of extensibility ends up hurting third parties' ability to extend
JavaFX functionality with new libraries, at least in some areas (like the
one Bruce is mentioning).
This is in contrast to Swing where more extension points were possible
(there were less final classes/methods, private methods, etc).

I understand that the main driver was to be more conservative and not allow
scenarios that weren't well thought through. However, I believe this ends
up having more cons than pros and maybe a slightly less conservative
approach would be preferable.

I agree with the 2 proposed solutions that Bruce brought forward. And as a
general rule, I would prefer JavaFX would allow for more extension points
on other areas, either by not having as many private/final methods, etc, or
by adding interfaces which would then allow for composing classes. Which
would probably be preferred.
By adding interfaces (and JavaFX making use of these interfaces, instead of
concrete classes), a conservative approach would still be possible. I.e.
concrete implementations would still be able to have private, final
fields/methods, etc but developers would now have the possibility of doing
composition to extend JavaFX's behavior.

My 2 cents,

Cheers,


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


More information about the openjfx-dev mailing list