[cap-talk] Object capabilities versus dependency injection.

John Carlson john.carlson3 at sbcglobal.net
Fri Nov 21 21:50:19 CST 2008


When you say dependency injection in the java world, people think of  
inversion of control and spring framework.
You can do dependency injection as compiled, or do it during runtime  
as part of an interpreter, either using XML or Annotations with  
Spring.  It's rather nice to do in in an XML file because you can  
change the dependencies and restart your container w/o recompiling  
(not sure how useful this really is).  You can do all your dependency  
injection with Java/Joe-E, but that's not how it's typically thought  
of in the Java world.

John
On Nov 21, 2008, at 1:44 PM, Rob Meijer wrote:

> On Fri, November 21, 2008 14:10, John Carlson wrote:
>> I'm not that familiar with Joe-E.  How are dependencies injected with
>> Joe-E?
>
> Please excuse my limited understanding of the subject, but I would  
> naively
> think that if joe-e as a subset/taming of Java enforces capability
> security paradigms, this would force actually all dependencies to be
> injected for something to function.
>
> If this is the case, wouldn't Joe-E (or any other object capability
> language) be an excellent tool for people doing or wanting to do
> dependency injection.
>
> Again hindered from deep knowledge on the subject, I would also feel  
> that
> on the the other side, dependency injection frameworks for a  
> particular
> language may  be an excellent starting point for building ocap  
> subsets of
> those languages.
>
> Am I making any sense here, or am I simply misunderstanding what
> dependency injection is and does?
>
>
>> Spring comes with a lot of classes for setting stuff up like data
>> sources, transactions etc.
>> You would probably have to tame those.  But you could start fresh  
>> with
>> just the basic
>> Spring Framework.  Joe-E would have to have the capability to read  
>> the
>> XML file.
>> Or you could use annotations if Joe-E accepts those.
>>
>> John
>>
>> On Nov 20, 2008, at 11:30 PM, Rob Meijer wrote:
>>
>>> Given this, (this could be a real dumb question) how realistic and/ 
>>> or
>>> beneficial to dependency injection would it to for example for java
>>> and
>>> dependency injection to use both (a tamed?) Spring and Joe-E
>>> together and
>>> advocate Joe-E as primary as a powerful dependency injection tool?
>
>
> _______________________________________________
> cap-talk mailing list
> cap-talk at mail.eros-os.org
> http://www.eros-os.org/mailman/listinfo/cap-talk



More information about the cap-talk mailing list