Proposal: Deprecate Builders
milan.kubec at oracle.com
Wed Apr 3 01:16:47 PDT 2013
I did simple analysis of Builder deprecation impact on FXML, it's
sumarized in JIRA issue: https://javafx-jira.kenai.com/browse/RT-29409
Dne 26.3.2013 15:19, Milan Kubec napsal(a):
> I've inherited FXML codebase from Greg Brown, unfortunatelly I haven't
> inherited the history of design decision process and Greg's experience
> with declarative UI languages. FXML uses some builders from JavaFX API,
> but only those that cannot be substituted by other means of creating
> scene graph nodes, i.e. default constructor, valueOf(), fx:factory, etc.
> There are also some builders implemented even in FXML package itself for
> special cases (i.e. ImageBuilder).
> I will do deeper analysis of what would deprecation of Builders mean to
> FXML and post it to the mailing list.
> Dne 25.3.2013 21:53, Richard Bair napsal(a):
>> Aren't you on vacation too?? :-)
>>> I think there are a few things in standard FXML that are fairly dependent on Builders. I cant remember exactly and its hard for me to look up currently (there's no way to browse the OpenJFX source online is there?) but from memory often when I tried to port between FXML and code there were magic methods not available in the code so I assumed builders were the source.
>> I know there is some stuff in SceneBuilder (where it tries to determine the default value of a constructor parameter I think), I'm not sure how much of it leaks into FXML. I *think* they are separable for the core libraries but I'm not totally sure.
>>> e.g. can you create a colour in FXML directly, fonts, images? Stuff like that. I suspect at a minimum some of the tutorials will need updating to not use convenience builder methods.
>> These things end up using the "valueOf" methods that were added to the various classes IIRC
>>> Also, Im again guessing but for FXML to optionally use builders doesn't it need to have a dependency on the builder class? I suppose it could all be reflection based, avoiding the compíler dependency, but it would still be quite weird for the core JFX code to be looking for a class that is now effectively third party.
>> I think the Builder class itself would stay, but the various builders that we built would be deprecated.
>>> Who inherited FXML after Greg?
>> Milan Kubec!
>>> Dont get me wrong, Im in the "strip them out camp", but just making sure all the consequences are thought through. Probably any such problems can be fixed but only if done in advance.
More information about the openjfx-dev