AngularJS has a ton of functionality for building reusable components with systems like Directives. But how do you build multiple page controllers with shared model-style functionality? Click through to check out how we can utilize the Provider and Factory systems to encapsulate a shared base model across pages.
Unit testing synchronous objects in Node.js is really simple. You have inputs, and you have outputs, and by exposing an object to all of it's possible inputs, you can assess that the outputs are sane. But what about something like an asynchronous Express.JS route handler? Read on to find out how you can track these sorts of modules.
Requiring files in Node.js comes in two varieties: The code you write, that is required by a relative path, and the code from the community (or your own packages), that live as node modules, and are required by module name. But what about library functionality, that gets used all over your application? Is there a better way to include this repeated functionality in your code than a bunch of relative paths?
Welcome to The Attic! Read on to find out about what this site is, who I am, and what you might find here.