[REVIEW] Make controller instantiation customizable

Tom Schindl tom.schindl at bestsolution.at
Wed Dec 14 06:40:23 PST 2011


In the other reply I concentrated on runtime this reply talks about
design time

Am 14.12.11 15:16, schrieb Greg Brown:
> This seems pretty complex to me. Again, the design philosophy we have tried to apply here is "making simple things easy and difficult things possible". You can do quite a few "difficult" things with a custom class loader and the proposed ControllerFactory interface. For example, if an include needs a different class loader from its parent, your custom class loader can handle that by composition.

When looking from a Tooling implementor on this allowing me to intercept
FXMLLoader makes it a lot easier for me e.g. support a live preview of
an FXML-File which e.g. uses includes because I don't have to build up a
classpath before.

Same is true for e.g. Controller creation, event binding, ... who
currently require me to build up a complete classpath because FXMLLoader
is so greedy creating bindings, ... which makes sense at runtime but not
at design time. The trick to get around some of those restrictions is
that I preprocess the file before passing it to FXMLLoader.


B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
tom schindl                 geschäftsführer/CEO
eduard-bodem-gasse 5-7/1   A-6020 innsbruck     fax      ++43 512 935833
http://www.BestSolution.at                      phone    ++43 512 935834

More information about the openjfx-dev mailing list