Dependency injection in Scala?

View: Old framed views
38 Messages — Rating Filter:   Alert me  
Dependency injection in Scala? - Hello, Is there any way to write code in Scala as in Java+Spring? I. e. with dependency injection of... Loading...
On 2008-02-01 19:18:53 Stepan Koltsov wrote: > Hello, > > Is there any way to write code in Scala as in Java+Spring?... Loading...
On 2/1/08, Jamie Webb <j@...> wrote: > On 2008-02-01 19:18:53 Stepan Koltsov wrote: > > Is there any way... Loading...
On 2008-02-03 20:45:54 Stepan Koltsov wrote: > This does not work well. > > 1. If Sensor component is used in two... Loading...
On 2/4/08, Jamie Webb <j@...> wrote: > On 2008-02-03 20:45:54 Stepan Koltsov wrote: > > This does not... Loading...
On 2008-02-04 15:49:55 Stepan Koltsov wrote: > object App { > val theSensor = new Sensor > val theWarmer =... Loading...
On 2/4/08, Jamie Webb <j@...> wrote: > On 2008-02-04 15:49:55 Stepan Koltsov wrote: > > object App { >... Loading...
Hi guys. Thanks for a great discussion. I was wondering if there is a reason why nobody has mentioned using... Loading...
That looks like an interesting approach to autowiring. I haven't yet seen implicit used on constructor arguments (or... Loading...
On 04/02/2008, Jörn Zaefferer <joern.zaefferer@...> wrote: > That looks like an interesting approach to... Loading...
On Feb 4, 2008 2:07 PM, Jonas Bonér <lists@...> wrote: > On 04/02/2008, Jörn Zaefferer... Loading...
Debasish's latest post in his blog is about scala and... Loading...
In the context of this discussion, it might be interesting to see what the Groovy people are doing, with something... Loading...
On 04 Feb 2008, at 18:39, Jonas Bonér wrote: > I was wondering if there is a reason why nobody has mentioned using ... Loading...
Hi Adriaan, would you mind repeating your post here? It seems like the example you posted is incomplete and the... Loading...
Hi Jörn, I've attached the full example. The basic idea is to use implicits, so that we can have a type drive the... Loading...
On 2/4/08, Jonas Bonér <lists@...> wrote: > > I was wondering if there is a reason why nobody has mentioned... Loading...
Why using subtyping or nested trait, a simple and classical constructor dependency injection is enough: class Sensor... Loading...
On 2008-02-04 14:23:44 David Bernard wrote: > Why using subtyping or nested trait, a simple and classical >... Loading...
Scratch that, ignore me. In future, I promise to test if my answers actually even compile. Robin Loading...
On Mon, 2008-02-04 at 15:49 +0300, Stepan Koltsov wrote: > Actually it will without structural subtyping. > > ... Loading...
On 2/4/08, Robin Message <rhm31@...> wrote: > On Mon, 2008-02-04 at 15:49 +0300, Stepan Koltsov wrote: > >... Loading...
The D.I. threads are all very interesting and I hope to understand it some day :-) I hope that some day somebody who... Loading...
On 2/1/08, Stepan Koltsov <stepan.koltsov@...> wrote: > > Is there any way to write code in Scala as in... Loading...
This is not dependency injection too. Example you shown does not work with large number of components with complex... Loading...
I agree with other replies, but in a more guarded way. I think the need for a DI framework is somewhat reduced in... Loading...
Hi Matt, I agree with you Scala by itself (as it is today) it's not an ideal solution, but from my experience it... Loading...
Hi Alex, How do you use the script approach in a context (like a webapp) where the script isn't the main ? How do... Loading...
Hi David, In a Servlet environment, you'd write an implementation of javax.servlet.ServletRequestListener (Servlet... Loading...
Hi Alex, Thanks for the info, I like the script approach for assembly and property/xml for configuration (Spring... Loading...
You are talking about directly calling "bean" setters/constructors etc. from a scala script instead of configuring the... Loading...
On 2/1/08, Erkki Lindpere <erkki@...> wrote: > > You are talking about directly calling "bean" setters/constructors... Loading...
Hi Alex, Regarding the example you posted with a Unix scala script to wire things together... I have 2 questions: 1)... Loading...
On 2/1/08, Germán Buela <gbuela@...> wrote: > > Hi Alex, > Regarding the example you posted with a Unix scala... Loading...
See http://onestepback.org/articles/depinj/contents.html In general, Scala doesn't need DI because one can use... Loading...
What is "type-safe creator functions"? S. On 2/1/08, David Pollak <dpp@...> wrote: > See... Loading...
object HttpBuilder { var buildHttp: () => HttpThingIntf = new NormalHttpThing } // I want to change... Loading...
David, seems like it is not DI. You example: === trait Sensor { } class Heater { val sensor =... Loading...