Julian
Member since Mar 5, 2015
- Profile: /members/12563-julian.htm
- Comments: 4
Recent Blog Comments By Julian
-
Thinking About Inversion Of Control (IoC) In Node.js
Posted on Mar 5, 2015 at 2:19 PM
@Ben, I completely agree with this. I find it very uncommon that there is a dependency that needs to be injected and for the cases where it does need to happen then this pattern works great. I also like it because it does not require you to pull in a whole separate framework or library just to do... read more »
-
Thinking About Inversion Of Control (IoC) In Node.js
Posted on Mar 5, 2015 at 1:26 PM
@Ben, I was curious so I made a quick test just to make sure. https://gist.github.com/jgautier/dd6877447c1188f12067 Just to comment in general on some other stuff in my experience using node. I have seen this pattern used but if the only reason why you are injecting is to use mock objects in y... read more »
-
Thinking About Inversion Of Control (IoC) In Node.js
Posted on Mar 5, 2015 at 12:15 PM
@Julian, Sorry, this: var greeter = require( "./greeter" ).( debuggy, "Good morning, %s." ); Should be this: var greeter = require( "./greeter" )( debuggy, "Good morning, %s." );... read more »
-
Thinking About Inversion Of Control (IoC) In Node.js
Posted on Mar 5, 2015 at 12:12 PM
Is there a reason to do: var debuggy = require( "./debuggy" ).call( {}, chalk ); var greeter = require( "./greeter" ).call( {}, debuggy, "Good morning, %s." ); Wouldn't var debuggy = require( "./debuggy" )( halk ); var greeter = require( "./greeter&qu... read more »