I've been using fx-guice for about 6 months now and find it very useful. 
 It has even been enhanced to support mocking of the loader for unit 
testing code that depends on FXML without having to load the views.  I'd 
recommend it.

On Friday, April 19, 2013 5:02:57 AM UTC-4, Benjamin P. Jung wrote:
>
> Hi Arthur,
>
> I am the author of "fx-guice" which should make it really easy to use 
> Google Guice in your JavaFX applications.
> The framework itself is licensed using the Apache License v2 and the 
> sources can be downloaded from Github:
> https://github.com/cathive/fx-guice
>
> I also published the artifact to the Sonatype OSS Maven repository, so it 
> should be really easy to fetch pre-built JARs (especially if you are using 
> a Maven-based build system).
>
> The Wiki page of the project hosts a bunch of examples (even though I feel 
> that the code is self-explanatory... but... hey! I AM the author! ;-))
> The sources itself also come with an "examples" folder that contains a 
> bunch of code snippets to get you started.
>
> The main idea of my framework:
>
> (1)
> Extend "com.cathive.fx.guice.GuiceApplication" instead of 
> "javax.application.Application".
>
> (2)
> You will then have perform your Guice module initialization in your app's 
> #init(List<Module>) method.
>
> (3)
> Instead of the basic FXMLLoader you'll have to use @injected instances of 
> the GuiceFXMLLoader class.
> Then you can use @FXML and @Inject annotations together in your 
> FXMLController classes.
>
> (4)
> The framework offers a bunch of other nice stuff, such as the 
> @FxApplicationThread annotations that
> ensures execution of your methods on JavaFX's event dispatch thread via 
> method interceptors and
> evil AOP magic.
>
>
> Benjamin
>
>
> On Tuesday, February 26, 2013 12:42:58 PM UTC+1, Arthur Gregório wrote:
>>
>> need to develop a desktop application but did not want to use swing ... 
>> Following the classical model'll need a persistence layer (JPA), services 
>> and controllers ..
>>
>> in both links would be an example of such integration but do not know how 
>> it would look on an application with more layers wondered if someone 
>> already implemented something more complex or just know if there is 
>> something to help (plugin) this process ...
>>
>>
>> http://andrewtill.blogspot.com.br/2012/07/creating-javafx-controllers-using-guice.html
>>
>> http://fxexperience.com/2011/10/fxml-guice/
>>
>> *Arthur P. Gregório*
>> *+55 45 9958-0302*
>> @gregorioarthur
>> www.arthurgregorio.eti.br
>>
>>
>> 2013/2/26 Stephan Classen <[email protected]>
>>
>>>  I just started using JavaFX last week and have not yet combined it with 
>>> guice.
>>> But as far as I can tell most of the JavaFX classes have a default 
>>> constructor and should therefore be easely injectable.
>>>
>>> What exactly are you trying to inject and do you plan on using a mocking 
>>> framework to inject mocks for tests?
>>>
>>>
>>>
>>>
>>> On 02/26/2013 12:58 AM, Arthur Gregório wrote:
>>>  
>>>  hi!
>>>
>>>  Someone can tell me if there is any implementation or some guice 
>>> plugin to use it with java fx?
>>>  
>>>  i've seen a couple of "tests" in some blogs but the publish date of 
>>> the post is so old (before january 2012)..
>>>
>>>  is there anything new to do the integration work?
>>>
>>>  
>>>  at.,
>>>  
>>> *Arthur P. Gregório*
>>> *+55 45 9958-0302*
>>> @gregorioarthur
>>> www.arthurgregorio.eti.br
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "google-guice" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/google-guice?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "google-guice" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/google-guice?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to