Tag: Interfaces

Should NodeJs Have Interfaces Part 2

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 →

Should NodeJs Have Interfaces?

Coming from PHP one of the first things I noticed in NodeJs (and more generically JavaScript) is the lack of Interfaces. Interfaces are a core aspect of OOP programming in other languages, yet JavaScript seems to be missing them. Should NodeJs have this OOP Feature?

Read more →