In the first post of this series we looked at how Interfaces work, and if NodeJs could/should have them.

Since then I’ve been doing some research which has led down all sorts of paths, like how the require function is effectively a service locator. How we could use the require function to bind concretions to interfaces, how in JavaScript duck typing is used in place of Interfaces. Plus all sorts of other related topics.

In this part I’m going to look at how we can in the context of an app get the benefits of Interfaces without actually having Interfaces, and it centres around service location, proxies and the module system.

Read more →