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

Tom Schindl tom.schindl at bestsolution.at
Mon Dec 12 11:46:14 PST 2011


Am 12.12.11 20:39, schrieb Richard Bair:
> 
>>> 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

You are right but to seperate the controller from the view this is most
important one.

I'm having a hard time making up in my mind how you would envision your
passive dynamic view interface to work. Could you show us/me some pseudo
code?

Tom

-- 
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