[JSMentors] Re: Advantages & Disadvantages of Dependency-Injecting Non-Instantiable Objects

2011-03-21 Thread georgecalm
ory in the code above), I have second thoughts about the usefulness. That's the reason I've posted the question. - GC On Mar 21, 4:06 am, Peter van der Zee wrote: > On Mon, Mar 14, 2011 at 1:12 AM, georgecalm wrote: > > What, in your opinion, are the advantages and disadva

[JSMentors] Advantages & Disadvantages of Dependency-Injecting Non-Instantiable Objects

2011-03-16 Thread georgecalm
What, in your opinion, are the advantages and disadvantages of dependency-injecting non-instantiable objects in JavaScript? Some context you may want to explore are: - Unit-testing - Is it worth dep-injecting it? After all, you can overwrite the non-instantiable "static" dependency to a fake