New post - 'Scaling front end codebases'

The core of my skillset is front end and I’ve added over 5 years’ solid experience in Node.js. I have a good handle on the array of developments in the Javascript space, plus the experience to know which of them to benefit from. I’m passionate about web performance and know how to measure and achieve it.

I understand every angle of a successful agile team including DevOps, cross-disciplinary collaboration, user-centred testing and design, lean UX, early & continuous delivery, TDD, test automation and how to funnel business requirements through user stories.

I have skills in:


scalable CSS including CSS-in-JS




page load performance




progressive enhancement

TDD & unit tests

BDD & end-to-end tests

responsive / mobile web



rapid prototyping

A Javascript event hub using promises

The event hub / aggregator pattern is fantastic for decoupling code modules but the emitted events are usually ‘fire and forget’ so if the event listeners want to feed back an error or status report to the event emitter, they can’t.

Adding promises solves this – if the event is published then each event listener will receive its own promise. Once the listener has performed any synchronous / async tasks that it needs to, it can choose to resolve or reject the promise it has received. If all event listeners report success using their promises, then a promise passed back to the emitter will resolve successfully. However if one or more of the listeners reject (fail) their promises, it will fail.

Because the event listeners are receiving promises, they can wait until async activities eg. ajax are complete before resolving their promise. Handy if decoupled modules need to save state or complete animations before feeding back to the event emitter.

The code is on Github, hope it helps someone!