Could FXML use an interface and dynamic proxy for the passive view interface?

Richard Bair richard.bair at oracle.com
Mon Dec 12 11:39:03 PST 2011


>> Which got me thinking. Can't we have FXMLLoader use dynamic proxies to allow the FXML file to refer to a passive view interface rather than a concrete controller implementation? That at least would allow for the "Passive View" design pattern to apply extremely cleanly. It still would mean, from the developer's perspective, 2 classes instead of 1 (an interface for the view and a controller which talks to that interface). I would have to think through this a little more (I guess the controller is still required, so that the FXML document has something to call for event handlers and such, but that the controller would only talk to the view via this Passive View interface rather than by grabbing nodes and binding things directly??)
>> 
> 
> See RT-17268 did I get you wrong?

I think this covers the ControllerFactory -- ie delegate controller construction to the developer -- but is separate from dynamically generating an implementation of a Passive View interface.

Cheers
Richard


More information about the openjfx-dev mailing list