Re: DI framework comparison

2013-04-08 Thread Stuart McCulloch
On 8 Apr 2013, at 23:12, Brian Pontarelli wrote: > Also, were are the Dagger lists? I poked around a bit and couldn't find any. > I had some random questions about why certain decisions were made in the > design. https://groups.google.com/forum/#!forum/dagger-discuss > -- Brian -- You receiv

Re: DI framework comparison

2013-04-08 Thread Brian Pontarelli
Also, were are the Dagger lists? I poked around a bit and couldn't find any. I had some random questions about why certain decisions were made in the design. -- Brian On Apr 8, 2013, at 3:01 PM, Bob Lee wrote: > I agree with Jesse. To improve maintainability, we need less dynamism, not > mor

Re: Guice and constructors-as-function-objects

2013-04-08 Thread Tim Boudreau
> The "Why Constructors?" section makes me nervous, though. To say, as you > do in the first bullet, that a constructor "is the one guaranteed > thread-safe unsynchronized method an object can have" makes it sound as > though you don't need to worry about safe publication of the object being

Re: DI framework comparison

2013-04-08 Thread Bob Lee
I agree with Jesse. To improve maintainability, we need less dynamism, not more, and more explicitness, not less. Silk looks like a step in the wrong direction, while Dagger is a step in the right direction. Generally speaking, very little is actually subjective when it comes to programming. One d

Re: Using Spring 3.1 caching abstraction in Guice app

2013-04-08 Thread Aekold
Getter is not an issue, its because Spring relies on debug information to extract argument name. Try looking through com.google.inject.internal.BytecodeGen, as I understand that is the class responsible for proxy generation. Maybe looking though it you'll find that it's possible to enable debug

Re: Using Spring 3.1 caching abstraction in Guice app

2013-04-08 Thread Ales Justin
Can't you force Spring to access this variable via getter? On Apr 8, 2013, at 19:49, Ilya Karpov wrote: > Hi guys! > In our app we are mixing guice(3) and spring(3.1). We use spring transactions > via guice interceptor. It works ok and I thought that it's now a bad idea to > use not only sprin

Using Spring 3.1 caching abstraction in Guice app

2013-04-08 Thread Ilya Karpov
Hi guys! In our app we are mixing guice(3) and spring(3.1). We use spring transactions via guice interceptor. It works ok and I thought that it's now a bad idea to use not only spring transaction management but cache too. Unfortunately there is a problem: when guice injects an object which metho

Re: DI framework comparison

2013-04-08 Thread Alen Vrečko
For the singleton: 80% of the time I want "unscoped" aka dependent/instance/prototype/ injection scope. Apparently I am not the only one as this is default in JSR-330 and JSR-299. When DI was not that wide spread I can understand that any choice of default scope is fair ground. But now we had a l

Re: DI framework comparison

2013-04-08 Thread Brian Pontarelli
There are a lot of articles and discussions about the fact that Singleton scope is bad, but I don't really have the time to go dig them up. You should go back through the Guice mailing lists and check out some blogs around. I'm sure you can find a bunch of information on it. However, I will thr

Re: DI framework comparison

2013-04-08 Thread Jan Bernitt
Hi Brian, just short before I answer in detail when I finished the argumentation: I am very aware that most people will not jump off and that they will disagree. I did not announce Silk in this group. I maybe did not make it 100% clear but I asked this group, that I considered to be the guice "ex

Re: DI framework comparison

2013-04-08 Thread Jan Bernitt
If you seriously want help on this and not just bash on Silk than you should use Silk group https://groups.google.com/group/silk-di since this is purely Silk related. Of cause it is of importance how you defined the RootBundle class. There actually is such a category. But no row for "overall feeli

Re: DI framework comparison

2013-04-08 Thread Alen Vrečko
I tried to use it. It doesn't work. I get Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchMethodException: playground.Silk$RootBundle.() at se.jbee.inject.bootstrap.Inspect.noArgsConstructor(Inspect.java: 242) I have class Foo class Bar(Foo foo) Injector inje

Re: Guice and constructors-as-function-objects

2013-04-08 Thread Tim Peierls
On Mon, Apr 8, 2013 at 7:18 AM, Tim Boudreau wrote: > I just moved a framework for working with Netty, which relies on Guice > very heavily, to GitHub. It's called Acteur. It has a somewhat unusual > programming model, as it's more-or-less functional programming in Java, > using Guice and custo

Re: DI framework comparison

2013-04-08 Thread Brian Pontarelli
Jan, I feel that Hibernate and JPA are harmful. I've explain it well and made what I feel are good arguments (http://brian.pontarelli.com/category/java/hibernate/). That doesn't mean everyone jumped off Hibernate and is using something else. It also doesn't mean that the Hibernate developers an

Guice and constructors-as-function-objects

2013-04-08 Thread Tim Boudreau
I just moved a framework for working with Netty, which relies on Guice very heavily, to GitHub. It's called Acteur. It has a somewhat unusual programming model, as it's more-or-less functional programming in Java, using Guice and custom, reentrant scopes to drive the whole thing. I'm curious

A mini-framework for writing custom scopes

2013-04-08 Thread Tim Boudreau
I've mentioned this once or twice in the past on this list, and this weekend I moved a micro-framework for writing custom Scope implementations to GitHub: https://github.com/timboudreau/scopes New project, but old and solid (and simple) code. I know there's some advice against writing scopes o