[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: JavaFX dependency injection
From:       Brian Harris <brianfromoregon () gmail ! com>
Date:       2015-11-24 21:30:00
Message-ID: CAFtUM9Zu7T9R5+ezBSen1R09B80eD0VtEzS5nnJHk6F_z3XDfA () mail ! gmail ! com
[Download RAW message or body]

Thanks Tom. Oracle fx team would be nice to hear your guidance as well.

On Mon, Nov 23, 2015 at 12:38 AM, Tom Schindl <tom.schindl@bestsolution.at>
wrote:

> JavaFX is a UI-Toolkit and not an UI-Framework, JavaFX provides all the
> hooks needed to integrate with whatever DI-Container (Sping, Guice, ...)
> you want it to run on.
>
> I would go for 1. as the general recommendation and there are frameworks
> out there who do exactly this type of thing.
>
> Tom
>
> On 21.11.15 22:59, Nitin Malik wrote:
> > This was asked recently (
> >
> http://mail.openjdk.java.net/pipermail/openjfx-dev/2015-October/018080.html
> )
> > but I didnt see this addressed.
> >
> > Are there plans to have better integration with DI frameworks for views
> and
> > controllers?
> >
> > For example, we have scenarios where multiple instances of the same view
> > and controllers need to instantiated with different values. This is a
> > frequent question that pops up on Stackoverflow and there apparently is
> no
> > standard answer. It would help if suggested recipes and guidelines are
> made
> > available.
> >
> > The solutions we have adopted -
> > 1. Use a controller factory to lookup Spring bean (this isnt ideal
> because
> > the factory needs to be aware of the bean name).
> > 1a. For singleton controllers, the lookup can be done via class name.
> > 2. Use a controller factory that holds a reference to a controller that
> was
> > constructed in code with the various parameters.
> > 3. An Afterburner-like framework that scans controller for an annotation
> > and injects the values.
> >
> > Regards,
> > Nitin
> >
>
>
> --
> Thomas Schindl, CTO
> BestSolution.at EDV Systemhaus GmbH
> Eduard-Bodem-Gasse 5-7, A-6020 Innsbruck
> http://www.bestsolution.at/
> Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic